锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲国产精品高清久久久,久久人人爽人人爽人人片AV麻烦,久久久久久国产精品无码下载http://m.shnenglu.com/superman/category/7098.html鑱氱簿浼氱鎼炲緩璁?涓蹇冧竴鎰忚皨鍙戝睍zh-cnWed, 28 May 2008 13:19:25 GMTWed, 28 May 2008 13:19:25 GMT60- POJ 3259 - Wormholeshttp://m.shnenglu.com/superman/archive/2008/05/28/51420.htmlsupermansupermanWed, 28 May 2008 10:00:00 GMThttp://m.shnenglu.com/superman/archive/2008/05/28/51420.htmlhttp://m.shnenglu.com/superman/comments/51420.htmlhttp://m.shnenglu.com/superman/archive/2008/05/28/51420.html#Feedback0http://m.shnenglu.com/superman/comments/commentRss/51420.htmlhttp://m.shnenglu.com/superman/services/trackbacks/51420.html 1 /* Accepted 476K 657MS G++ 1154B */
2 #include <iostream>
3
4 using namespace std;
5
6 int main()
7 {
8 int farm; cin >> farm;
9
10 while(farm--)
11 {
12 int n, m, w;
13 cin >> n >> m >> w;
14
15 int cnt = 0;
16 struct { int s, t, l; } e[5200];
17
18 int s, t, l;
19 for(int i = 0; i < m; i++)
20 {
21 cin >> s >> t >> l; s--, t--;
22 e[cnt].s = s, e[cnt].t = t, e[cnt].l = l, cnt++;
23 e[cnt].s = t, e[cnt].t = s, e[cnt].l = l, cnt++;
24 }
25 for(int i = 0; i < w; i++)
26 {
27 cin >> s >> t >> l; s--, t--, l = -l;
28 e[cnt].s = s, e[cnt].t = t, e[cnt].l = l, cnt++;
29 }
30
31 int d[500] = { 0 };
32
33 for(int k = 0; k < n - 1; k++)
34 for(int i = 0; i < cnt; i++)
35 d[e[i].t] <?= d[e[i].s] + e[i].l;
36
37 for(int i = 0; i < cnt; i++)
38 if(d[e[i].s] + e[i].l < d[e[i].t])
39 {
40 cout << "YES"; goto over;
41 }
42
43 cout << "NO";
44 over:
45 cout << endl;
46 }
47
48 return 0;
49 }
50

]]> - POJ 3264 - Balanced Lineuphttp://m.shnenglu.com/superman/archive/2008/05/25/51057.htmlsupermansupermanSun, 25 May 2008 08:07:00 GMThttp://m.shnenglu.com/superman/archive/2008/05/25/51057.htmlhttp://m.shnenglu.com/superman/comments/51057.htmlhttp://m.shnenglu.com/superman/archive/2008/05/25/51057.html#Feedback0http://m.shnenglu.com/superman/comments/commentRss/51057.htmlhttp://m.shnenglu.com/superman/services/trackbacks/51057.html 1 /* Accepted 6888K 3141MS G++ 1416B */
2 #include <math.h>
3 #include <iostream>
4
5 using namespace std;
6
7 int n, m;
8 int A[50000];
9 int MIN[50000][16];
10 int MAX[50000][16];
11
12 void init()
13 {
14 for(int i = 0; i < n; i++)
15 MIN[i][0] = MAX[i][0] = A[i];
16 for(int j = 1; 1 << j <= n; j++)
17 for(int i = 0; i + (1 << j) - 1 < n; i++)
18 {
19 if(MIN[i][j - 1] < MIN[i + (1 << (j - 1))][j - 1])
20 MIN[i][j] = MIN[i][j - 1];
21 else
22 MIN[i][j] = MIN[i + (1 << (j - 1))][j - 1];
23
24 if(MAX[i][j - 1] > MAX[i + (1 << (j - 1))][j - 1])
25 MAX[i][j] = MAX[i][j - 1];
26 else
27 MAX[i][j] = MAX[i + (1 << (j - 1))][j - 1];
28 }
29 }
30
31 int main()
32 {
33 scanf("%d %d", &n, &m);
34 for(int i = 0; i < n; i++)
35 scanf("%d", &A[i]);
36
37 //ST algorithm
38 init();
39
40 //deal with query
41 int s, t;
42 while(m--)
43 {
44 scanf("%d %d", &s, &t);
45 s--, t--;
46
47 int a, b, k = int(log(t - s + 1) / log(2));
48
49 if(MIN[s][k] < MIN[t - (1 << k) + 1][k])
50 a = MIN[s][k];
51 else
52 a = MIN[t - (1 << k) + 1][k];
53
54 if(MAX[s][k] > MAX[t - (1 << k) + 1][k])
55 b = MAX[s][k];
56 else
57 b = MAX[t - (1 << k) + 1][k];
58
59 cout << b - a << endl;
60 }
61
62 return 0;
63 }
64

]]> - POJ 2965 - The Pilots Brothers' refrigeratorhttp://m.shnenglu.com/superman/archive/2008/05/25/51014.htmlsupermansupermanSun, 25 May 2008 03:05:00 GMThttp://m.shnenglu.com/superman/archive/2008/05/25/51014.htmlhttp://m.shnenglu.com/superman/comments/51014.htmlhttp://m.shnenglu.com/superman/archive/2008/05/25/51014.html#Feedback0http://m.shnenglu.com/superman/comments/commentRss/51014.htmlhttp://m.shnenglu.com/superman/services/trackbacks/51014.html 1 /* Accepted 708K 907MS G++ 1904B */
2 #include <stack>
3 #include <queue>
4 #include <iostream>
5
6 using namespace std;
7
8 struct
9 {
10 unsigned short LastState;
11 char op;
12 }state[65536];
13
14 int main()
15 {
16 unsigned short InitState = 0;
17 for(int i = 0; i < 16; )
18 switch(getchar())
19 {
20 case '+' : InitState |= (1 << i); i++; continue;
21 case '-' : i++; continue;
22 }
23
24 for(int i = 0; i < 65536; i++)
25 state[i].op = -1;
26 state[InitState].op = -2;
27
28 queue <unsigned short> q;
29 q.push(InitState);
30
31 while(q.empty() == false)
32 {
33 unsigned short CurState = q.front(); q.pop();
34
35 if(state[0].op != -1)
36 break;
37
38 for(int i = 0; i < 16; i++)
39 {
40 unsigned short tmp = CurState;
41 tmp = tmp ^ (1 << i);
42
43 int p;
44
45 p = i - 4;
46 while(p >= 0) { tmp = tmp ^ (1 << p); p -= 4; }
47
48 p = i + 4;
49 while(p < 16) { tmp = tmp ^ (1 << p); p += 4; }
50
51 p = i / 4 * 4;
52 while(p < i) { tmp = tmp ^ (1 << p); p++; }
53
54 p = (i / 4 + 1) * 4 - 1;
55 while(p > i) { tmp = tmp ^ (1 << p); p--; }
56
57 if(state[tmp].op == -1)
58 {
59 state[tmp].LastState = CurState;
60 state[tmp].op = i;
61 q.push(tmp);
62 }
63 }
64 }
65
66 int p = 0;
67 stack <int> path;
68 while(state[p].op != -2)
69 {
70 path.push(state[p].op);
71 p = state[p].LastState;
72 }
73
74 cout << path.size() << endl;
75 while(path.empty() == false)
76 {
77 int x = path.top() / 4 + 1;
78 int y = path.top() % 4 + 1;
79 cout << x << ' ' << y << endl;
80 path.pop();
81 }
82
83 return 0;
84 }
85

]]> - POJ 3273 - Monthly Expensehttp://m.shnenglu.com/superman/archive/2008/05/20/50497.htmlsupermansupermanTue, 20 May 2008 01:58:00 GMThttp://m.shnenglu.com/superman/archive/2008/05/20/50497.htmlhttp://m.shnenglu.com/superman/comments/50497.htmlhttp://m.shnenglu.com/superman/archive/2008/05/20/50497.html#Feedback0http://m.shnenglu.com/superman/comments/commentRss/50497.htmlhttp://m.shnenglu.com/superman/services/trackbacks/50497.html 1 /* Accepted 816K 829MS G++ 899B */
2 #include <iostream>
3
4 using namespace std;
5
6 int main()
7 {
8 int n, m, x[100000];
9
10 cin >> n >> m;
11 for(int i = 0; i < n; i++)
12 cin >> x[i];
13
14 int sum = 0;
15 for(int i = 0; i < n; i++)
16 sum += x[i];
17
18 int l = 0, r = sum;
19 while(l + 1 < r)
20 {
21 int mid = (l + r) / 2;
22
23 int i, cnt = 0, left = mid;
24
25 for(i = 0; i < n && cnt < m; i++)
26 {
27 if(x[i] > mid)
28 break;
29 if(left - x[i] >= 0)
30 left -= x[i];
31 else
32 {
33 cnt++;
34 left = mid - x[i];
35 }
36 }
37
38 if(i == n)
39 r = mid;
40 else
41 l = mid;
42 }
43
44 cout << r << endl;
45
46 return 0;
47 }
48

]]>
国产精品欧美久久久久无广告
|
久久精品国产99久久丝袜|
久久婷婷国产麻豆91天堂|
久久精品中文字幕久久|
亚洲欧美一级久久精品|
精品久久无码中文字幕|
久久亚洲国产成人影院网站|
性色欲网站人妻丰满中文久久不卡|
91久久婷婷国产综合精品青草|
久久精品成人免费国产片小草
|
9久久9久久精品|
亚洲伊人久久综合中文成人网|
蜜臀久久99精品久久久久久小说|
国产精品免费久久久久久久久
|
中文字幕久久精品无码|
国产成人精品久久综合|
久久99精品久久久久久hb无码|
久久久久亚洲AV无码去区首|
久久精品国产一区二区三区日韩|
久久精品夜色噜噜亚洲A∨|
久久综合给合久久狠狠狠97色69
|
99精品久久精品一区二区|
国产成人综合久久精品尤物|
久久久精品人妻一区二区三区四|
亚洲国产一成久久精品国产成人综合|
国产精品美女久久久久|
人妻系列无码专区久久五月天|
久久亚洲国产欧洲精品一|
久久99精品久久久久子伦|
97精品依人久久久大香线蕉97|
青青草国产97免久久费观看|
久久精品成人一区二区三区|
国产精品热久久毛片|
国产精品日韩深夜福利久久|
93精91精品国产综合久久香蕉|
国产精品99久久免费观看|
国内精品久久久久久99蜜桃|
久久99精品久久久久子伦|
国产精品九九九久久九九|
女人香蕉久久**毛片精品|
欧美伊香蕉久久综合类网站|