摘要:
Bob is a strategy game programming specialist. In his new city building game the gaming environment is as follows: a city is built up by areas, in whi 阅读全文
摘要:
Zipper Zipper Given three strings, you are to determine whether the third string can be formed by combining the characters in the first two strings. T 阅读全文
摘要:
QQpet exploratory park QQpet exploratory park Today, more and more people begin to raise a QQpet. You can get a lot of pleasure from it, although it d 阅读全文
摘要:
漫步校园 LL最近沉迷于AC不能自拔,每天寝室、机房两点一线。由于长时间坐在电脑边,缺乏运动。他决定充分利用每次从寝室到机房的时间,在校园里散散步。整个HDU校园呈方形布局,可划分为n*n个小方格,代表各个区域。例如LL居住的18号宿舍位于校园的西北角,即方格(1,1)代表的地方,而机房所在的第三实 阅读全文
摘要:
平衡树 平衡树 神奇的cxlove有一颗平衡树,其树之神奇无法用语言来描述 OrzOrz。 这棵树支持3种操作: 1、加入一个数到树中,维护平衡树的合法性; 2、给一个数X,用O(1)的时间求出来树中的数Y使得 Y ^ X 最大(异或操作, Pascal 写作 xor , 0 ^ 0 = 0 , 1 阅读全文
摘要:
哥德巴赫猜想认为“每一个大于2的偶数,都能表示成两个质数之和”。 给定一个大于2的偶数N,你能找到两个质数P和Q满足P<=Q并且P+Q=N吗? Input 一个偶数N(4 <= N <= 1000000) Output 输出P和Q。如果有多组解,输出P最小的一组。 Sample Input Samp 阅读全文
摘要:
What is possibility of rolling N dice and the sum of the numbers equals to M? Input Two integers N and M. (1 ≤ N ≤ 100, 1 ≤ M ≤ 600) Output Output the 阅读全文
摘要:
HDU 1712 Problem Description ACboy has N courses this term, and he plans to spend at most M days on study.Of course,the profit he will gain from diffe 阅读全文