摘要:描述 Given a string of digits, insert commas to create a sequence of strictly increasing numbers so as to minimize the magnitude of the last number. For
阅读全文
摘要:描述 Matt hzs N friends. They are playing a game together.Each of Matt’s friends has a magic number. In the game, Matt selects some (could be zero) of h
阅读全文
摘要:描述 It's your first day in Quality Control at Merry Milk Makers, and already there's been a catastrophe: a shipment of bad milk has been sent out. Unfo
阅读全文
摘要:塔神酷爱玩梦幻西游这款游戏,这款游戏以著名的章回小说《西游记》故事为背景,透过Q版的人物,营造出浪漫的网络游戏风格.塔神以追求天下无敌为目标,从一个默默无闻的菜鸟,打拼到了登峰造极的大师,犀利的人物当然离不开犀利的装备,于是塔神带着一堆票子开始逛市场买装备,塔神为了图个方便,只会在连续的几家摊位买装
阅读全文
摘要:描述 Farmer John's cows like to play coin games so FJ has invented with a new two-player coin game called Xoinc for them. Initially a stack of N (5 ≤ N
阅读全文
摘要:描述 Consider an ordered set S of strings of N (1 <= N <= 31) bits. Bits, of course, are either 0 or 1. This set of strings is interesting because it is
阅读全文
摘要:描述 Examine the 6x6 checkerboard below and note that the six checkers are arranged on the board so that one and only one is placed in each row and each
阅读全文
摘要:描述 A binary tree is a tree data structure in which each node has at most two child nodes, usually distinguished as "left" and "right". A subtree of a
阅读全文
摘要:描述 Wddpdh find an interesting mini-game in the BBS of WHU, called “An easy PUZ”. It’s a 6 * 6 chess board and each cell has a number in the range of 0
阅读全文
摘要:描述 给定一个序列A[0],A[1],…A[N-1],要求找到p0,p1,p2,p3使得A[p0]+A[p0+1]+…+A[p1] + A[p2]+A[p2+1]+…+A[p3]最大(0<=p0<=p1<p2<=p3<N)。你只需要求出这个最大值就可以。 给定一个序列A[0],A[1],…A[N-1
阅读全文
摘要:描述 zry有一个收集灯泡的习惯,他把灯泡的阴极都共地,阳极连成一颗树,这样的话,他只要在任意一个灯泡的阳极加上合适的电压,所有灯泡都能亮起来。不幸的是,有一对灯泡之间的阳极连线断掉了,这样的话,这颗灯泡树就还有一部分能亮,一部分不能亮了。zry想知道如果他在任意一个灯泡的阳极上加电压,这一对灯泡的
阅读全文
摘要:描述 KK是个心灵手巧的好姑娘,她做了一个大蛋糕请她的好朋友们来品尝。这个蛋糕分成n×n个正方形小格,每个小格包含一块水果。KK要把蛋糕切成若干块,显然她不会破坏任意一个小格。无聊的某同学在她切蛋糕时不停地问她同一种问题:某两个小格是否还在同一块蛋糕里?例如下图中,KK从(1,1)切到(4,1),又
阅读全文