#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx,popcnt,sse4,abm")
#include <bits/stdc++.h>
using namespace std;
#ifdef WAIMAI
#define debug(HEHE...) cout << "[" << #HEHE << "] : ", dout(HEHE)
void dout() {cout << '\n';}
template<typename T, typename...U>
void dout (T t, U...u) {cout << t << (sizeof... (u) ? ", " : ""), dout (u...);}
#else
#define debug(...) 7122
#endif
#define ll long long
#define Waimai ios::sync_with_stdio(false), cin.tie(0)
#define FOR(x,a,b) for (int x = a, I = b; x <= I; x++)
#define pb emplace_back
#define F first
#define S second
#define lpos pos*2
#define rpos pos*2+1
// Merge(d1, a1), (d2, a2) => (d1 + max(d2-a1, 0), a2 + max(a1-d2, 0))
const int SIZE = 2.5e5 + 5;
int n, m, q;
int ans[SIZE];
vector<pair<ll, int>> ask[SIZE]; // ask[p] : (x, id)
vector<tuple<int, int, int>> add[SIZE]; // add[p] : (c, k, id)
vector<pair<int, int>> del[SIZE]; // del[p] : (k, id)
struct Segtree1 {
struct Node {
ll d, a;
Node operator + (const Node& rhs) const {
Node re;
re.d = d + max(rhs.d - a, 0ll);
re.a = rhs.a + max(a - rhs.d, 0ll);
return re;
}
} node[4 * SIZE];
void upd(int pos, int l, int r, int p, int ty, int x) {
if (l == r) {
if (ty == 1) node[pos].a += x;
if (ty == 2) node[pos].d += x;
return;
}
int mid = (l + r) / 2;
if (p <= mid) upd(lpos, l, mid, p, ty, x);
else upd(rpos, mid + 1, r, p, ty, x);
node[pos] = node[lpos] + node[rpos];
}
Node que(int pos, int l, int r, int L, int R) {
if (l == L && r == R) return node[pos];
int mid = (L + R) / 2;
if (r <= mid) return que(lpos, l, r, L, mid);
if (l > mid) return que(rpos, l, r, mid + 1, R);
return que(lpos, l, mid, L, mid) + que(rpos, mid + 1, r, mid + 1, R);
}
} sgt1;
struct Segtree2 {
int g[SIZE];
ll sum[4 * SIZE];
void upd(int pos, int l, int r, int p, int c, int x) {
if (l == r) {
g[p] = c;
sum[pos] += x;
return;
}
int mid = (l + r) / 2;
if (p <= mid) upd(lpos, l, mid, p, c, x);
else upd(rpos, mid + 1, r, p, c, x);
sum[pos] = sum[lpos] + sum[rpos];
}
ll que(int pos, int l, int r, int L, int R) {
if (l == L && r == R) return sum[pos];
int mid = (L + R) / 2;
if (r <= mid) return que(lpos, l, r, L, mid);
if (l > mid) return que(rpos, l, r, mid + 1, R);
return que(lpos, l, mid, L, mid) + que(rpos, mid + 1, r, mid + 1, R);
}
int sch(int pos, int l, int r, ll x) {
if (l == r) return g[l];
int mid = (l + r) / 2;
if (sum[lpos] >= x) return sch(lpos, l, mid, x);
else return sch(rpos, mid + 1, r, x - sum[lpos]);
}
} sgt2;
void solve() {
cin >> n >> m >> q;
FOR (i, 1, q) {
ans[i] = -1;
int t, l, r, c, k;
cin >> t;
if (t == 1) {
cin >> l >> r >> c >> k;
add[l].pb(c, k, i);
add[r + 1].pb(0, -k, i);
}
if (t == 2) {
cin >> l >> r >> k;
del[l].pb(k, i);
del[r + 1].pb(-k, i);
}
if (t == 3) {
int p;
ll x;
cin >> p >> x;
ask[p].pb(x, i);
}
}
FOR (i, 1, n) {
for (auto [c, k, id] : add[i]) {
sgt1.upd(1, 1, q, id, 1, k);
sgt2.upd(1, 1, q, id, c, k);
}
for (auto [k, id] : del[i]) {
sgt1.upd(1, 1, q, id, 2, k);
}
for (auto [p, id] : ask[i]) {
ll tot = sgt2.que(1, 1, id, 1, q);
ll cur = sgt1.que(1, 1, id, 1, q).a;
if (p > cur) ans[id] = 0;
else ans[id] = sgt2.sch(1, 1, q, tot - cur + p);
}
}
FOR (i, 1, q) if (ans[i] != -1) cout << ans[i] << '\n';
}
int main() {
Waimai;
solve();
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
12 ms |
18132 KB |
Output is correct |
2 |
Correct |
13 ms |
18120 KB |
Output is correct |
3 |
Correct |
12 ms |
18144 KB |
Output is correct |
4 |
Correct |
13 ms |
18088 KB |
Output is correct |
5 |
Correct |
12 ms |
18080 KB |
Output is correct |
6 |
Correct |
14 ms |
18132 KB |
Output is correct |
7 |
Correct |
12 ms |
18132 KB |
Output is correct |
8 |
Correct |
12 ms |
18124 KB |
Output is correct |
9 |
Correct |
12 ms |
18180 KB |
Output is correct |
10 |
Correct |
11 ms |
18136 KB |
Output is correct |
11 |
Correct |
13 ms |
18140 KB |
Output is correct |
12 |
Correct |
12 ms |
18092 KB |
Output is correct |
13 |
Correct |
12 ms |
18076 KB |
Output is correct |
14 |
Correct |
15 ms |
18180 KB |
Output is correct |
15 |
Correct |
12 ms |
18124 KB |
Output is correct |
16 |
Correct |
12 ms |
18084 KB |
Output is correct |
17 |
Correct |
12 ms |
18060 KB |
Output is correct |
18 |
Correct |
12 ms |
18148 KB |
Output is correct |
19 |
Correct |
12 ms |
18084 KB |
Output is correct |
20 |
Correct |
13 ms |
18132 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
12 ms |
18132 KB |
Output is correct |
2 |
Correct |
13 ms |
18120 KB |
Output is correct |
3 |
Correct |
12 ms |
18144 KB |
Output is correct |
4 |
Correct |
13 ms |
18088 KB |
Output is correct |
5 |
Correct |
12 ms |
18080 KB |
Output is correct |
6 |
Correct |
14 ms |
18132 KB |
Output is correct |
7 |
Correct |
12 ms |
18132 KB |
Output is correct |
8 |
Correct |
12 ms |
18124 KB |
Output is correct |
9 |
Correct |
12 ms |
18180 KB |
Output is correct |
10 |
Correct |
11 ms |
18136 KB |
Output is correct |
11 |
Correct |
13 ms |
18140 KB |
Output is correct |
12 |
Correct |
12 ms |
18092 KB |
Output is correct |
13 |
Correct |
12 ms |
18076 KB |
Output is correct |
14 |
Correct |
15 ms |
18180 KB |
Output is correct |
15 |
Correct |
12 ms |
18124 KB |
Output is correct |
16 |
Correct |
12 ms |
18084 KB |
Output is correct |
17 |
Correct |
12 ms |
18060 KB |
Output is correct |
18 |
Correct |
12 ms |
18148 KB |
Output is correct |
19 |
Correct |
12 ms |
18084 KB |
Output is correct |
20 |
Correct |
13 ms |
18132 KB |
Output is correct |
21 |
Correct |
13 ms |
18196 KB |
Output is correct |
22 |
Correct |
16 ms |
18096 KB |
Output is correct |
23 |
Correct |
12 ms |
18148 KB |
Output is correct |
24 |
Correct |
13 ms |
18212 KB |
Output is correct |
25 |
Correct |
14 ms |
18132 KB |
Output is correct |
26 |
Correct |
11 ms |
18092 KB |
Output is correct |
27 |
Correct |
12 ms |
18092 KB |
Output is correct |
28 |
Correct |
11 ms |
18084 KB |
Output is correct |
29 |
Correct |
12 ms |
18132 KB |
Output is correct |
30 |
Correct |
12 ms |
18164 KB |
Output is correct |
31 |
Correct |
12 ms |
18208 KB |
Output is correct |
32 |
Correct |
12 ms |
18084 KB |
Output is correct |
33 |
Correct |
13 ms |
18084 KB |
Output is correct |
34 |
Correct |
12 ms |
18128 KB |
Output is correct |
35 |
Correct |
12 ms |
18084 KB |
Output is correct |
36 |
Correct |
13 ms |
18088 KB |
Output is correct |
37 |
Correct |
13 ms |
18060 KB |
Output is correct |
38 |
Correct |
14 ms |
18088 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
80 ms |
25396 KB |
Output is correct |
2 |
Correct |
84 ms |
25536 KB |
Output is correct |
3 |
Correct |
81 ms |
25364 KB |
Output is correct |
4 |
Correct |
96 ms |
25420 KB |
Output is correct |
5 |
Correct |
113 ms |
25548 KB |
Output is correct |
6 |
Correct |
79 ms |
25468 KB |
Output is correct |
7 |
Correct |
37 ms |
23592 KB |
Output is correct |
8 |
Correct |
43 ms |
23832 KB |
Output is correct |
9 |
Correct |
81 ms |
25108 KB |
Output is correct |
10 |
Correct |
111 ms |
25540 KB |
Output is correct |
11 |
Correct |
85 ms |
25372 KB |
Output is correct |
12 |
Correct |
74 ms |
25452 KB |
Output is correct |
13 |
Correct |
69 ms |
24716 KB |
Output is correct |
14 |
Correct |
81 ms |
25272 KB |
Output is correct |
15 |
Correct |
101 ms |
25164 KB |
Output is correct |
16 |
Correct |
86 ms |
25396 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
370 ms |
47092 KB |
Output is correct |
2 |
Correct |
310 ms |
43760 KB |
Output is correct |
3 |
Correct |
393 ms |
48736 KB |
Output is correct |
4 |
Correct |
327 ms |
44184 KB |
Output is correct |
5 |
Correct |
319 ms |
44120 KB |
Output is correct |
6 |
Correct |
452 ms |
49084 KB |
Output is correct |
7 |
Correct |
152 ms |
41892 KB |
Output is correct |
8 |
Correct |
148 ms |
41612 KB |
Output is correct |
9 |
Correct |
408 ms |
47700 KB |
Output is correct |
10 |
Correct |
450 ms |
47788 KB |
Output is correct |
11 |
Correct |
382 ms |
46412 KB |
Output is correct |
12 |
Correct |
401 ms |
48900 KB |
Output is correct |
13 |
Correct |
409 ms |
46640 KB |
Output is correct |
14 |
Correct |
400 ms |
48824 KB |
Output is correct |
15 |
Correct |
442 ms |
48772 KB |
Output is correct |
16 |
Correct |
409 ms |
48772 KB |
Output is correct |
17 |
Correct |
438 ms |
48692 KB |
Output is correct |
18 |
Correct |
402 ms |
47628 KB |
Output is correct |
19 |
Correct |
414 ms |
48760 KB |
Output is correct |
20 |
Correct |
478 ms |
47916 KB |
Output is correct |
21 |
Correct |
410 ms |
48788 KB |
Output is correct |
22 |
Correct |
469 ms |
48716 KB |
Output is correct |
23 |
Correct |
413 ms |
48788 KB |
Output is correct |
24 |
Correct |
435 ms |
48768 KB |
Output is correct |
25 |
Correct |
330 ms |
45692 KB |
Output is correct |
26 |
Correct |
314 ms |
46092 KB |
Output is correct |
27 |
Correct |
304 ms |
47624 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
12 ms |
18132 KB |
Output is correct |
2 |
Correct |
13 ms |
18120 KB |
Output is correct |
3 |
Correct |
12 ms |
18144 KB |
Output is correct |
4 |
Correct |
13 ms |
18088 KB |
Output is correct |
5 |
Correct |
12 ms |
18080 KB |
Output is correct |
6 |
Correct |
14 ms |
18132 KB |
Output is correct |
7 |
Correct |
12 ms |
18132 KB |
Output is correct |
8 |
Correct |
12 ms |
18124 KB |
Output is correct |
9 |
Correct |
12 ms |
18180 KB |
Output is correct |
10 |
Correct |
11 ms |
18136 KB |
Output is correct |
11 |
Correct |
13 ms |
18140 KB |
Output is correct |
12 |
Correct |
12 ms |
18092 KB |
Output is correct |
13 |
Correct |
12 ms |
18076 KB |
Output is correct |
14 |
Correct |
15 ms |
18180 KB |
Output is correct |
15 |
Correct |
12 ms |
18124 KB |
Output is correct |
16 |
Correct |
12 ms |
18084 KB |
Output is correct |
17 |
Correct |
12 ms |
18060 KB |
Output is correct |
18 |
Correct |
12 ms |
18148 KB |
Output is correct |
19 |
Correct |
12 ms |
18084 KB |
Output is correct |
20 |
Correct |
13 ms |
18132 KB |
Output is correct |
21 |
Correct |
80 ms |
25396 KB |
Output is correct |
22 |
Correct |
84 ms |
25536 KB |
Output is correct |
23 |
Correct |
81 ms |
25364 KB |
Output is correct |
24 |
Correct |
96 ms |
25420 KB |
Output is correct |
25 |
Correct |
113 ms |
25548 KB |
Output is correct |
26 |
Correct |
79 ms |
25468 KB |
Output is correct |
27 |
Correct |
37 ms |
23592 KB |
Output is correct |
28 |
Correct |
43 ms |
23832 KB |
Output is correct |
29 |
Correct |
81 ms |
25108 KB |
Output is correct |
30 |
Correct |
111 ms |
25540 KB |
Output is correct |
31 |
Correct |
85 ms |
25372 KB |
Output is correct |
32 |
Correct |
74 ms |
25452 KB |
Output is correct |
33 |
Correct |
69 ms |
24716 KB |
Output is correct |
34 |
Correct |
81 ms |
25272 KB |
Output is correct |
35 |
Correct |
101 ms |
25164 KB |
Output is correct |
36 |
Correct |
86 ms |
25396 KB |
Output is correct |
37 |
Correct |
76 ms |
24824 KB |
Output is correct |
38 |
Correct |
79 ms |
24544 KB |
Output is correct |
39 |
Correct |
33 ms |
23136 KB |
Output is correct |
40 |
Correct |
39 ms |
23624 KB |
Output is correct |
41 |
Correct |
86 ms |
24812 KB |
Output is correct |
42 |
Correct |
96 ms |
25344 KB |
Output is correct |
43 |
Correct |
112 ms |
25372 KB |
Output is correct |
44 |
Correct |
91 ms |
25040 KB |
Output is correct |
45 |
Correct |
79 ms |
25340 KB |
Output is correct |
46 |
Correct |
76 ms |
25380 KB |
Output is correct |
47 |
Correct |
61 ms |
24088 KB |
Output is correct |
48 |
Correct |
77 ms |
24608 KB |
Output is correct |
49 |
Correct |
75 ms |
24088 KB |
Output is correct |
50 |
Correct |
92 ms |
24860 KB |
Output is correct |
51 |
Correct |
82 ms |
25404 KB |
Output is correct |
52 |
Correct |
88 ms |
25364 KB |
Output is correct |
53 |
Correct |
89 ms |
24480 KB |
Output is correct |
54 |
Correct |
85 ms |
25384 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
84 ms |
25212 KB |
Output is correct |
2 |
Correct |
85 ms |
25544 KB |
Output is correct |
3 |
Correct |
91 ms |
25680 KB |
Output is correct |
4 |
Correct |
75 ms |
24372 KB |
Output is correct |
5 |
Correct |
72 ms |
25072 KB |
Output is correct |
6 |
Correct |
91 ms |
25576 KB |
Output is correct |
7 |
Correct |
47 ms |
24020 KB |
Output is correct |
8 |
Correct |
50 ms |
23836 KB |
Output is correct |
9 |
Correct |
74 ms |
24928 KB |
Output is correct |
10 |
Correct |
58 ms |
24000 KB |
Output is correct |
11 |
Correct |
74 ms |
25208 KB |
Output is correct |
12 |
Correct |
93 ms |
25168 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
12 ms |
18132 KB |
Output is correct |
2 |
Correct |
13 ms |
18120 KB |
Output is correct |
3 |
Correct |
12 ms |
18144 KB |
Output is correct |
4 |
Correct |
13 ms |
18088 KB |
Output is correct |
5 |
Correct |
12 ms |
18080 KB |
Output is correct |
6 |
Correct |
14 ms |
18132 KB |
Output is correct |
7 |
Correct |
12 ms |
18132 KB |
Output is correct |
8 |
Correct |
12 ms |
18124 KB |
Output is correct |
9 |
Correct |
12 ms |
18180 KB |
Output is correct |
10 |
Correct |
11 ms |
18136 KB |
Output is correct |
11 |
Correct |
13 ms |
18140 KB |
Output is correct |
12 |
Correct |
12 ms |
18092 KB |
Output is correct |
13 |
Correct |
12 ms |
18076 KB |
Output is correct |
14 |
Correct |
15 ms |
18180 KB |
Output is correct |
15 |
Correct |
12 ms |
18124 KB |
Output is correct |
16 |
Correct |
12 ms |
18084 KB |
Output is correct |
17 |
Correct |
12 ms |
18060 KB |
Output is correct |
18 |
Correct |
12 ms |
18148 KB |
Output is correct |
19 |
Correct |
12 ms |
18084 KB |
Output is correct |
20 |
Correct |
13 ms |
18132 KB |
Output is correct |
21 |
Correct |
13 ms |
18196 KB |
Output is correct |
22 |
Correct |
16 ms |
18096 KB |
Output is correct |
23 |
Correct |
12 ms |
18148 KB |
Output is correct |
24 |
Correct |
13 ms |
18212 KB |
Output is correct |
25 |
Correct |
14 ms |
18132 KB |
Output is correct |
26 |
Correct |
11 ms |
18092 KB |
Output is correct |
27 |
Correct |
12 ms |
18092 KB |
Output is correct |
28 |
Correct |
11 ms |
18084 KB |
Output is correct |
29 |
Correct |
12 ms |
18132 KB |
Output is correct |
30 |
Correct |
12 ms |
18164 KB |
Output is correct |
31 |
Correct |
12 ms |
18208 KB |
Output is correct |
32 |
Correct |
12 ms |
18084 KB |
Output is correct |
33 |
Correct |
13 ms |
18084 KB |
Output is correct |
34 |
Correct |
12 ms |
18128 KB |
Output is correct |
35 |
Correct |
12 ms |
18084 KB |
Output is correct |
36 |
Correct |
13 ms |
18088 KB |
Output is correct |
37 |
Correct |
13 ms |
18060 KB |
Output is correct |
38 |
Correct |
14 ms |
18088 KB |
Output is correct |
39 |
Correct |
80 ms |
25396 KB |
Output is correct |
40 |
Correct |
84 ms |
25536 KB |
Output is correct |
41 |
Correct |
81 ms |
25364 KB |
Output is correct |
42 |
Correct |
96 ms |
25420 KB |
Output is correct |
43 |
Correct |
113 ms |
25548 KB |
Output is correct |
44 |
Correct |
79 ms |
25468 KB |
Output is correct |
45 |
Correct |
37 ms |
23592 KB |
Output is correct |
46 |
Correct |
43 ms |
23832 KB |
Output is correct |
47 |
Correct |
81 ms |
25108 KB |
Output is correct |
48 |
Correct |
111 ms |
25540 KB |
Output is correct |
49 |
Correct |
85 ms |
25372 KB |
Output is correct |
50 |
Correct |
74 ms |
25452 KB |
Output is correct |
51 |
Correct |
69 ms |
24716 KB |
Output is correct |
52 |
Correct |
81 ms |
25272 KB |
Output is correct |
53 |
Correct |
101 ms |
25164 KB |
Output is correct |
54 |
Correct |
86 ms |
25396 KB |
Output is correct |
55 |
Correct |
76 ms |
24824 KB |
Output is correct |
56 |
Correct |
79 ms |
24544 KB |
Output is correct |
57 |
Correct |
33 ms |
23136 KB |
Output is correct |
58 |
Correct |
39 ms |
23624 KB |
Output is correct |
59 |
Correct |
86 ms |
24812 KB |
Output is correct |
60 |
Correct |
96 ms |
25344 KB |
Output is correct |
61 |
Correct |
112 ms |
25372 KB |
Output is correct |
62 |
Correct |
91 ms |
25040 KB |
Output is correct |
63 |
Correct |
79 ms |
25340 KB |
Output is correct |
64 |
Correct |
76 ms |
25380 KB |
Output is correct |
65 |
Correct |
61 ms |
24088 KB |
Output is correct |
66 |
Correct |
77 ms |
24608 KB |
Output is correct |
67 |
Correct |
75 ms |
24088 KB |
Output is correct |
68 |
Correct |
92 ms |
24860 KB |
Output is correct |
69 |
Correct |
82 ms |
25404 KB |
Output is correct |
70 |
Correct |
88 ms |
25364 KB |
Output is correct |
71 |
Correct |
89 ms |
24480 KB |
Output is correct |
72 |
Correct |
85 ms |
25384 KB |
Output is correct |
73 |
Correct |
84 ms |
25212 KB |
Output is correct |
74 |
Correct |
85 ms |
25544 KB |
Output is correct |
75 |
Correct |
91 ms |
25680 KB |
Output is correct |
76 |
Correct |
75 ms |
24372 KB |
Output is correct |
77 |
Correct |
72 ms |
25072 KB |
Output is correct |
78 |
Correct |
91 ms |
25576 KB |
Output is correct |
79 |
Correct |
47 ms |
24020 KB |
Output is correct |
80 |
Correct |
50 ms |
23836 KB |
Output is correct |
81 |
Correct |
74 ms |
24928 KB |
Output is correct |
82 |
Correct |
58 ms |
24000 KB |
Output is correct |
83 |
Correct |
74 ms |
25208 KB |
Output is correct |
84 |
Correct |
93 ms |
25168 KB |
Output is correct |
85 |
Correct |
79 ms |
25292 KB |
Output is correct |
86 |
Correct |
117 ms |
25792 KB |
Output is correct |
87 |
Correct |
94 ms |
25356 KB |
Output is correct |
88 |
Correct |
106 ms |
25912 KB |
Output is correct |
89 |
Correct |
60 ms |
23752 KB |
Output is correct |
90 |
Correct |
83 ms |
25852 KB |
Output is correct |
91 |
Correct |
80 ms |
24892 KB |
Output is correct |
92 |
Correct |
80 ms |
24760 KB |
Output is correct |
93 |
Correct |
89 ms |
25832 KB |
Output is correct |
94 |
Correct |
89 ms |
25544 KB |
Output is correct |
95 |
Correct |
83 ms |
25772 KB |
Output is correct |
96 |
Correct |
88 ms |
25868 KB |
Output is correct |
97 |
Correct |
100 ms |
25880 KB |
Output is correct |
98 |
Correct |
80 ms |
25048 KB |
Output is correct |
99 |
Correct |
52 ms |
24464 KB |
Output is correct |
100 |
Correct |
71 ms |
24356 KB |
Output is correct |
101 |
Correct |
76 ms |
25112 KB |
Output is correct |
102 |
Correct |
78 ms |
25668 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
12 ms |
18132 KB |
Output is correct |
2 |
Correct |
13 ms |
18120 KB |
Output is correct |
3 |
Correct |
12 ms |
18144 KB |
Output is correct |
4 |
Correct |
13 ms |
18088 KB |
Output is correct |
5 |
Correct |
12 ms |
18080 KB |
Output is correct |
6 |
Correct |
14 ms |
18132 KB |
Output is correct |
7 |
Correct |
12 ms |
18132 KB |
Output is correct |
8 |
Correct |
12 ms |
18124 KB |
Output is correct |
9 |
Correct |
12 ms |
18180 KB |
Output is correct |
10 |
Correct |
11 ms |
18136 KB |
Output is correct |
11 |
Correct |
13 ms |
18140 KB |
Output is correct |
12 |
Correct |
12 ms |
18092 KB |
Output is correct |
13 |
Correct |
12 ms |
18076 KB |
Output is correct |
14 |
Correct |
15 ms |
18180 KB |
Output is correct |
15 |
Correct |
12 ms |
18124 KB |
Output is correct |
16 |
Correct |
12 ms |
18084 KB |
Output is correct |
17 |
Correct |
12 ms |
18060 KB |
Output is correct |
18 |
Correct |
12 ms |
18148 KB |
Output is correct |
19 |
Correct |
12 ms |
18084 KB |
Output is correct |
20 |
Correct |
13 ms |
18132 KB |
Output is correct |
21 |
Correct |
13 ms |
18196 KB |
Output is correct |
22 |
Correct |
16 ms |
18096 KB |
Output is correct |
23 |
Correct |
12 ms |
18148 KB |
Output is correct |
24 |
Correct |
13 ms |
18212 KB |
Output is correct |
25 |
Correct |
14 ms |
18132 KB |
Output is correct |
26 |
Correct |
11 ms |
18092 KB |
Output is correct |
27 |
Correct |
12 ms |
18092 KB |
Output is correct |
28 |
Correct |
11 ms |
18084 KB |
Output is correct |
29 |
Correct |
12 ms |
18132 KB |
Output is correct |
30 |
Correct |
12 ms |
18164 KB |
Output is correct |
31 |
Correct |
12 ms |
18208 KB |
Output is correct |
32 |
Correct |
12 ms |
18084 KB |
Output is correct |
33 |
Correct |
13 ms |
18084 KB |
Output is correct |
34 |
Correct |
12 ms |
18128 KB |
Output is correct |
35 |
Correct |
12 ms |
18084 KB |
Output is correct |
36 |
Correct |
13 ms |
18088 KB |
Output is correct |
37 |
Correct |
13 ms |
18060 KB |
Output is correct |
38 |
Correct |
14 ms |
18088 KB |
Output is correct |
39 |
Correct |
80 ms |
25396 KB |
Output is correct |
40 |
Correct |
84 ms |
25536 KB |
Output is correct |
41 |
Correct |
81 ms |
25364 KB |
Output is correct |
42 |
Correct |
96 ms |
25420 KB |
Output is correct |
43 |
Correct |
113 ms |
25548 KB |
Output is correct |
44 |
Correct |
79 ms |
25468 KB |
Output is correct |
45 |
Correct |
37 ms |
23592 KB |
Output is correct |
46 |
Correct |
43 ms |
23832 KB |
Output is correct |
47 |
Correct |
81 ms |
25108 KB |
Output is correct |
48 |
Correct |
111 ms |
25540 KB |
Output is correct |
49 |
Correct |
85 ms |
25372 KB |
Output is correct |
50 |
Correct |
74 ms |
25452 KB |
Output is correct |
51 |
Correct |
69 ms |
24716 KB |
Output is correct |
52 |
Correct |
81 ms |
25272 KB |
Output is correct |
53 |
Correct |
101 ms |
25164 KB |
Output is correct |
54 |
Correct |
86 ms |
25396 KB |
Output is correct |
55 |
Correct |
370 ms |
47092 KB |
Output is correct |
56 |
Correct |
310 ms |
43760 KB |
Output is correct |
57 |
Correct |
393 ms |
48736 KB |
Output is correct |
58 |
Correct |
327 ms |
44184 KB |
Output is correct |
59 |
Correct |
319 ms |
44120 KB |
Output is correct |
60 |
Correct |
452 ms |
49084 KB |
Output is correct |
61 |
Correct |
152 ms |
41892 KB |
Output is correct |
62 |
Correct |
148 ms |
41612 KB |
Output is correct |
63 |
Correct |
408 ms |
47700 KB |
Output is correct |
64 |
Correct |
450 ms |
47788 KB |
Output is correct |
65 |
Correct |
382 ms |
46412 KB |
Output is correct |
66 |
Correct |
401 ms |
48900 KB |
Output is correct |
67 |
Correct |
409 ms |
46640 KB |
Output is correct |
68 |
Correct |
400 ms |
48824 KB |
Output is correct |
69 |
Correct |
442 ms |
48772 KB |
Output is correct |
70 |
Correct |
409 ms |
48772 KB |
Output is correct |
71 |
Correct |
438 ms |
48692 KB |
Output is correct |
72 |
Correct |
402 ms |
47628 KB |
Output is correct |
73 |
Correct |
414 ms |
48760 KB |
Output is correct |
74 |
Correct |
478 ms |
47916 KB |
Output is correct |
75 |
Correct |
410 ms |
48788 KB |
Output is correct |
76 |
Correct |
469 ms |
48716 KB |
Output is correct |
77 |
Correct |
413 ms |
48788 KB |
Output is correct |
78 |
Correct |
435 ms |
48768 KB |
Output is correct |
79 |
Correct |
330 ms |
45692 KB |
Output is correct |
80 |
Correct |
314 ms |
46092 KB |
Output is correct |
81 |
Correct |
304 ms |
47624 KB |
Output is correct |
82 |
Correct |
76 ms |
24824 KB |
Output is correct |
83 |
Correct |
79 ms |
24544 KB |
Output is correct |
84 |
Correct |
33 ms |
23136 KB |
Output is correct |
85 |
Correct |
39 ms |
23624 KB |
Output is correct |
86 |
Correct |
86 ms |
24812 KB |
Output is correct |
87 |
Correct |
96 ms |
25344 KB |
Output is correct |
88 |
Correct |
112 ms |
25372 KB |
Output is correct |
89 |
Correct |
91 ms |
25040 KB |
Output is correct |
90 |
Correct |
79 ms |
25340 KB |
Output is correct |
91 |
Correct |
76 ms |
25380 KB |
Output is correct |
92 |
Correct |
61 ms |
24088 KB |
Output is correct |
93 |
Correct |
77 ms |
24608 KB |
Output is correct |
94 |
Correct |
75 ms |
24088 KB |
Output is correct |
95 |
Correct |
92 ms |
24860 KB |
Output is correct |
96 |
Correct |
82 ms |
25404 KB |
Output is correct |
97 |
Correct |
88 ms |
25364 KB |
Output is correct |
98 |
Correct |
89 ms |
24480 KB |
Output is correct |
99 |
Correct |
85 ms |
25384 KB |
Output is correct |
100 |
Correct |
84 ms |
25212 KB |
Output is correct |
101 |
Correct |
85 ms |
25544 KB |
Output is correct |
102 |
Correct |
91 ms |
25680 KB |
Output is correct |
103 |
Correct |
75 ms |
24372 KB |
Output is correct |
104 |
Correct |
72 ms |
25072 KB |
Output is correct |
105 |
Correct |
91 ms |
25576 KB |
Output is correct |
106 |
Correct |
47 ms |
24020 KB |
Output is correct |
107 |
Correct |
50 ms |
23836 KB |
Output is correct |
108 |
Correct |
74 ms |
24928 KB |
Output is correct |
109 |
Correct |
58 ms |
24000 KB |
Output is correct |
110 |
Correct |
74 ms |
25208 KB |
Output is correct |
111 |
Correct |
93 ms |
25168 KB |
Output is correct |
112 |
Correct |
79 ms |
25292 KB |
Output is correct |
113 |
Correct |
117 ms |
25792 KB |
Output is correct |
114 |
Correct |
94 ms |
25356 KB |
Output is correct |
115 |
Correct |
106 ms |
25912 KB |
Output is correct |
116 |
Correct |
60 ms |
23752 KB |
Output is correct |
117 |
Correct |
83 ms |
25852 KB |
Output is correct |
118 |
Correct |
80 ms |
24892 KB |
Output is correct |
119 |
Correct |
80 ms |
24760 KB |
Output is correct |
120 |
Correct |
89 ms |
25832 KB |
Output is correct |
121 |
Correct |
89 ms |
25544 KB |
Output is correct |
122 |
Correct |
83 ms |
25772 KB |
Output is correct |
123 |
Correct |
88 ms |
25868 KB |
Output is correct |
124 |
Correct |
100 ms |
25880 KB |
Output is correct |
125 |
Correct |
80 ms |
25048 KB |
Output is correct |
126 |
Correct |
52 ms |
24464 KB |
Output is correct |
127 |
Correct |
71 ms |
24356 KB |
Output is correct |
128 |
Correct |
76 ms |
25112 KB |
Output is correct |
129 |
Correct |
78 ms |
25668 KB |
Output is correct |
130 |
Correct |
429 ms |
49352 KB |
Output is correct |
131 |
Correct |
314 ms |
44060 KB |
Output is correct |
132 |
Correct |
415 ms |
49348 KB |
Output is correct |
133 |
Correct |
395 ms |
48896 KB |
Output is correct |
134 |
Correct |
399 ms |
46952 KB |
Output is correct |
135 |
Correct |
438 ms |
49772 KB |
Output is correct |
136 |
Correct |
404 ms |
48716 KB |
Output is correct |
137 |
Correct |
464 ms |
48704 KB |
Output is correct |
138 |
Correct |
397 ms |
46960 KB |
Output is correct |
139 |
Correct |
420 ms |
49436 KB |
Output is correct |
140 |
Correct |
445 ms |
47552 KB |
Output is correct |
141 |
Correct |
448 ms |
49484 KB |
Output is correct |
142 |
Correct |
441 ms |
49336 KB |
Output is correct |
143 |
Correct |
425 ms |
49360 KB |
Output is correct |
144 |
Correct |
403 ms |
48160 KB |
Output is correct |
145 |
Correct |
399 ms |
49384 KB |
Output is correct |
146 |
Correct |
430 ms |
48812 KB |
Output is correct |
147 |
Correct |
402 ms |
49336 KB |
Output is correct |
148 |
Correct |
401 ms |
49364 KB |
Output is correct |
149 |
Correct |
407 ms |
49508 KB |
Output is correct |
150 |
Correct |
214 ms |
43904 KB |
Output is correct |
151 |
Correct |
317 ms |
46716 KB |
Output is correct |
152 |
Correct |
345 ms |
46668 KB |
Output is correct |
153 |
Correct |
345 ms |
48508 KB |
Output is correct |