Zjnu Stadium Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2672 Accepted Submission(s): 1028 Problem Description In 12th Zhejiang College Students Games 2007, there was a new stadium built…
Marriage Match II Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3558 Accepted Submission(s): 1158 Problem Description Presumably, you all have known the question of stable marriage match. A…
A Bug's Life Time Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 13709 Accepted Submission(s): 4449 Problem Description Background Professor Hopper is researching the sexual behavior of a rare…
Problem Description 自从Lele开发了Rating系统,他的Tetris事业更是如虎添翼,不久他遍把这个游戏推向了全球.为了更好的符合那些爱好者的喜好,Lele又想了一个新点子:他将制作一个全球Tetris高手排行榜,定时更新,名堂要比福布斯富豪榜还响.关于如何排名,这个不用说都知道是根据Rating从高到低来排,如果两个人具有相同的Rating,那就按这几个人的RP从高到低来排.终于,Lele要开始行动了,对N个人进行排名.为了方便起见,每个人都已经被编号,分别从0到N-1…
Regroup Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1057 Accepted Submission(s): 297 Problem Description When ALPC42 got to a panzer brigade, He was asked to build software to help them r…
Segment set Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4479 Accepted Submission(s): 1672 Problem Description A segment and all segments which are connected with it compose a segment set.…
These days, you can do all sorts of things online. For example, you can use various websites to make virtual friends. For some people, growing their social network (their friends, their friends' friends, their friends' friends' friends, and so on), h…
Werewolf Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1381 Accepted Submission(s): 386 Problem Description "The Werewolves" is a popular card game among young people.In the basic ga…
//有n个成员,并查集开两倍空间 //1~n为一组, n+1~2n为一组.a与b互斥,则a与b反(即b+n)为同一集合, //同时b与a反(a+n)为同一集合 //在union操作中,引入w ,w越大,表面它的根连接的点越多 //合并时确立关系 #include<iostream> using namespace std; const int N=1e6; int p[N]; int w[N]; int find(int x) { if(p[x]!=x) p[x]=find(p[x]); re…
As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them: Yuta has a non-direct graph with n vertices and n+1 edges. Rikka can choose some of the edges (at least one…
A Bug's Life Time Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12944 Accepted Submission(s): 4215 Problem Description Background Professor Hopper is researching the sexual behavior of a rare s…
Is It A Tree? Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 23312 Accepted Submission(s): 5338 Problem Description A tree is a well-known data structure that is either empty (null, void, no…
小希的迷宫 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 47553 Accepted Submission(s): 14818 Problem Description 上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走.但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是…
Play on Words HDU - 1116 Some of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. Because there is no other way to open the doors, the puzzle is very important for us. There is a…
More is better Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 327680/102400 K (Java/Others)Total Submission(s): 21167 Accepted Submission(s): 7720 Problem Description Mr Wang wants some boys to help him with a project. Because the project…
Problem Description Jack likes to travel around the world, but he doesn’t like to wait. Now, he is traveling in the Undirected Kingdom. There are n cities and m bidirectional roads connecting the cities. Jack hates waiting too long on the bus, but he…