上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页
摘要: 小Q系列故事——最佳裁判Time Limit: 500/200 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1363Accepted Submission(s): 659Problem Description 过去的2012年对小Q来说是很悲催的一年,失恋了12次,每次都要郁闷1个来月。 好在小Q是个体育迷,在最痛苦的时候,他常常用观看各种体育节目来麻醉自己,比如伦敦奥运会期间,小Q就常常在周末邀上一群单身同事聚在自己的蜗居,一边畅饮啤酒,一边吹牛。 小Q最喜欢看的是跳水,主要... 阅读全文
posted @ 2013-09-20 16:35 我家小破孩儿 阅读(142) 评论(0) 推荐(0)
摘要: 删格游戏Time Limit: 1000 ms Case Time Limit: 1000 ms Memory Limit: 65536 KBSubmit: 225 Accepted: 110 [Prev][Next]Description玩腻了取石子游戏的Alice和Bob决定尝试一个古老的游戏:删格游戏。删格游戏是由n*m个小格组成的矩形(你可以想象成是巧克力条),参加游戏的两个人轮流操作,每次选择一个小格后,该小格的右上部分就全被删去了,且要求每次至少删去一个格子,选中左下角格子的人算输。这一次Alice很大方地让Bob先选择,你的任务就是判断谁可以取胜。Input输入第一行为一个... 阅读全文
posted @ 2013-09-17 20:57 我家小破孩儿 阅读(215) 评论(0) 推荐(0)
摘要: Naive and Silly MugglesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 216Accepted Submission(s): 153Problem DescriptionThree wizards are doing a experiment. To avoid from bothering, a special magic is set around them. The magic forms a circle, whi 阅读全文
posted @ 2013-09-12 19:35 我家小破孩儿 阅读(145) 评论(0) 推荐(0)
摘要: The Number Off of FFFTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 492Accepted Submission(s): 235Problem DescriptionX soldiers from the famous "*FFF*army" is standing in a line, from left to right.You, as the captain of*FFF*, decides to 阅读全文
posted @ 2013-09-12 19:22 我家小破孩儿 阅读(122) 评论(0) 推荐(0)
摘要: Kia's CalculationTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 588Accepted Submission(s): 158Problem DescriptionDoctor Ghee is teaching Kia how to calculate the sum of two integers. But Kia is so careless and alway forget to carry a number wh 阅读全文
posted @ 2013-09-12 19:19 我家小破孩儿 阅读(242) 评论(0) 推荐(0)
摘要: SumsetsTime Limit: 6000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1151Accepted Submission(s): 446Problem DescriptionFarmer John commanded his cows to search for different sets of numbers that sum to a given number. The cows use only numbers that are an intege 阅读全文
posted @ 2013-09-10 20:38 我家小破孩儿 阅读(169) 评论(0) 推荐(0)
摘要: Children's DayTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 408Accepted Submission(s): 255Problem DescriptionToday is Children's Day. Some children ask you to output a big letter 'N'. 'N' is constituted by two vertical lin 阅读全文
posted @ 2013-09-10 18:48 我家小破孩儿 阅读(134) 评论(0) 推荐(0)
摘要: Difference Between PrimesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 970Accepted Submission(s): 315Problem DescriptionAll you know Goldbach conjecture.That is to say, Every even integer greater than 2 can be expressed as the sum of two primes. 阅读全文
posted @ 2013-09-10 18:45 我家小破孩儿 阅读(233) 评论(0) 推荐(0)
摘要: int ModPow(int a,int b,int n) { int rec=1; while(b) { if (b & 1) rec = (rec * a) % n; a = (a * a) % n; b >>= 1; } return rec % n; } 阅读全文
posted @ 2013-09-09 19:14 我家小破孩儿 阅读(152) 评论(0) 推荐(0)
摘要: int pow(int a ,int k) { int rec = 1; while( k ) { if (k & 1) rec *= a; a *= a; k >>= 1; } return rec; } 阅读全文
posted @ 2013-09-09 19:13 我家小破孩儿 阅读(114) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页