06 2013 档案

摘要:Being a knight is a very attractive career: searching for the Holy Grail, saving damsels in distress, and drinking with the other knights are fun things to do. Therefore, it is not very surprising that in recent years the kingdom of King Arthur has experienced an unprecedented increase in the number 阅读全文
posted @ 2013-06-29 21:49 剑不飞 阅读(243) 评论(0) 推荐(0)
摘要:The Beautiful RoadTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 229Accepted Submission(s): 122Problem DescriptionThere is a road from city A to city B.On the road,there are N positions(indexed from 0 to N-1).In order to celebrate the Multi-Univer 阅读全文
posted @ 2013-06-29 12:33 剑不飞 阅读(222) 评论(0) 推荐(0)
摘要:QueryTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1956Accepted Submission(s): 670Problem DescriptionYou are given two strings s1[0..l1], s2[0..l2] and Q - number of queries.Your task is to answer next queries:1) 1 a i c - you should set i-th c 阅读全文
posted @ 2013-06-22 18:58 剑不飞 阅读(198) 评论(0) 推荐(0)
摘要:King Arthur's KnightsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1403Accepted Submission(s): 606Special JudgeProblem DescriptionI am the bone of my sword. Steel is my body, and the fire is my blood.- from Fate / Stay NightYou must have know 阅读全文
posted @ 2013-06-22 11:21 剑不飞 阅读(235) 评论(0) 推荐(0)
摘要:Given a sequence of integers,a1,a2,...,an, we define itssign matrix Ssuch that, for1ijn,Sij= `` + "ifai+...+aj> 0;Sij= `` - "ifai+...+ajf[i-1],f[j] #include #include #include using namespace std; const int mm=15; vector g[mm]; int id[mm],f[mm],ans[mm]; int cas,n; void get(int n) { char 阅读全文
posted @ 2013-06-21 12:08 剑不飞 阅读(138) 评论(0) 推荐(0)
摘要:Problem B: Fire!Joe works in a maze. Unfortunately, portions of the maze have caught on fire, and the owner of the maze neglected to create a fire escape plan. Help Joe escape the maze.Given Joe's location in the maze and which squares of the maze are on fire, you must determine whether Joe can 阅读全文
posted @ 2013-06-21 10:46 剑不飞 阅读(151) 评论(0) 推荐(0)
摘要:Problem D: The NecklaceMy little sister had a beautiful necklace made of colorful beads. Two successive beads in the necklace shared a common color at their meeting point. The figure below shows a segment of the necklace:But, alas! One day, the necklace was torn and the beads were all scattered ove. 阅读全文
posted @ 2013-06-20 21:24 剑不飞 阅读(235) 评论(0) 推荐(0)
摘要:Problem A: The MonocycleA monocycle is a cycle that runs on one wheel and the one we will be considering is a bit more special. It has a solid wheel colored with five different colors as shown in the figure:The colored segments make equal angles (72o) at the center. A monocyclist rides this cycle o. 阅读全文
posted @ 2013-06-20 20:41 剑不飞 阅读(201) 评论(0) 推荐(0)
摘要:mysql -u root mysql> use mysql; mysql> UPDATE user SET Password = PASSWORD('newpass') WHERE user = 'root'; mysql> FLUSH PRIVILEGES; 阅读全文
posted @ 2013-06-18 20:20 剑不飞 阅读(99) 评论(0) 推荐(0)
摘要:整数对Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2109Accepted Submission(s): 700Problem DescriptionGardon和小希玩了一个游戏,Gardon随便想了一个数A(首位不能为0),把它去掉一个数字以后得到另外一个数B,他把A和B的和N告诉了小希,让小希猜想他原来想的数字。不过为了公平起见,如果小希回答的数虽然不是A,但同样能达到那个条件(去掉其中的一个数字得到B,A和B之和是N),一样算小希胜 阅读全文
posted @ 2013-06-16 16:48 剑不飞 阅读(230) 评论(0) 推荐(0)
摘要:Unfair NimTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 662Accepted Submission(s): 271Problem DescriptionAlice and Bob are tired of playing the Nim game, because they are so clever that before the beginning of the game, they have already known 阅读全文
posted @ 2013-06-05 13:19 剑不飞 阅读(274) 评论(0) 推荐(0)
摘要:PartyTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2997Accepted Submission(s): 934Problem Description有n对夫妻被邀请参加一个聚会,因为场地的问题,每对夫妻中只有1人可以列席。在2n 个人中,某些人之间有着很大的矛盾(当然夫妻之间是没有矛盾的),有矛盾的2个人是不会同时出现在聚会上的。有没有可能会有n 个人同时列席?Inputn: 表示有n对夫妻被邀请 (n #include #inclu 阅读全文
posted @ 2013-06-04 18:56 剑不飞 阅读(164) 评论(0) 推荐(0)
摘要:Bomb GameTime Limit: 10000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2696Accepted Submission(s): 894Problem DescriptionRobbie is playing an interesting computer game. The game field is an unbounded 2-dimensional region. There are N rounds in the game. At each 阅读全文
posted @ 2013-06-04 18:15 剑不飞 阅读(198) 评论(0) 推荐(0)
摘要:Equivalent SetsTime Limit: 12000/4000 MS (Java/Others)Memory Limit: 104857/104857 K (Java/Others)Total Submission(s): 1794Accepted Submission(s): 615Problem DescriptionTo prove two sets A and B are equivalent, we can first prove A is a subset of B, and then prove B is a subset of A, so finally we go 阅读全文
posted @ 2013-06-03 15:32 剑不飞 阅读(144) 评论(0) 推荐(0)
摘要:Save the dwarfsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 926Accepted Submission(s): 281Problem DescriptionSeveral dwarfs are trapped in a deep well. They are not tall enough to climb out of the well, so they want to make a human-pyramid, that 阅读全文
posted @ 2013-06-01 10:16 剑不飞 阅读(220) 评论(0) 推荐(0)
摘要:Meeting point-2Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 866Accepted Submission(s): 472Problem DescriptionIt has been ten years since TJU-ACM established. And in this year all the retired TJU-ACMers want to get together to celebrate the tenth 阅读全文
posted @ 2013-06-01 09:14 剑不飞 阅读(164) 评论(0) 推荐(0)
摘要:Meeting point-1Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2313Accepted Submission(s): 731Problem DescriptionIt has been ten years since TJU-ACM established. And in this year all the retired TJU-ACMers want to get together to celebrate the tent 阅读全文
posted @ 2013-06-01 09:10 剑不飞 阅读(138) 评论(0) 推荐(0)
摘要:max{x,y}=1/2(x+y+|x-y|);min{x,y}=1/2(x+y-|x-y|) 阅读全文
posted @ 2013-06-01 08:52 剑不飞 阅读(120) 评论(0) 推荐(0)