摘要: 题目链接 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个数字都构成匹配... 阅读全文
posted @ 2018-01-07 22:05 不想吃WA的咸鱼 阅读(73) 评论(0) 推荐(0) 编辑
摘要: Meeting point-1TimeLimit: 2000/1000 MS (Java/Others) Memory Limit:32768/32768 K (Java/Others)Total Submission(s): 3928 Accepted ... 阅读全文
posted @ 2018-01-06 23:40 不想吃WA的咸鱼 阅读(216) 评论(0) 推荐(0) 编辑
摘要: The King’sUps and DownsTime Limit: 2000/1000 MS(Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 758 A... 阅读全文
posted @ 2018-01-06 23:18 不想吃WA的咸鱼 阅读(189) 评论(0) 推荐(0) 编辑
摘要: Ancient GoTimeLimit: 3000/1000 MS (Java/Others) Memory Limit:65535/65535 K (Java/Others)Total Submission(s): 2952 Accepted Submi... 阅读全文
posted @ 2018-01-06 22:43 不想吃WA的咸鱼 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://vjudge.net/problem/UVALive-3027【题意】 并查集模板题,给定一组序列1-n(n using namespace std;const int maxn = 20050;int n;int par[maxn],... 阅读全文
posted @ 2018-01-06 22:15 不想吃WA的咸鱼 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://cn.vjudge.net/problem/UVA-11400【题意】 你的任务是设计一个照明系统,一共有n(n=c2时,上式>=下式,也就是说一定要拿单价小的灯泡把单价大的灯泡换掉。 对于第二条,想明白了这一点是dp的关键。就拿... 阅读全文
posted @ 2017-12-26 23:29 不想吃WA的咸鱼 阅读(128) 评论(0) 推荐(0) 编辑
摘要: As you may know from the comic “Asterix andthe Chieftain’s Shield”, Gergovia consists of one street, and every inhabitantof the city i... 阅读全文
posted @ 2017-12-26 22:46 不想吃WA的咸鱼 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 题目链接 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... 阅读全文
posted @ 2017-12-25 16:46 不想吃WA的咸鱼 阅读(94) 评论(0) 推荐(0) 编辑
摘要: You’ve been invited to a party. The hostwants to divide the guests into 2 teams for party games, with exactly the samenumber of guest... 阅读全文
posted @ 2017-12-24 23:12 不想吃WA的咸鱼 阅读(153) 评论(0) 推荐(0) 编辑
摘要: In this problem you are expected to counttwo-terminal series-parallel networks. These are electric networks consideredtopologically or... 阅读全文
posted @ 2017-12-24 14:06 不想吃WA的咸鱼 阅读(199) 评论(0) 推荐(0) 编辑