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...
阅读全文
摘要: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...
阅读全文

浙公网安备 33010602011771号