#include <bits/stdc++.h>
using namespace std;
#define il i * 2
#define ir i * 2 + 1
using ll = long long;
const int N = 250005;
const ll INF = 0x3f3f3f3f3f3f3f3f;
struct query {
int a, c = -1, d = -1; ll b;
} que[N];
vector<pair<int, int>> event[N];
pair<ll, ll> seg[N * 4], res; ll cur[N];
void add(int i, int l, int r, int p, int v) {
if (l == r) {
seg[i].second += v;
seg[i].first = max(seg[i].second, 0ll);
return;
}
int m = (l + r) / 2;
if (m >= p) add(il, l, m, p, v);
else add(ir, m + 1, r, p, v);
seg[i].first = max(seg[ir].first,
seg[il].first + seg[ir].second);
seg[i].second = seg[il].second + seg[ir].second;
}
int find(int i, int l, int r, ll v) {
if (l == r) return l;
int m = (l + r) / 2;
if (v <= seg[il].second)
return find(il, l, m, v);
return find(ir, m + 1, r, v - seg[il].second);
}
void get(int i, int l, int r, int p) {
if (r <= p) {
res.first = max(seg[i].first,
res.first + seg[i].second);
res.second += seg[i].second;
return;
}
int m = (l + r) / 2;
get(il, l, m, p);
if (m < p) get(ir, m + 1, r, p);
}
int main() {
cin.tie(0)->sync_with_stdio(0);
int n, m, q; cin >> n >> m >> q;
for (int i = 1, cmd; i <= q; i++) {
cin >> cmd >> que[i].a >> que[i].b;
if (cmd == 1) {
cin >> que[i].c >> que[i].d;
event[que[i].a].emplace_back(i, que[i].d);
event[que[i].b + 1].emplace_back(i, -que[i].d);
} else if (cmd == 2) {
cin >> que[i].d;
event[que[i].a].emplace_back(i, -que[i].d);
event[que[i].b + 1].emplace_back(i, que[i].d);
} else event[que[i].a].emplace_back(-i, 0);
}
for (int i = 1; i <= n; i++) {
for (auto e : event[i])
if (e.first > 0)
add(1, 1, q, e.first, e.second);
for (auto e : event[i])
if (e.first < 0) {
res.first = res.second = 0;
get(1, 1, q, -e.first);
cur[-e.first] = res.first;
}
}
for (int i = 0; i < 4 * N; i++)
seg[i].first = seg[i].second = 0;
for (int i = 1; i <= n; i++) {
for (auto e : event[i])
if (e.first > 0 && que[e.first].c >= 0)
add(1, 1, q, e.first, e.second);
for (auto e : event[i])
if (e.first < 0) {
if (cur[-e.first] < que[-e.first].b) {
cur[-e.first] = 0; continue;
}
res.first = res.second = 0;
get(1, 1, q, -e.first);
cur[-e.first] -= res.second + que[-e.first].b;
cur[-e.first] = que[find(1, 1, q, -cur[-e.first])].c;
}
}
for (int i = 1; i <= q; i++)
if (que[i].d < 0) cout << cur[i] << '\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
27740 KB |
Output is correct |
2 |
Correct |
17 ms |
27812 KB |
Output is correct |
3 |
Correct |
14 ms |
27740 KB |
Output is correct |
4 |
Correct |
14 ms |
27732 KB |
Output is correct |
5 |
Correct |
14 ms |
27696 KB |
Output is correct |
6 |
Correct |
14 ms |
27720 KB |
Output is correct |
7 |
Correct |
18 ms |
27824 KB |
Output is correct |
8 |
Correct |
17 ms |
27732 KB |
Output is correct |
9 |
Correct |
15 ms |
27732 KB |
Output is correct |
10 |
Correct |
20 ms |
27744 KB |
Output is correct |
11 |
Correct |
16 ms |
27736 KB |
Output is correct |
12 |
Correct |
17 ms |
27732 KB |
Output is correct |
13 |
Correct |
13 ms |
27732 KB |
Output is correct |
14 |
Correct |
13 ms |
27832 KB |
Output is correct |
15 |
Correct |
13 ms |
27708 KB |
Output is correct |
16 |
Correct |
14 ms |
27736 KB |
Output is correct |
17 |
Correct |
17 ms |
27740 KB |
Output is correct |
18 |
Correct |
16 ms |
27832 KB |
Output is correct |
19 |
Correct |
18 ms |
27812 KB |
Output is correct |
20 |
Correct |
18 ms |
27836 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
27740 KB |
Output is correct |
2 |
Correct |
17 ms |
27812 KB |
Output is correct |
3 |
Correct |
14 ms |
27740 KB |
Output is correct |
4 |
Correct |
14 ms |
27732 KB |
Output is correct |
5 |
Correct |
14 ms |
27696 KB |
Output is correct |
6 |
Correct |
14 ms |
27720 KB |
Output is correct |
7 |
Correct |
18 ms |
27824 KB |
Output is correct |
8 |
Correct |
17 ms |
27732 KB |
Output is correct |
9 |
Correct |
15 ms |
27732 KB |
Output is correct |
10 |
Correct |
20 ms |
27744 KB |
Output is correct |
11 |
Correct |
16 ms |
27736 KB |
Output is correct |
12 |
Correct |
17 ms |
27732 KB |
Output is correct |
13 |
Correct |
13 ms |
27732 KB |
Output is correct |
14 |
Correct |
13 ms |
27832 KB |
Output is correct |
15 |
Correct |
13 ms |
27708 KB |
Output is correct |
16 |
Correct |
14 ms |
27736 KB |
Output is correct |
17 |
Correct |
17 ms |
27740 KB |
Output is correct |
18 |
Correct |
16 ms |
27832 KB |
Output is correct |
19 |
Correct |
18 ms |
27812 KB |
Output is correct |
20 |
Correct |
18 ms |
27836 KB |
Output is correct |
21 |
Correct |
15 ms |
27776 KB |
Output is correct |
22 |
Correct |
14 ms |
27792 KB |
Output is correct |
23 |
Correct |
15 ms |
27860 KB |
Output is correct |
24 |
Correct |
19 ms |
27860 KB |
Output is correct |
25 |
Correct |
17 ms |
27832 KB |
Output is correct |
26 |
Correct |
13 ms |
27732 KB |
Output is correct |
27 |
Correct |
17 ms |
27748 KB |
Output is correct |
28 |
Correct |
19 ms |
27792 KB |
Output is correct |
29 |
Correct |
18 ms |
27732 KB |
Output is correct |
30 |
Correct |
16 ms |
27760 KB |
Output is correct |
31 |
Correct |
15 ms |
27828 KB |
Output is correct |
32 |
Correct |
24 ms |
27732 KB |
Output is correct |
33 |
Correct |
17 ms |
27732 KB |
Output is correct |
34 |
Correct |
16 ms |
27832 KB |
Output is correct |
35 |
Correct |
19 ms |
27820 KB |
Output is correct |
36 |
Correct |
15 ms |
27832 KB |
Output is correct |
37 |
Correct |
27 ms |
27716 KB |
Output is correct |
38 |
Correct |
15 ms |
27836 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
96 ms |
31372 KB |
Output is correct |
2 |
Correct |
118 ms |
31496 KB |
Output is correct |
3 |
Correct |
125 ms |
31348 KB |
Output is correct |
4 |
Correct |
105 ms |
31332 KB |
Output is correct |
5 |
Correct |
102 ms |
31480 KB |
Output is correct |
6 |
Correct |
107 ms |
31532 KB |
Output is correct |
7 |
Correct |
51 ms |
29976 KB |
Output is correct |
8 |
Correct |
52 ms |
30072 KB |
Output is correct |
9 |
Correct |
103 ms |
31508 KB |
Output is correct |
10 |
Correct |
104 ms |
31508 KB |
Output is correct |
11 |
Correct |
126 ms |
31476 KB |
Output is correct |
12 |
Correct |
109 ms |
31536 KB |
Output is correct |
13 |
Correct |
81 ms |
30784 KB |
Output is correct |
14 |
Correct |
99 ms |
31248 KB |
Output is correct |
15 |
Correct |
135 ms |
31344 KB |
Output is correct |
16 |
Correct |
135 ms |
31692 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
457 ms |
41940 KB |
Output is correct |
2 |
Correct |
340 ms |
39048 KB |
Output is correct |
3 |
Correct |
494 ms |
43404 KB |
Output is correct |
4 |
Correct |
392 ms |
39740 KB |
Output is correct |
5 |
Correct |
375 ms |
39480 KB |
Output is correct |
6 |
Correct |
590 ms |
43784 KB |
Output is correct |
7 |
Correct |
188 ms |
37424 KB |
Output is correct |
8 |
Correct |
191 ms |
37328 KB |
Output is correct |
9 |
Correct |
498 ms |
42964 KB |
Output is correct |
10 |
Correct |
526 ms |
42852 KB |
Output is correct |
11 |
Correct |
524 ms |
43664 KB |
Output is correct |
12 |
Correct |
507 ms |
43668 KB |
Output is correct |
13 |
Correct |
527 ms |
43604 KB |
Output is correct |
14 |
Correct |
497 ms |
43600 KB |
Output is correct |
15 |
Correct |
487 ms |
43428 KB |
Output is correct |
16 |
Correct |
510 ms |
43504 KB |
Output is correct |
17 |
Correct |
502 ms |
43536 KB |
Output is correct |
18 |
Correct |
476 ms |
43596 KB |
Output is correct |
19 |
Correct |
505 ms |
43500 KB |
Output is correct |
20 |
Correct |
490 ms |
43480 KB |
Output is correct |
21 |
Correct |
505 ms |
43544 KB |
Output is correct |
22 |
Correct |
543 ms |
43544 KB |
Output is correct |
23 |
Correct |
563 ms |
43556 KB |
Output is correct |
24 |
Correct |
494 ms |
43416 KB |
Output is correct |
25 |
Correct |
384 ms |
41960 KB |
Output is correct |
26 |
Correct |
398 ms |
42388 KB |
Output is correct |
27 |
Correct |
412 ms |
42352 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
27740 KB |
Output is correct |
2 |
Correct |
17 ms |
27812 KB |
Output is correct |
3 |
Correct |
14 ms |
27740 KB |
Output is correct |
4 |
Correct |
14 ms |
27732 KB |
Output is correct |
5 |
Correct |
14 ms |
27696 KB |
Output is correct |
6 |
Correct |
14 ms |
27720 KB |
Output is correct |
7 |
Correct |
18 ms |
27824 KB |
Output is correct |
8 |
Correct |
17 ms |
27732 KB |
Output is correct |
9 |
Correct |
15 ms |
27732 KB |
Output is correct |
10 |
Correct |
20 ms |
27744 KB |
Output is correct |
11 |
Correct |
16 ms |
27736 KB |
Output is correct |
12 |
Correct |
17 ms |
27732 KB |
Output is correct |
13 |
Correct |
13 ms |
27732 KB |
Output is correct |
14 |
Correct |
13 ms |
27832 KB |
Output is correct |
15 |
Correct |
13 ms |
27708 KB |
Output is correct |
16 |
Correct |
14 ms |
27736 KB |
Output is correct |
17 |
Correct |
17 ms |
27740 KB |
Output is correct |
18 |
Correct |
16 ms |
27832 KB |
Output is correct |
19 |
Correct |
18 ms |
27812 KB |
Output is correct |
20 |
Correct |
18 ms |
27836 KB |
Output is correct |
21 |
Correct |
96 ms |
31372 KB |
Output is correct |
22 |
Correct |
118 ms |
31496 KB |
Output is correct |
23 |
Correct |
125 ms |
31348 KB |
Output is correct |
24 |
Correct |
105 ms |
31332 KB |
Output is correct |
25 |
Correct |
102 ms |
31480 KB |
Output is correct |
26 |
Correct |
107 ms |
31532 KB |
Output is correct |
27 |
Correct |
51 ms |
29976 KB |
Output is correct |
28 |
Correct |
52 ms |
30072 KB |
Output is correct |
29 |
Correct |
103 ms |
31508 KB |
Output is correct |
30 |
Correct |
104 ms |
31508 KB |
Output is correct |
31 |
Correct |
126 ms |
31476 KB |
Output is correct |
32 |
Correct |
109 ms |
31536 KB |
Output is correct |
33 |
Correct |
81 ms |
30784 KB |
Output is correct |
34 |
Correct |
99 ms |
31248 KB |
Output is correct |
35 |
Correct |
135 ms |
31344 KB |
Output is correct |
36 |
Correct |
135 ms |
31692 KB |
Output is correct |
37 |
Correct |
118 ms |
30856 KB |
Output is correct |
38 |
Correct |
91 ms |
30752 KB |
Output is correct |
39 |
Correct |
40 ms |
29576 KB |
Output is correct |
40 |
Correct |
43 ms |
29764 KB |
Output is correct |
41 |
Correct |
119 ms |
31336 KB |
Output is correct |
42 |
Correct |
109 ms |
31328 KB |
Output is correct |
43 |
Correct |
112 ms |
31380 KB |
Output is correct |
44 |
Correct |
107 ms |
31320 KB |
Output is correct |
45 |
Correct |
94 ms |
31300 KB |
Output is correct |
46 |
Correct |
102 ms |
31304 KB |
Output is correct |
47 |
Correct |
62 ms |
30416 KB |
Output is correct |
48 |
Correct |
81 ms |
31052 KB |
Output is correct |
49 |
Correct |
68 ms |
30288 KB |
Output is correct |
50 |
Correct |
86 ms |
30852 KB |
Output is correct |
51 |
Correct |
129 ms |
31436 KB |
Output is correct |
52 |
Correct |
122 ms |
31336 KB |
Output is correct |
53 |
Correct |
98 ms |
30772 KB |
Output is correct |
54 |
Correct |
118 ms |
31576 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
109 ms |
31528 KB |
Output is correct |
2 |
Correct |
91 ms |
31688 KB |
Output is correct |
3 |
Correct |
90 ms |
31808 KB |
Output is correct |
4 |
Correct |
79 ms |
30688 KB |
Output is correct |
5 |
Correct |
92 ms |
31408 KB |
Output is correct |
6 |
Correct |
92 ms |
31752 KB |
Output is correct |
7 |
Correct |
48 ms |
30200 KB |
Output is correct |
8 |
Correct |
50 ms |
30076 KB |
Output is correct |
9 |
Correct |
71 ms |
31172 KB |
Output is correct |
10 |
Correct |
57 ms |
30364 KB |
Output is correct |
11 |
Correct |
91 ms |
31416 KB |
Output is correct |
12 |
Correct |
91 ms |
31428 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
27740 KB |
Output is correct |
2 |
Correct |
17 ms |
27812 KB |
Output is correct |
3 |
Correct |
14 ms |
27740 KB |
Output is correct |
4 |
Correct |
14 ms |
27732 KB |
Output is correct |
5 |
Correct |
14 ms |
27696 KB |
Output is correct |
6 |
Correct |
14 ms |
27720 KB |
Output is correct |
7 |
Correct |
18 ms |
27824 KB |
Output is correct |
8 |
Correct |
17 ms |
27732 KB |
Output is correct |
9 |
Correct |
15 ms |
27732 KB |
Output is correct |
10 |
Correct |
20 ms |
27744 KB |
Output is correct |
11 |
Correct |
16 ms |
27736 KB |
Output is correct |
12 |
Correct |
17 ms |
27732 KB |
Output is correct |
13 |
Correct |
13 ms |
27732 KB |
Output is correct |
14 |
Correct |
13 ms |
27832 KB |
Output is correct |
15 |
Correct |
13 ms |
27708 KB |
Output is correct |
16 |
Correct |
14 ms |
27736 KB |
Output is correct |
17 |
Correct |
17 ms |
27740 KB |
Output is correct |
18 |
Correct |
16 ms |
27832 KB |
Output is correct |
19 |
Correct |
18 ms |
27812 KB |
Output is correct |
20 |
Correct |
18 ms |
27836 KB |
Output is correct |
21 |
Correct |
15 ms |
27776 KB |
Output is correct |
22 |
Correct |
14 ms |
27792 KB |
Output is correct |
23 |
Correct |
15 ms |
27860 KB |
Output is correct |
24 |
Correct |
19 ms |
27860 KB |
Output is correct |
25 |
Correct |
17 ms |
27832 KB |
Output is correct |
26 |
Correct |
13 ms |
27732 KB |
Output is correct |
27 |
Correct |
17 ms |
27748 KB |
Output is correct |
28 |
Correct |
19 ms |
27792 KB |
Output is correct |
29 |
Correct |
18 ms |
27732 KB |
Output is correct |
30 |
Correct |
16 ms |
27760 KB |
Output is correct |
31 |
Correct |
15 ms |
27828 KB |
Output is correct |
32 |
Correct |
24 ms |
27732 KB |
Output is correct |
33 |
Correct |
17 ms |
27732 KB |
Output is correct |
34 |
Correct |
16 ms |
27832 KB |
Output is correct |
35 |
Correct |
19 ms |
27820 KB |
Output is correct |
36 |
Correct |
15 ms |
27832 KB |
Output is correct |
37 |
Correct |
27 ms |
27716 KB |
Output is correct |
38 |
Correct |
15 ms |
27836 KB |
Output is correct |
39 |
Correct |
96 ms |
31372 KB |
Output is correct |
40 |
Correct |
118 ms |
31496 KB |
Output is correct |
41 |
Correct |
125 ms |
31348 KB |
Output is correct |
42 |
Correct |
105 ms |
31332 KB |
Output is correct |
43 |
Correct |
102 ms |
31480 KB |
Output is correct |
44 |
Correct |
107 ms |
31532 KB |
Output is correct |
45 |
Correct |
51 ms |
29976 KB |
Output is correct |
46 |
Correct |
52 ms |
30072 KB |
Output is correct |
47 |
Correct |
103 ms |
31508 KB |
Output is correct |
48 |
Correct |
104 ms |
31508 KB |
Output is correct |
49 |
Correct |
126 ms |
31476 KB |
Output is correct |
50 |
Correct |
109 ms |
31536 KB |
Output is correct |
51 |
Correct |
81 ms |
30784 KB |
Output is correct |
52 |
Correct |
99 ms |
31248 KB |
Output is correct |
53 |
Correct |
135 ms |
31344 KB |
Output is correct |
54 |
Correct |
135 ms |
31692 KB |
Output is correct |
55 |
Correct |
118 ms |
30856 KB |
Output is correct |
56 |
Correct |
91 ms |
30752 KB |
Output is correct |
57 |
Correct |
40 ms |
29576 KB |
Output is correct |
58 |
Correct |
43 ms |
29764 KB |
Output is correct |
59 |
Correct |
119 ms |
31336 KB |
Output is correct |
60 |
Correct |
109 ms |
31328 KB |
Output is correct |
61 |
Correct |
112 ms |
31380 KB |
Output is correct |
62 |
Correct |
107 ms |
31320 KB |
Output is correct |
63 |
Correct |
94 ms |
31300 KB |
Output is correct |
64 |
Correct |
102 ms |
31304 KB |
Output is correct |
65 |
Correct |
62 ms |
30416 KB |
Output is correct |
66 |
Correct |
81 ms |
31052 KB |
Output is correct |
67 |
Correct |
68 ms |
30288 KB |
Output is correct |
68 |
Correct |
86 ms |
30852 KB |
Output is correct |
69 |
Correct |
129 ms |
31436 KB |
Output is correct |
70 |
Correct |
122 ms |
31336 KB |
Output is correct |
71 |
Correct |
98 ms |
30772 KB |
Output is correct |
72 |
Correct |
118 ms |
31576 KB |
Output is correct |
73 |
Correct |
109 ms |
31528 KB |
Output is correct |
74 |
Correct |
91 ms |
31688 KB |
Output is correct |
75 |
Correct |
90 ms |
31808 KB |
Output is correct |
76 |
Correct |
79 ms |
30688 KB |
Output is correct |
77 |
Correct |
92 ms |
31408 KB |
Output is correct |
78 |
Correct |
92 ms |
31752 KB |
Output is correct |
79 |
Correct |
48 ms |
30200 KB |
Output is correct |
80 |
Correct |
50 ms |
30076 KB |
Output is correct |
81 |
Correct |
71 ms |
31172 KB |
Output is correct |
82 |
Correct |
57 ms |
30364 KB |
Output is correct |
83 |
Correct |
91 ms |
31416 KB |
Output is correct |
84 |
Correct |
91 ms |
31428 KB |
Output is correct |
85 |
Correct |
99 ms |
31324 KB |
Output is correct |
86 |
Correct |
97 ms |
31780 KB |
Output is correct |
87 |
Correct |
86 ms |
31396 KB |
Output is correct |
88 |
Correct |
119 ms |
32028 KB |
Output is correct |
89 |
Correct |
67 ms |
30540 KB |
Output is correct |
90 |
Correct |
93 ms |
31820 KB |
Output is correct |
91 |
Correct |
73 ms |
31052 KB |
Output is correct |
92 |
Correct |
80 ms |
30912 KB |
Output is correct |
93 |
Correct |
117 ms |
31900 KB |
Output is correct |
94 |
Correct |
96 ms |
31920 KB |
Output is correct |
95 |
Correct |
83 ms |
31728 KB |
Output is correct |
96 |
Correct |
105 ms |
31808 KB |
Output is correct |
97 |
Correct |
113 ms |
31828 KB |
Output is correct |
98 |
Correct |
82 ms |
31144 KB |
Output is correct |
99 |
Correct |
55 ms |
31012 KB |
Output is correct |
100 |
Correct |
65 ms |
30712 KB |
Output is correct |
101 |
Correct |
79 ms |
31564 KB |
Output is correct |
102 |
Correct |
85 ms |
31568 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
27740 KB |
Output is correct |
2 |
Correct |
17 ms |
27812 KB |
Output is correct |
3 |
Correct |
14 ms |
27740 KB |
Output is correct |
4 |
Correct |
14 ms |
27732 KB |
Output is correct |
5 |
Correct |
14 ms |
27696 KB |
Output is correct |
6 |
Correct |
14 ms |
27720 KB |
Output is correct |
7 |
Correct |
18 ms |
27824 KB |
Output is correct |
8 |
Correct |
17 ms |
27732 KB |
Output is correct |
9 |
Correct |
15 ms |
27732 KB |
Output is correct |
10 |
Correct |
20 ms |
27744 KB |
Output is correct |
11 |
Correct |
16 ms |
27736 KB |
Output is correct |
12 |
Correct |
17 ms |
27732 KB |
Output is correct |
13 |
Correct |
13 ms |
27732 KB |
Output is correct |
14 |
Correct |
13 ms |
27832 KB |
Output is correct |
15 |
Correct |
13 ms |
27708 KB |
Output is correct |
16 |
Correct |
14 ms |
27736 KB |
Output is correct |
17 |
Correct |
17 ms |
27740 KB |
Output is correct |
18 |
Correct |
16 ms |
27832 KB |
Output is correct |
19 |
Correct |
18 ms |
27812 KB |
Output is correct |
20 |
Correct |
18 ms |
27836 KB |
Output is correct |
21 |
Correct |
15 ms |
27776 KB |
Output is correct |
22 |
Correct |
14 ms |
27792 KB |
Output is correct |
23 |
Correct |
15 ms |
27860 KB |
Output is correct |
24 |
Correct |
19 ms |
27860 KB |
Output is correct |
25 |
Correct |
17 ms |
27832 KB |
Output is correct |
26 |
Correct |
13 ms |
27732 KB |
Output is correct |
27 |
Correct |
17 ms |
27748 KB |
Output is correct |
28 |
Correct |
19 ms |
27792 KB |
Output is correct |
29 |
Correct |
18 ms |
27732 KB |
Output is correct |
30 |
Correct |
16 ms |
27760 KB |
Output is correct |
31 |
Correct |
15 ms |
27828 KB |
Output is correct |
32 |
Correct |
24 ms |
27732 KB |
Output is correct |
33 |
Correct |
17 ms |
27732 KB |
Output is correct |
34 |
Correct |
16 ms |
27832 KB |
Output is correct |
35 |
Correct |
19 ms |
27820 KB |
Output is correct |
36 |
Correct |
15 ms |
27832 KB |
Output is correct |
37 |
Correct |
27 ms |
27716 KB |
Output is correct |
38 |
Correct |
15 ms |
27836 KB |
Output is correct |
39 |
Correct |
96 ms |
31372 KB |
Output is correct |
40 |
Correct |
118 ms |
31496 KB |
Output is correct |
41 |
Correct |
125 ms |
31348 KB |
Output is correct |
42 |
Correct |
105 ms |
31332 KB |
Output is correct |
43 |
Correct |
102 ms |
31480 KB |
Output is correct |
44 |
Correct |
107 ms |
31532 KB |
Output is correct |
45 |
Correct |
51 ms |
29976 KB |
Output is correct |
46 |
Correct |
52 ms |
30072 KB |
Output is correct |
47 |
Correct |
103 ms |
31508 KB |
Output is correct |
48 |
Correct |
104 ms |
31508 KB |
Output is correct |
49 |
Correct |
126 ms |
31476 KB |
Output is correct |
50 |
Correct |
109 ms |
31536 KB |
Output is correct |
51 |
Correct |
81 ms |
30784 KB |
Output is correct |
52 |
Correct |
99 ms |
31248 KB |
Output is correct |
53 |
Correct |
135 ms |
31344 KB |
Output is correct |
54 |
Correct |
135 ms |
31692 KB |
Output is correct |
55 |
Correct |
457 ms |
41940 KB |
Output is correct |
56 |
Correct |
340 ms |
39048 KB |
Output is correct |
57 |
Correct |
494 ms |
43404 KB |
Output is correct |
58 |
Correct |
392 ms |
39740 KB |
Output is correct |
59 |
Correct |
375 ms |
39480 KB |
Output is correct |
60 |
Correct |
590 ms |
43784 KB |
Output is correct |
61 |
Correct |
188 ms |
37424 KB |
Output is correct |
62 |
Correct |
191 ms |
37328 KB |
Output is correct |
63 |
Correct |
498 ms |
42964 KB |
Output is correct |
64 |
Correct |
526 ms |
42852 KB |
Output is correct |
65 |
Correct |
524 ms |
43664 KB |
Output is correct |
66 |
Correct |
507 ms |
43668 KB |
Output is correct |
67 |
Correct |
527 ms |
43604 KB |
Output is correct |
68 |
Correct |
497 ms |
43600 KB |
Output is correct |
69 |
Correct |
487 ms |
43428 KB |
Output is correct |
70 |
Correct |
510 ms |
43504 KB |
Output is correct |
71 |
Correct |
502 ms |
43536 KB |
Output is correct |
72 |
Correct |
476 ms |
43596 KB |
Output is correct |
73 |
Correct |
505 ms |
43500 KB |
Output is correct |
74 |
Correct |
490 ms |
43480 KB |
Output is correct |
75 |
Correct |
505 ms |
43544 KB |
Output is correct |
76 |
Correct |
543 ms |
43544 KB |
Output is correct |
77 |
Correct |
563 ms |
43556 KB |
Output is correct |
78 |
Correct |
494 ms |
43416 KB |
Output is correct |
79 |
Correct |
384 ms |
41960 KB |
Output is correct |
80 |
Correct |
398 ms |
42388 KB |
Output is correct |
81 |
Correct |
412 ms |
42352 KB |
Output is correct |
82 |
Correct |
118 ms |
30856 KB |
Output is correct |
83 |
Correct |
91 ms |
30752 KB |
Output is correct |
84 |
Correct |
40 ms |
29576 KB |
Output is correct |
85 |
Correct |
43 ms |
29764 KB |
Output is correct |
86 |
Correct |
119 ms |
31336 KB |
Output is correct |
87 |
Correct |
109 ms |
31328 KB |
Output is correct |
88 |
Correct |
112 ms |
31380 KB |
Output is correct |
89 |
Correct |
107 ms |
31320 KB |
Output is correct |
90 |
Correct |
94 ms |
31300 KB |
Output is correct |
91 |
Correct |
102 ms |
31304 KB |
Output is correct |
92 |
Correct |
62 ms |
30416 KB |
Output is correct |
93 |
Correct |
81 ms |
31052 KB |
Output is correct |
94 |
Correct |
68 ms |
30288 KB |
Output is correct |
95 |
Correct |
86 ms |
30852 KB |
Output is correct |
96 |
Correct |
129 ms |
31436 KB |
Output is correct |
97 |
Correct |
122 ms |
31336 KB |
Output is correct |
98 |
Correct |
98 ms |
30772 KB |
Output is correct |
99 |
Correct |
118 ms |
31576 KB |
Output is correct |
100 |
Correct |
109 ms |
31528 KB |
Output is correct |
101 |
Correct |
91 ms |
31688 KB |
Output is correct |
102 |
Correct |
90 ms |
31808 KB |
Output is correct |
103 |
Correct |
79 ms |
30688 KB |
Output is correct |
104 |
Correct |
92 ms |
31408 KB |
Output is correct |
105 |
Correct |
92 ms |
31752 KB |
Output is correct |
106 |
Correct |
48 ms |
30200 KB |
Output is correct |
107 |
Correct |
50 ms |
30076 KB |
Output is correct |
108 |
Correct |
71 ms |
31172 KB |
Output is correct |
109 |
Correct |
57 ms |
30364 KB |
Output is correct |
110 |
Correct |
91 ms |
31416 KB |
Output is correct |
111 |
Correct |
91 ms |
31428 KB |
Output is correct |
112 |
Correct |
99 ms |
31324 KB |
Output is correct |
113 |
Correct |
97 ms |
31780 KB |
Output is correct |
114 |
Correct |
86 ms |
31396 KB |
Output is correct |
115 |
Correct |
119 ms |
32028 KB |
Output is correct |
116 |
Correct |
67 ms |
30540 KB |
Output is correct |
117 |
Correct |
93 ms |
31820 KB |
Output is correct |
118 |
Correct |
73 ms |
31052 KB |
Output is correct |
119 |
Correct |
80 ms |
30912 KB |
Output is correct |
120 |
Correct |
117 ms |
31900 KB |
Output is correct |
121 |
Correct |
96 ms |
31920 KB |
Output is correct |
122 |
Correct |
83 ms |
31728 KB |
Output is correct |
123 |
Correct |
105 ms |
31808 KB |
Output is correct |
124 |
Correct |
113 ms |
31828 KB |
Output is correct |
125 |
Correct |
82 ms |
31144 KB |
Output is correct |
126 |
Correct |
55 ms |
31012 KB |
Output is correct |
127 |
Correct |
65 ms |
30712 KB |
Output is correct |
128 |
Correct |
79 ms |
31564 KB |
Output is correct |
129 |
Correct |
85 ms |
31568 KB |
Output is correct |
130 |
Correct |
448 ms |
43828 KB |
Output is correct |
131 |
Correct |
342 ms |
39372 KB |
Output is correct |
132 |
Correct |
460 ms |
43804 KB |
Output is correct |
133 |
Correct |
458 ms |
43760 KB |
Output is correct |
134 |
Correct |
380 ms |
42068 KB |
Output is correct |
135 |
Correct |
535 ms |
44436 KB |
Output is correct |
136 |
Correct |
511 ms |
43888 KB |
Output is correct |
137 |
Correct |
441 ms |
43908 KB |
Output is correct |
138 |
Correct |
435 ms |
44232 KB |
Output is correct |
139 |
Correct |
477 ms |
44204 KB |
Output is correct |
140 |
Correct |
415 ms |
44120 KB |
Output is correct |
141 |
Correct |
452 ms |
44184 KB |
Output is correct |
142 |
Correct |
431 ms |
44084 KB |
Output is correct |
143 |
Correct |
441 ms |
44180 KB |
Output is correct |
144 |
Correct |
416 ms |
44168 KB |
Output is correct |
145 |
Correct |
417 ms |
44268 KB |
Output is correct |
146 |
Correct |
434 ms |
44100 KB |
Output is correct |
147 |
Correct |
412 ms |
44088 KB |
Output is correct |
148 |
Correct |
436 ms |
44108 KB |
Output is correct |
149 |
Correct |
442 ms |
44092 KB |
Output is correct |
150 |
Correct |
203 ms |
40612 KB |
Output is correct |
151 |
Correct |
358 ms |
43024 KB |
Output is correct |
152 |
Correct |
329 ms |
43028 KB |
Output is correct |
153 |
Correct |
357 ms |
43100 KB |
Output is correct |