2013年7月4日

EOJ 1047 Guardian of Decency

摘要: EOJ 1047 http://acm.cs.ecnu.edu.cn/problem.php?problemid=1047POJ 2771 http://poj.org/problem?id=2771二分匹配 不说了,直接上代码 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 10 #define MAXN 505 11 struct node 12 { 13 int h; 14 char ... 阅读全文

posted @ 2013-07-04 22:45 KimKyeYu 阅读(206) 评论(0) 推荐(0) 编辑

EOJ-1853 Mountain Walking

摘要: http://acm.cs.ecnu.edu.cn/problem.php?problemid=1853题意,从图的左上角走到图的右下角,寻找一条路径使得路径上的数字的MAX-MIN最小(不在意路径的长度)直接DFS剪枝比较难写(也感觉要T),看到差值最大为110,用二分枚举了差值(MAX-MIN)(从0到110),再枚举了图上的最小值。大意就是,先二分枚举差值m,再枚举图中可能的最小值a(从真·最小值到真·最大值),min=a,max=a+m。接着对起点DFS,看能否在min 2 #include 3 #include 4 #include 5 #include 6 #i 阅读全文

posted @ 2013-07-04 02:14 KimKyeYu 阅读(263) 评论(0) 推荐(0) 编辑

导航