摘要:
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5943【题意】给定n,s,现在让1-n和s+1,s+2...s+n这两堆数匹配,如果(s+i)%j==0那么s+i就可以和j构成一个匹配,求是否能让所有的n个数字都构成匹配... 阅读全文
摘要:
Meeting point-1TimeLimit: 2000/1000 MS (Java/Others) Memory Limit:32768/32768 K (Java/Others)Total Submission(s): 3928 Accepted ... 阅读全文
摘要:
The King’sUps and DownsTime Limit: 2000/1000 MS(Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 758 A... 阅读全文
摘要:
Ancient GoTimeLimit: 3000/1000 MS (Java/Others) Memory Limit:65535/65535 K (Java/Others)Total Submission(s): 2952 Accepted Submi... 阅读全文
摘要:
题目链接 https://vjudge.net/problem/UVALive-3027【题意】 并查集模板题,给定一组序列1-n(n using namespace std;const int maxn = 20050;int n;int par[maxn],... 阅读全文
摘要:
题目链接 https://cn.vjudge.net/problem/UVA-11400【题意】 你的任务是设计一个照明系统,一共有n(n=c2时,上式>=下式,也就是说一定要拿单价小的灯泡把单价大的灯泡换掉。 对于第二条,想明白了这一点是dp的关键。就拿... 阅读全文
摘要:
As you may know from the comic “Asterix andthe Chieftain’s Shield”, Gergovia consists of one street, and every inhabitantof the city i... 阅读全文
摘要:
题目链接 https://vjudge.net/problem/UVA-1600Sample Input 3 2 5 0 0 1 0 0 0 0 0 0 1 0 4 6 1 0 1 1 0 0 0 0 0 1 0 1 1 0 1 1 1 1 0 0 1 1 1 0 0... 阅读全文