0_0_13805730_11868.cpp:3:77: error: 'priority_queue' does not name a type
const bool operator<(struct ss b) const { return a > b.a; };};priority_queue<ss>s[705];int a[101];
^
0_0_13805730_11868.cpp: In function 'int main()':
0_0_13805730_11868.cpp:5:55: error: 's' was not declared in this scope
for (i = 1; i <= 700; i++) while (!s[i].empty())s[i].pop(); for (i = 0; i < n; i++)scanf("%d", &a[i]); for (i = 1; i <= m; i++) scanf("%d %d", &x, &h.a), s[x].push(h); sort(a, a + n); t = 1; die = live = 0; while (die + live < m) { i = 0; while (i < n && s[t].size() > 0) { h = s[t].top(); if (h.a >= a[i]) { die++; i++; } else if (h.a - 1 >= a[0]) { h.a -= 1; s[t + 1].push(h); } else live++; s[t].pop(); } while (s[t].size() > 0) { h = s[t].top(), s[t].pop(); if (h.a - 1 >= a[0]) { h.a -= 1; s[t + 1].push(h); } else live++; } t++; } printf("%d\n", die); } return 0;}
^
0_0_13805730_11868.cpp:5:199: error: 's' was not declared in this scope
for (i = 1; i <= 700; i++) while (!s[i].empty())s[i].pop(); for (i = 0; i < n; i++)scanf("%d", &a[i]); for (i = 1; i <= m; i++) scanf("%d %d", &x, &h.a), s[x].push(h); sort(a, a + n); t = 1; die = live = 0; while (die + live < m) { i = 0; while (i < n && s[t].size() > 0) { h = s[t].top(); if (h.a >= a[i]) { die++; i++; } else if (h.a - 1 >= a[0]) { h.a -= 1; s[t + 1].push(h); } else live++; s[t].pop(); } while (s[t].size() > 0) { h = s[t].top(), s[t].pop(); if (h.a - 1 >= a[0]) { h.a -= 1; s[t + 1].push(h); } else live++; } t++; } printf("%d\n", die); } return 0;}
^
0_0_13805730_11868.cpp:5:233: error: 'sort' was not declared in this scope
for (i = 1; i <= 700; i++) while (!s[i].empty())s[i].pop(); for (i = 0; i < n; i++)scanf("%d", &a[i]); for (i = 1; i <= m; i++) scanf("%d %d", &x, &h.a), s[x].push(h); sort(a, a + n); t = 1; die = live = 0; while (die + live < m) { i = 0; while (i < n && s[t].size() > 0) { h = s[t].top(); if (h.a >= a[i]) { die++; i++; } else if (h.a - 1 >= a[0]) { h.a -= 1; s[t + 1].push(h); } else live++; s[t].pop(); } while (s[t].size() > 0) { h = s[t].top(), s[t].pop(); if (h.a - 1 >= a[0]) { h.a -= 1; s[t + 1].push(h); } else live++; } t++; } printf("%d\n", die); } return 0;}
^
0_0_13805730_11868.cpp:5:350: error: 's' was not declared in this scope
for (i = 1; i <= 700; i++) while (!s[i].empty())s[i].pop(); for (i = 0; i < n; i++)scanf("%d", &a[i]); for (i = 1; i <= m; i++) scanf("%d %d", &x, &h.a), s[x].push(h); sort(a, a + n); t = 1; die = live = 0; while (die + live < m) { i = 0; while (i < n && s[t].size() > 0) { h = s[t].top(); if (h.a >= a[i]) { die++; i++; } else if (h.a - 1 >= a[0]) { h.a -= 1; s[t + 1].push(h); } else live++; s[t].pop(); } while (s[t].size() > 0) { h = s[t].top(), s[t].pop(); if (h.a - 1 >= a[0]) { h.a -= 1; s[t + 1].push(h); } else live++; } t++; } printf("%d\n", die); } return 0;}
^
0_0_13805730_11868.cpp:5:716: error: 's' was not declared in this scope
for (i = 1; i <= 700; i++) while (!s[i].empty())s[i].pop(); for (i = 0; i < n; i++)scanf("%d", &a[i]); for (i = 1; i <= m; i++) scanf("%d %d", &x, &h.a), s[x].push(h); sort(a, a + n); t = 1; die = live = 0; while (die + live < m) { i = 0; while (i < n && s[t].size() > 0) { h = s[t].top(); if (h.a >= a[i]) { die++; i++; } else if (h.a - 1 >= a[0]) { h.a -= 1; s[t + 1].push(h); } else live++; s[t].pop(); } while (s[t].size() > 0) { h = s[t].top(), s[t].pop(); if (h.a - 1 >= a[0]) { h.a -= 1; s[t + 1].push(h); } else live++; } t++; } printf("%d\n", die); } return 0;}
^
|