08 2013 档案

摘要:http://poj.org/problem?id=1273网络流,Dinic 1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 const int inf = 1 que; 33 bool vis[maxn + 10]; 34 int dist[maxn + 10]; 35 36 void bfs() 37 { 38 memset(dist, 0, sizeof(dist)); 39 while(!que.empty()) 40 { 41 que.pop... 阅读全文
posted @ 2013-08-04 18:24 Yuan1991 阅读(147) 评论(0) 推荐(0)
摘要:http://poj.org/problem?id=3277线段树,离散化,成段更新 1 #include 2 #include 3 4 #define lson l, m, rooty? x: y; 15 } 16 17 void push_up(long long root) 18 { 19 max1[root] = max(max1[root> 1; 41 build(lson); 42 build(rson); 43 push_up(root); 44 } 45 46 void update(long long L, long long... 阅读全文
posted @ 2013-08-03 20:59 Yuan1991 阅读(251) 评论(0) 推荐(0)