摘要: 转————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————— 阅读全文
posted @ 2015-08-09 10:56 Przz 阅读(303) 评论(0) 推荐(0) 编辑
摘要: 最短路问题 此类问题类型不多,变形较少 POJ 2449 Remmarguts' Date(中等) http://acm.pku.edu.cn/JudgeOnline/problem?id=2449 题意:经典问题:K短路 解法:dijkstra+A*(rec),方法很多 相关:http://acm 阅读全文
posted @ 2015-08-09 10:48 Przz 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 模板: int Extend_Euclid(int a, int b, int &x, int &y){ if(b == 0){ x = 1; y = 0; return a; } else{ int gcd,t; gcd = Extend_Euclid(b, a%b, x, y); t = x; 阅读全文
posted @ 2015-08-08 15:04 Przz 阅读(201) 评论(0) 推荐(0) 编辑
摘要: hdu2108 判断是否为凸边形 判断连续三点的叉乘 若为凸,内角<180;若为凹,内角>180 所以通过正负来判断 阅读全文
posted @ 2015-08-08 10:18 Przz 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Sample Input 143 10 143 20 667 20 667 30 2573 30 2573 40 0 0 143 10 143 20 667 20 667 30 2573 30 2573 40 0 0 Sample Output GOOD BAD 11 GOOD BAD 23 GOO 阅读全文
posted @ 2015-08-07 20:12 Przz 阅读(260) 评论(0) 推荐(0) 编辑
摘要: Sample Input 4 8 4 1 3 2 2 1 0 3 5 3 6 4 2 1 7 6 8 3 3 2 0 5 0 3 6 4 5 2 7 7 6 7 6 8 2 2 3 3 3 0 0 2 7 4 3 6 3 2 2 5 8 5 6 5 3 3 1 2 4 6 7 7 6 5 4 3 5 阅读全文
posted @ 2015-08-07 10:56 Przz 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Problem Description soda has a set S with n integers {1,2,…,n}. A set is called key set if the sum of integers in the set is an even number. He wants 阅读全文
posted @ 2015-08-06 20:09 Przz 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Each soda has some candies in their hand. And they want to make the number of candies the same by doing some taking and giving operations. More specif 阅读全文
posted @ 2015-08-06 19:42 Przz 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Problem Description As we all kown, MZL hates the endless loop deeply, and he commands you to solve this problem to end the loop. You are given an und 阅读全文
posted @ 2015-08-05 11:14 Przz 阅读(186) 评论(0) 推荐(0) 编辑
摘要: Problem Description MZL is a mysterious mathematician, and he proposed a mysterious function at his young age. Stilwell is very confused about this fu 阅读全文
posted @ 2015-08-04 22:33 Przz 阅读(193) 评论(0) 推荐(0) 编辑