Pleasant sheep and big big wolfTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1601 Accepted Submission(s): 687Problem DescriptionIn ZJNU, there is a well-known prairie. And it attracts
轉載來自:http://blog.csdn.net/ffq5050139/article/details/7832991=============================以下是最小產生樹+並查集======================================【HDU】1213 How Many Tables基礎並查集★1272 小希的迷宮基礎並查集★1325&&poj1308 Is It A Tree?基礎並查集★1856 More is
不知道那裡貪心了。。。學長說貪心。注意:資料類型範圍,還是不太瞭解;原題連結:http://poj.org/problem?id=2109Power of CryptographyTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 13983 Accepted: 7136DescriptionCurrent work in cryptography involves (among other things) large prime
Wooden Sticks Problem DescriptionThere is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be processed by a woodworking machine in one by one fashion. It needs some time, called setup time, for
連結:http://acm.sgu.ru/problem.php?contest=0&problem=195http://acm.hust.edu.cn/vjudge/contest/view.action?cid=26733#problem/E195. New Year Bonus Granttime limit per test: 1.5 sec.memory limit per test: 65536 KBinput: standardoutput: standardAll
ThievesTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 997 Accepted Submission(s): 448Problem DescriptionIn the kingdom of Henryy, there are N (2 <= N <= 100) cities, with M (M <= 10
5順時針螺旋數:#include<stdio.h>#include<string.h>int map[25][25];int main(){ int n; while(scanf("%d", &n) != EOF) { memset(map, 0, sizeof(25)); int temp = 1; int x , y; int up = 1, down = n; int
TravelTime Limit: 10000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1120 Accepted Submission(s): 381Problem Description One day, Tom traveled to a country named BGM. BGM is a small country, but
題意:給你 N 件不同的商品,每件商品最多可以買一次。 每件物品對應兩個值 pi di pi 表示物品的價值,di 表示可以買的最遲時間(也就是第一天到第 di 天都可以買這件物品) 規定:每天最多可以買一件物品,問你可以得到的最大價值。演算法:貪心 看了KB神的題解,他用的並查集,等下貼個代碼。思路【貪心版本】:將物品按照價值從大到小排序 依次枚舉每件物品