夏夜、

心若平似镜、何题不AC。

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页

2014年3月19日

UVA 1146 Now or later 2-sat

摘要: //#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;typedef unsigned long long ull;typedef pair pii;#define pb(a) push(a)#define INF 阅读全文

posted @ 2014-03-19 23:20 BMan、 阅读(171) 评论(0) 推荐(0) 编辑

UVA 11324 The Largest Clique 强连通分量 DP

摘要: 找强连通分量,缩点,DP//#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;typedef unsigned long long ull;typedef pair pii;#define pb(a) push(a 阅读全文

posted @ 2014-03-19 23:19 BMan、 阅读(175) 评论(0) 推荐(0) 编辑

UVA 12167 Proving Equivalences 强连通分量

摘要: //#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;typedef unsigned long long ull;typedef pair pii;#define pb(a) push(a)#define INF 阅读全文

posted @ 2014-03-19 23:17 BMan、 阅读(199) 评论(0) 推荐(0) 编辑

UVA 1108 Mining Your Own Business 双连通分量 割点

摘要: 双连通分量://#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;typedef unsigned long long ull;typedef pair pii;#define pb(a) push(a)#defi 阅读全文

posted @ 2014-03-19 23:15 BMan、 阅读(296) 评论(0) 推荐(0) 编辑

UVA 1364 Knights of the Round Table 双连通分量+二分图判定

摘要: //#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;typedef unsigned long long ull;typedef pair pii;#define pb(a) push(a)#define INF 阅读全文

posted @ 2014-03-19 23:13 BMan、 阅读(272) 评论(0) 推荐(0) 编辑

2014年3月18日

POJ 2441 Arrange the Bulls 状态DP

摘要: //#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;typedef unsigned long long ull;typedef pair pii;#define pb(a) push(a)#define INF 阅读全文

posted @ 2014-03-18 18:34 BMan、 阅读(124) 评论(0) 推荐(0) 编辑

2014年3月12日

POJ 1769 Minimizing maximizer 线段树优化DP

摘要: 题意抽象出数学模型就是说“最少需要多少个区间能完全覆盖整个区间[1,n]”。一开始没看到“subsequence of the given sequence” ,直接排序,然后二分查找,居然1A。。充满了奇迹。AC后百度题解发现自己看错题也能AC,相当自豪!dp[i]表示覆盖[1,i]最少需要的区间数。那么对于某段区间[a,b],dp[b]=min(dp[a....b-1])+1;更新只需更新一点,不用一段。还有几个细节//#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#incl 阅读全文

posted @ 2014-03-12 17:13 BMan、 阅读(792) 评论(0) 推荐(0) 编辑

2014年3月11日

POJ 2686 Traveling by Stagecoach 状态DP

摘要: //#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;typedef unsigned long long ull;typedef pair pii;#define pb(a) push(a)#define INF 阅读全文

posted @ 2014-03-11 22:36 BMan、 阅读(171) 评论(0) 推荐(0) 编辑

2014年2月20日

usaco PROB Checker Challenge 搜索

摘要: 搜索的过程中用2进制保存状态,通过位运算判断可行性。//#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;typedef unsigned long long ull;typedef pair pii;#defin 阅读全文

posted @ 2014-02-20 19:18 BMan、 阅读(219) 评论(0) 推荐(0) 编辑

usaco Superprime Rib 搜索

摘要: 按位搜索//#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;typedef unsigned long long ull;typedef pair pii;#define pb(a) push(a)#define 阅读全文

posted @ 2014-02-20 18:37 BMan、 阅读(169) 评论(0) 推荐(0) 编辑

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页

导航