ACM
文章平均质量分 81
chengouxuan
这个作者很懒,什么都没留下…
展开
-
zoj 1843 yahtzee
/*The game of Yahtzee involves 5 dice, which are thrown in 13 rounds. A score card contains 13 categories; each round may be scored in a ca原创 2010-08-31 15:21:00 · 457 阅读 · 0 评论 -
uva 10237 bishops
Problem BBishopsInput: standard inputOutput: standard outputTime Limit: 4 secondsMemory Limit: 32 MB A bishop is a原创 2011-10-14 13:35:45 · 1120 阅读 · 0 评论 -
uva 10105 polynomial coefficients
Polynomial coefficients The ProblemThe problem is to calculate the coefficients in expansion of polynomial (x1+x2+...+xk)n原创 2011-10-02 20:35:23 · 553 阅读 · 0 评论 -
hdu 1171 big event in hdu
Big Event in HDUTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9282 Accepte原创 2011-10-16 10:15:02 · 1259 阅读 · 0 评论 -
acm/icpc live archive regional 1998 europe central problem d, spoj 45 commedia dell arte
Commedia dell' arte So called commedia dell' arte is a theater genre first played at Italy in the beginning of the sixteenth c原创 2011-10-15 00:46:36 · 900 阅读 · 0 评论 -
hdu 1027 ignatius and the princess ii
Ignatius and the Princess IITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1862原创 2011-10-15 13:52:49 · 821 阅读 · 0 评论 -
hdu 1100 trees made to order
Trees Made to OrderTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 362 Accept原创 2011-10-15 20:39:58 · 1397 阅读 · 0 评论 -
hdu 1294 rooted trees problem
Rooted Trees ProblemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 337 Accep原创 2011-10-16 21:51:02 · 1025 阅读 · 0 评论 -
hdu 1492 the numbers of divisors about humble numbers
The number of divisors(约数) about Humble NumbersTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total原创 2011-10-17 12:17:02 · 683 阅读 · 0 评论 -
hdu 1153 magic bitstrings
Magic BitstringsTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 51 Accepted原创 2011-10-15 23:41:49 · 1317 阅读 · 3 评论 -
uva 648 steps
StepsPC/UVa IDs: 110608/846, Popularity: A, Success rate: high Level: 2Consider the process of stepping from integer x to integer y alon原创 2011-10-04 14:16:10 · 361 阅读 · 0 评论 -
uva 548 Tree
好多次都re,原来是栈不够用。。。把递归改成迭代就ac了。。。 Tree You are to determine the value of the leaf node in a given binary tree that is原创 2010-08-24 18:20:00 · 379 阅读 · 0 评论 -
uva 10142 续
#include #include #include #include #include #include #include using namespace std;#define MAX_CAND 30#define MAX_VOTER 2000vector原创 2010-07-16 17:02:00 · 472 阅读 · 0 评论 -
uva 10142
Problem D - Australian VotingAustralian ballots require that the voter rank the candidates in order of choice. Initially only the first ch原创 2010-07-16 16:05:00 · 963 阅读 · 0 评论 -
ural 1002 Phone numbers
1002. Phone numbersTime Limit: 2.0 secondMemory Limit: 16 MBIn the present world you frequently meet a lot of call numbers andth原创 2010-06-11 16:46:00 · 865 阅读 · 1 评论 -
杭电 p1043 acm eight 八数码
EightTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1852 Accepted Submission(s): 532Special JudgeProblem DescriptionThe15-puz原创 2010-02-06 14:23:00 · 2665 阅读 · 2 评论 -
acm 杭电 Delta-wave 1030
在每个三角形中间取一个点,并给他设置坐标(x, y),并在有边界的三角形之间用线把两个三角形的中心点相连,我们的任务就是不断缩短出发点和目的点之间的距离,每个点有都有三条路可走(忽略边界情况)。 #include #include double pi = acos(0.0) * 2;bool direc[2][6] = { true, false, true, fals原创 2009-12-31 17:45:00 · 1491 阅读 · 1 评论 -
acm 杭电 ignatius and the princess iii 1028
今天又抽空ac了一题,用时15ms,内存244k,排行榜上的都是0ms,几百b,牛人就是牛人,肯定知道什么公式。 而我的方法是按递减是顺序排列加数,例如: 1 = 1; 2 = 2;2 = 1 + 1; 3 = 3;3 = 2 + 1;3 = 1 + 1 + 1; 4 = 4;4 = 3 + 1;4 = 2 + 2;4 = 2 +原创 2009-12-28 19:45:00 · 1293 阅读 · 3 评论 -
acm 杭电 train problem ii 1023
今天第一次写博客 本来以为long double应该可以搞定了,但是结果有好几十位,只好自己写大数加法,为了尽量少修改原来的代码,我修改的stl里string的接口,从而直接当成大整数来用。 #include #include #include #include using namespace std;class big_int : protected string原创 2009-12-27 13:09:00 · 1088 阅读 · 0 评论 -
hdu 1521
排列组合Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 811 Accepted Submission(s): 325Problem Description有n种物品,并且知道每种物品的数量。要求从中选原创 2011-11-05 01:15:41 · 793 阅读 · 0 评论 -
hdu 1716
排列2Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1853 Accepted Submission(s): 717Problem DescriptionRay又对数字的列产生了兴趣:现有四张卡片原创 2011-11-05 10:12:40 · 676 阅读 · 0 评论 -
hdu 1799
循环多少次?Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1343 Accepted Submission(s): 485Problem Description 我们知道,在编程中,我们时常需要考虑原创 2011-11-05 11:48:16 · 880 阅读 · 0 评论 -
uva 10049 self describing sequence
Problem C: Selfdescribing Sequence Solomon Golomb's selfdescribing sequence is the only nondecreasing sequence of positive integers with the property that it contains exactly f(k)原创 2012-01-18 21:47:06 · 740 阅读 · 0 评论 -
uva 10168 summation of four primes
Problem ASummation of Four PrimesInput: standard inputOutput: standard outputTime Limit: 4 seconds Euler proved in one of his classic theorems that prime numbers are infinite in number. Bu原创 2012-01-19 16:42:25 · 548 阅读 · 0 评论 -
uva 10042 smith numbers
Problem D: Smith Numbers Background While skimming his phone directory in 1982, Albert Wilansky, a mathematician of Lehigh University , noticed that the telephone number of his broth原创 2012-01-19 17:37:56 · 509 阅读 · 0 评论 -
uva 10247 complete tree labeling
Problem BComplete Tree Labeling!Input: standard inputOutput: standard outputTime Limit: 45 secondsMemory Limit: 32 MB A complete k-ary tree is a k-ary tree in which all leaves have same原创 2012-01-18 11:20:18 · 455 阅读 · 0 评论 -
uva 10139 factovisors
Problem D: FactovisorsThe factorial function, n! is defined thus for n a non-negative integer: 0! = 1 n! = n * (n-1)! (n > 0)We say that a divides b if there exists an integer k such tha原创 2012-01-19 13:00:55 · 627 阅读 · 0 评论 -
zoj 3580 angry birds 愤怒的小鸟(zoj 的题目就是与时俱进啊)
Angry BirdsTime Limit: 4 Seconds Memory Limit: 65536 KBIn the famous game Angry Birds, players can choose a direction to shoot a blue bird, which can be spilt into three birds to hit th原创 2012-03-07 15:45:11 · 746 阅读 · 0 评论 -
zoj 3578 matrix
MatrixTime Limit: 10 Seconds Memory Limit: 131072 KBA N*M coordinate plane ((0, 0)~(n, m)). Initially the value of all N*M grids are 0.An operation T(a, b, h, x, y) is defined as foll原创 2012-03-07 17:22:22 · 806 阅读 · 2 评论 -
zoj 3590 -3+1
-3+1Time Limit: 2 Seconds Memory Limit: 65536 KBZOJ is 10 years old! For celebrating, we are offering the easiest problem in the world to you.Recently we received a long sequence. We ca原创 2012-03-27 21:18:52 · 735 阅读 · 0 评论 -
uva 10254 the priest mathematician
Problem IThe Priest MathematicianInput: standard inputOutput: standard outputTime Limit: 10 seconds The ancient folklore behind the "Towers of Hanoi" puzzle invented by E. Lucas in 1883 is原创 2012-01-18 16:17:52 · 496 阅读 · 0 评论 -
uva 10157 expressions
Problem A: EXPRESSIONS Let X be the set of correctly built parenthesis expressions. The elements of X are strings consisting only of the characters �(� and �)�. The set X is defined as follo原创 2012-01-17 20:11:02 · 708 阅读 · 0 评论 -
hdu 1510 white rectangles
#include #include #include #define SZ_MAX 110#define max(x, y) ((x) > (y) ? (x) : (y))int left_whites[SZ_MAX][SZ_MAX]; // including the itselfchar board[SZ_MAX][SZ_MAX];int sz;int main ()原创 2011-11-04 14:59:00 · 761 阅读 · 0 评论 -
hdu 1261
字串数Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1430 Accepted Submission(s): 257Problem Description一个A和两个B一共可以组成三种字符串:"ABB原创 2011-11-04 20:49:52 · 1274 阅读 · 0 评论 -
hdu 1465
不容易系列之一Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7296 Accepted Submission(s): 2967Problem Description大家常常感慨,要做好一件事情真的不容原创 2011-11-04 21:53:25 · 760 阅读 · 0 评论 -
hdu 3363 ice sugar gourd
Ice-sugar GourdTime Limit: 5000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 568 Accepted Submission(s): 207Problem DescriptionIce-sugar go原创 2011-11-05 20:32:00 · 963 阅读 · 0 评论 -
uva 568 just the facts
Just the Facts The expression N!, read as ``N factorial," denotes the product of the first N positive integers, where N is nonnegative. So, for example,NN!01原创 2012-01-09 18:34:04 · 820 阅读 · 0 评论 -
uva 294 divisors
Divisors Mathematicians love all sorts of odd properties of numbers. For instance, they consider 945 to be an interesting number, since it is the first odd number for which the sum of its原创 2012-01-09 23:57:46 · 1015 阅读 · 0 评论 -
uva 439 knight moves
BFS Knight Moves A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each原创 2012-01-10 16:24:04 · 1057 阅读 · 0 评论 -
uva 107 the cat in the hat
The Cat in the Hat Background(An homage to Theodore Seuss Geisel)The Cat in the Hat is a nasty creature,But the striped hat he is wearing has a rather nifty feature.With one flic原创 2012-01-13 15:05:02 · 1275 阅读 · 0 评论