本文出自:http://blog.csdn.net/svitter
题意分析:
Given m sequences, each contains n non-negative integer. Now we may select one number from each sequence to form a sequence with m integers. It's clear
...
分类:
其他好文 时间:
2014-08-03 12:54:15
阅读次数:
912
Description
You have N integers, A1, A2, ... ,
AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other ...
分类:
其他好文 时间:
2014-08-03 12:53:25
阅读次数:
311
问题:将二叉树的所有结点指向他的右边的一个结点分析:对于每一个结点来说,其操作都是一样的,除了他的左儿子指向右儿子外,其左儿子的全部右后辈均指向其右儿子的全部左后辈/** * Definition for binary tree with next pointer. * struct TreeLin...
分类:
其他好文 时间:
2014-08-03 10:12:05
阅读次数:
178
题目:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the....
分类:
编程语言 时间:
2014-08-03 04:40:04
阅读次数:
351
Description
Each of the M lanes of the Park of Polytechnic University of Bucharest connects two of the N crossroads of the park (labeled from 1 to N). There is no pair of crossroads connected by mo...
分类:
其他好文 时间:
2014-08-02 23:27:14
阅读次数:
327
对于集合的遍历首选方法是for-each
for(Element e :c){
doSomething(e);
}
这是1.5版本之后的做法;java1.5之前使用的是Iterator迭代器。
为了弄清楚为啥比普通的for循环或者whlie循环好,请看一下代码
Iterator i=c.iterator();
while(i.hasNext()){...
分类:
其他好文 时间:
2014-08-02 23:26:54
阅读次数:
356
Description
The puzzle game of Sudoku is played on a board of N2 × N2 cells. The cells are grouped in N × N squares of N × N cells each. Each cell is either empty or contains a number between
1 a...
分类:
其他好文 时间:
2014-08-02 23:26:34
阅读次数:
344
??
Silver Cow Party
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 12633
Accepted: 5631
Description
One cow from each of N farms (1 ≤ N ≤ 1000) convenien...
分类:
其他好文 时间:
2014-08-02 18:29:13
阅读次数:
289
Match for Bonus
Time Limit: 2 Seconds Memory Limit: 65536 KB
Roy played a game with his roommates the other day.
His roommates wrote 2 strings of characters, and gave each character a b...
分类:
其他好文 时间:
2014-08-02 18:20:33
阅读次数:
256
Description
N children are sitting in a circle to play a game.
The children are numbered from 1 to N in clockwise order. Each of them has a card with a non-zero integer on it in his/her hand. Th...
分类:
其他好文 时间:
2014-08-02 15:37:33
阅读次数:
259