Time Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Problem Description Betty owns a lot of ponds, some of them are connected with other ponds by pipes, and there will not be more than one pipe between two ponds. Ea…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5438 Ponds Time Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2237 Accepted Submission(s): 707 Problem Description Betty owns a lot of ponds, som…
Ponds Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1001&cid=621 Description Betty owns a lot of ponds, some of them are connected with other ponds by pipes, and there will not be more than one…
Ponds Time Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 282 Accepted Submission(s): 86 Problem Description Betty owns a lot of ponds, some of them are connected with other ponds by pipes, and…
Ponds Time Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 3234 Accepted Submission(s): 997 Problem Description Betty owns a lot of ponds, some of them are connected with other ponds by pipes, a…
题意 不断删去度数为1的点,最后求有奇数个点的联通块的权值之和. 分析 存边的时候,要头尾都存这个边.用dfs或者队列删点,再用并查集或者dfs确定联通块,然后统计联通块的点数,最后累加. 我自己写的超时,然后参考了网上的题解.真郁闷. 代码 并查集 #include<cstdio> #include<queue> #include<vector> #define ll long long using namespace std; const int N = 1e4 +…
Problem Description There was no donkey ,) , the down-right cell ,N-) and the cell below the up-left cell ,)..... A × grid is shown below: The donkey lived happily until it saw a tiger far away. The donkey had never seen a tiger ,and the tiger had ne…
Robot Motion Problem Description A robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down in a grid. The possible instructions are N north (up the page) S south (down…
题目链接 http://acm.hdu.edu.cn/search.php?action=listproblem Problem Description Ladies and gentlemen, please sit up straight.Don't tilt your head. I'm serious.For n given strings S1,S2,⋯,Sn, labelled from 1 to n, you should find the largest i (1≤i≤n) su…
Ponds Time Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 533 Accepted Submission(s): 175 Problem Description Betty owns a lot of ponds, some of them are connected with other ponds by pipes, an…
Necklace/center> 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5727 Description SJX has 2*N magic gems. N of them have Yin energy inside while others have Yang energy. SJX wants to make a necklace with these magic gems for his beloved BHB. To avoid…
Cannon Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=4499 Description In Chinese Chess, there is one kind of powerful chessmen called Cannon. It can move horizontally or vertically along the chess grid. At eac…
扫雷 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 998 Accepted Submission(s): 289 Problem Description 扫雷游戏是晨晨和小璐特别喜欢的智力游戏,她俩最近沉迷其中无法自拔.该游戏的界面是一个矩阵,矩阵中有些格子中有一个地雷,其余格子中没有地雷. 游戏中,格子可能处于己知和未知的状态…
Car Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 25 Accepted Submission(s): 12 Problem Description Ruins is driving a car to participating in a programming contest. As on a very tight sche…
Fraction Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0 Problem Description Mr. Frog recently studied how to add two fractions up, and he came up with an evil ide…
题目网址:http://acm.hdu.edu.cn/showproblem.php?pid=5547 题目: Sudoku Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 2372 Accepted Submission(s): 804 Problem Description Yi Sima was one of the be…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5538 Problem Description Have you ever played the video game Minecraft? This game has been one of the world's most popular game in recent years. The world of Minecraft is made up of lots of 1×1×1 blocks…