问题 C: Repeat Number
时间限制: 1 Sec 内存限制: 128 MB
提交: 23 解决: 7
[提交][状态][论坛]
题目描述
Definition: a+b = c, if all the digits of c are same ( c is more than ten),then we call a and b are Repeat Number. My...
分类:
其他好文 时间:
2014-05-26 04:03:34
阅读次数:
228
tar
Examples:
tar -cf archive.tar foo bar # Create archive.tar from files foo and bar.
tar -tvf archive.tar # List all files in archive.tar verbosely.
tar -xf archive.tar ...
Summation of primes
Problem 10
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
Find the sum of all the primes below two million.
还是使用Sieve of Eratosthenes 算法
我的python代码如下:
...
分类:
其他好文 时间:
2014-05-26 03:40:15
阅读次数:
243
最近遇到一个需求,需要把Oracle中一部分表的数据迁移到SQL Server数据库中。但是这些表的结构是有些差异的。
方法一,使用SQL Develper的数据导出工具,导出SQL insert语句,然后再手动修改其中的一些细节,最后在放到SQL Server中执行。因为前后的表结构是有差异的,我需要一条一条语句的去删掉一些字段,然后再删掉一些值,几条或者几十条数据还行,这40万条数据...
分类:
数据库 时间:
2014-05-26 03:15:26
阅读次数:
309
【题目】
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.
For example,
Given the following matrix:
[
[ 1, 2, 3 ],
[ 4, 5, 6 ],
[ 7, 8, 9 ]
]
You should return [1,2,3,6,9,8,7,4,5].
【题意】
螺旋输出MxN...
分类:
其他好文 时间:
2014-05-24 23:11:02
阅读次数:
279
http://poj.org/problem?id=3013
题意:
Because of a technical difficulty, price of an edge will be (sum of weights of all descendant nodes) × (unit price of the edge).这句话一直没看懂。后面还以为是最小生成树。
正确...
分类:
其他好文 时间:
2014-05-24 20:27:13
阅读次数:
266
第6章 使用库算法
本章中主要教我们如何使用几个库算法来解决与处理字符串和学生成绩相关的问题。
1、分析字符串
使用一个循环来连接两幅字符图案
for(vector::const_iterator it = bottom.begin(); it != bottom.end(); ++it)
ret.push_back(*it);
等价于
ret.insert(ret.end(...
分类:
编程语言 时间:
2014-05-24 20:24:10
阅读次数:
365
【题目】
Given an array of strings, return all groups of strings that are anagrams.
Note: All inputs will be in lower-case.
For example:
Input: ["tea","and","ate","eat","den"]
Output: ["tea","ate","eat"]
【题意】
anagrams指的是颠倒字母顺序构成的单词,以tea为例,则与它an...
分类:
其他好文 时间:
2014-05-24 18:36:01
阅读次数:
317
点击打开链接
题意:
集合S支持一下四种操作:
INSERT(S,x) : 如果S中没有x,则插入x
DELETE(S,x): 如果S中有x,则删除x
K-TH(S): 输出S中第K小的数
COUNT(S,x): 统计S中小于x的数有多少个
一共有Q(1 ≤ Q ≤ 200000)次操作。
Treap模板。。
#i...
分类:
其他好文 时间:
2014-05-24 18:03:11
阅读次数:
213
【题目】
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.
Given an integer n, return all distinct solutions to the n-queens puzzle.
Each solution contains a distinct board configuratio...
分类:
其他好文 时间:
2014-05-24 17:12:32
阅读次数:
237