摘要:
Farmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at positions x1,...,xN (0 <= xi 阅读全文
摘要:
Farmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and recorded the 阅读全文
摘要:
Demy has n jewels. Each of her jewels has some value vi and weight wi. Since her husband John got broke after recent financial crises, Demy has decide 阅读全文
摘要:
The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c, d ) ∈ A x B x C x D 阅读全文
摘要:
Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point loca... 阅读全文
摘要:
Give you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers ... 阅读全文
摘要:
You are given a rectangular field of n × m cells. Each cell is either empty or impassable (contains an obstacle). Empty cells are marked with '.', imp 阅读全文
摘要:
You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. 阅读全文
摘要:
Given a set of sticks of various lengths, is it possible to join them end-to-end to form a square? InputThe first line of input contai... 阅读全文
摘要:
Alex doesn't like boredom. That's why whenever he gets bored, he comes up with games. One long winter evening he came up with a game a... 阅读全文