#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx2,fma,bmi,bmi2,sse4.2,popcnt,lzcnt")
#include <bits/stdc++.h>
#define taskname ""
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define int long long
#define ll long long
#define ld long double
#define pb push_back
#define ff first
#define ss second
#define pii pair<int, int>
#define pll pair<ll, ll>
#define vi vector<int>
#define vii vector<pii>
using namespace std;
const int mxN = 250000 + 5;
const int mod = 1e9 + 7;
const ll oo = 1e18;
struct node {
ll sum_plus, sum_minus, idx;
pll pref_min;
node() {
sum_plus = sum_minus = idx = 0;
pref_min = {0, mod};
}
node operator + (const node &o) {
node res;
res.sum_plus = sum_plus + o.sum_plus;
res.sum_minus = sum_minus + o.sum_minus;
res.pref_min = min(pref_min, {sum_plus - sum_minus + o.pref_min.ff, o.pref_min.ss});
return res;
}
} segtree[4 * mxN];
int n, m, q, ans[mxN];
vector<vector<ll>> query;
vi query_time[mxN], all_query;
vii actual_query[mxN];
void update(int l, int r, int idx, int pos, int val) {
if(l == r) {
if(val > 0) {
if(query[pos][0] == 1) segtree[idx].sum_plus = query[pos][2];
else if(query[pos][0] == 2) segtree[idx].sum_minus = query[pos][1];
segtree[idx].pref_min = {min(segtree[idx].sum_plus, -segtree[idx].sum_minus), pos};
segtree[idx].idx = pos;
}
else {
segtree[idx] = node();
}
return;
}
int mid = (l + r) >> 1;
if(pos <= mid) update(l, mid, idx << 1, pos, val);
else update(mid + 1, r, idx << 1 | 1, pos, val);
segtree[idx] = segtree[idx << 1] + segtree[idx << 1 | 1];
}
node get(int l, int r, int idx, int u, int v) {
if(v < u) return node();
if(u <= l && r <= v) {
return segtree[idx];
}
int mid = (l + r) >> 1;
if(v <= mid) return get(l, mid, idx << 1, u, v);
else if(mid + 1 <= u) return get(mid + 1, r, idx << 1 | 1, u, v);
else return get(l, mid, idx << 1, u, v) + get(mid + 1, r, idx << 1 | 1, u, v);
}
int huutuannguvailon(int cur_l, int cur_r, ll k) {
int l = 1, r = q, idx = 1;
while(l < r) {
int mid = (l + r) >> 1;
if(k > segtree[idx << 1].sum_plus) {
k -= segtree[idx << 1].sum_plus;
idx = idx << 1 | 1, l = mid + 1;
}
else {
idx <<= 1, r = mid;
}
}
return query[l][1];
}
void solve() {
cin >> n >> m >> q;
query.pb({});
for(int i = 1; i <= q; ++i) {
int type; cin >> type;
vector<ll> tmp = {type};
if(type == 1) {
int l, r; cin >> l >> r;
query_time[l].emplace_back(i);
query_time[r + 1].emplace_back(-i);
ll k, c; cin >> c >> k;
tmp.emplace_back(c);
tmp.emplace_back(k);
}
else if(type == 2) {
int l, r; cin >> l >> r;
query_time[l].emplace_back(i);
query_time[r + 1].emplace_back(-i);
ll k; cin >> k; tmp.emplace_back(k);
}
else {
all_query.emplace_back(i);
ll cur, k; cin >> cur >> k;
actual_query[cur].emplace_back(i, k);
}
query.pb(tmp);
}
for(int i = 1; i <= n; ++i) {
for(int &val : query_time[i]) {
if(val > 0) update(1, q, 1, val, 1);
else update(1, q, 1, -val, -1);
}
int cope = segtree[1].pref_min.ss;
if(cope == mod) {
for(auto &[idx, k] : actual_query[i])
ans[idx] = 0;
continue;
}
for(auto &[idx, k] : actual_query[i]) {
auto cur = get(1, q, 1, 1, idx);
cope = cur.pref_min.ss;
if(cope == mod || cope == idx) {
ans[idx] = 0;
continue;
}
auto cur1 = get(1, q, 1, cope, idx);
if(query[cope][0] == 2)
cur1.sum_minus -= query[cope][1];
ll actual_k = k + cur1.sum_minus;
if(actual_k > cur1.sum_plus) {
ans[idx] = 0;
continue;
}
ans[idx] = huutuannguvailon(cope, idx, actual_k + cur.sum_plus - cur1.sum_plus);
}
}
for(int &idx : all_query) cout << ans[idx] << endl;
}
signed main() {
#ifndef CDuongg
if(fopen(taskname".inp", "r"))
assert(freopen(taskname".inp", "r", stdin)), assert(freopen(taskname".out", "w", stdout));
#else
freopen("bai3.inp", "r", stdin);
freopen("bai3.out", "w", stdout);
auto start = chrono::high_resolution_clock::now();
#endif
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int t = 1; //cin >> t;
while(t--) solve();
#ifdef CDuongg
auto end = chrono::high_resolution_clock::now();
// cout << "\n"; for(int i = 1; i <= 100; ++i) cout << '=';
// cout << "\nExecution time: " << chrono::duration_cast<chrono::milliseconds> (end - start).count() << "[ms]" << endl;
#endif
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
24 ms |
52568 KB |
Output is correct |
2 |
Correct |
25 ms |
52800 KB |
Output is correct |
3 |
Correct |
23 ms |
52552 KB |
Output is correct |
4 |
Correct |
24 ms |
52576 KB |
Output is correct |
5 |
Correct |
26 ms |
52572 KB |
Output is correct |
6 |
Correct |
26 ms |
52560 KB |
Output is correct |
7 |
Correct |
23 ms |
52564 KB |
Output is correct |
8 |
Correct |
21 ms |
52572 KB |
Output is correct |
9 |
Correct |
37 ms |
52756 KB |
Output is correct |
10 |
Correct |
25 ms |
51548 KB |
Output is correct |
11 |
Correct |
25 ms |
51548 KB |
Output is correct |
12 |
Correct |
36 ms |
51536 KB |
Output is correct |
13 |
Correct |
31 ms |
51292 KB |
Output is correct |
14 |
Correct |
36 ms |
51424 KB |
Output is correct |
15 |
Correct |
22 ms |
51292 KB |
Output is correct |
16 |
Correct |
21 ms |
51548 KB |
Output is correct |
17 |
Correct |
35 ms |
51292 KB |
Output is correct |
18 |
Correct |
23 ms |
51544 KB |
Output is correct |
19 |
Correct |
23 ms |
51368 KB |
Output is correct |
20 |
Correct |
26 ms |
52572 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
24 ms |
52568 KB |
Output is correct |
2 |
Correct |
25 ms |
52800 KB |
Output is correct |
3 |
Correct |
23 ms |
52552 KB |
Output is correct |
4 |
Correct |
24 ms |
52576 KB |
Output is correct |
5 |
Correct |
26 ms |
52572 KB |
Output is correct |
6 |
Correct |
26 ms |
52560 KB |
Output is correct |
7 |
Correct |
23 ms |
52564 KB |
Output is correct |
8 |
Correct |
21 ms |
52572 KB |
Output is correct |
9 |
Correct |
37 ms |
52756 KB |
Output is correct |
10 |
Correct |
25 ms |
51548 KB |
Output is correct |
11 |
Correct |
25 ms |
51548 KB |
Output is correct |
12 |
Correct |
36 ms |
51536 KB |
Output is correct |
13 |
Correct |
31 ms |
51292 KB |
Output is correct |
14 |
Correct |
36 ms |
51424 KB |
Output is correct |
15 |
Correct |
22 ms |
51292 KB |
Output is correct |
16 |
Correct |
21 ms |
51548 KB |
Output is correct |
17 |
Correct |
35 ms |
51292 KB |
Output is correct |
18 |
Correct |
23 ms |
51544 KB |
Output is correct |
19 |
Correct |
23 ms |
51368 KB |
Output is correct |
20 |
Correct |
26 ms |
52572 KB |
Output is correct |
21 |
Correct |
27 ms |
52604 KB |
Output is correct |
22 |
Correct |
26 ms |
51548 KB |
Output is correct |
23 |
Correct |
25 ms |
51352 KB |
Output is correct |
24 |
Correct |
30 ms |
51416 KB |
Output is correct |
25 |
Correct |
38 ms |
51452 KB |
Output is correct |
26 |
Correct |
27 ms |
51548 KB |
Output is correct |
27 |
Correct |
37 ms |
51548 KB |
Output is correct |
28 |
Correct |
28 ms |
51544 KB |
Output is correct |
29 |
Correct |
30 ms |
51364 KB |
Output is correct |
30 |
Correct |
31 ms |
51540 KB |
Output is correct |
31 |
Correct |
26 ms |
51584 KB |
Output is correct |
32 |
Correct |
29 ms |
51552 KB |
Output is correct |
33 |
Correct |
27 ms |
51364 KB |
Output is correct |
34 |
Correct |
24 ms |
51360 KB |
Output is correct |
35 |
Correct |
39 ms |
51540 KB |
Output is correct |
36 |
Correct |
27 ms |
51540 KB |
Output is correct |
37 |
Correct |
32 ms |
51280 KB |
Output is correct |
38 |
Correct |
30 ms |
51556 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
105 ms |
58924 KB |
Output is correct |
2 |
Correct |
97 ms |
58892 KB |
Output is correct |
3 |
Correct |
108 ms |
59072 KB |
Output is correct |
4 |
Correct |
143 ms |
59032 KB |
Output is correct |
5 |
Correct |
99 ms |
59064 KB |
Output is correct |
6 |
Correct |
94 ms |
59076 KB |
Output is correct |
7 |
Correct |
69 ms |
57372 KB |
Output is correct |
8 |
Correct |
71 ms |
57612 KB |
Output is correct |
9 |
Correct |
140 ms |
59116 KB |
Output is correct |
10 |
Correct |
96 ms |
58960 KB |
Output is correct |
11 |
Correct |
97 ms |
59072 KB |
Output is correct |
12 |
Correct |
100 ms |
58972 KB |
Output is correct |
13 |
Correct |
119 ms |
57860 KB |
Output is correct |
14 |
Correct |
131 ms |
58888 KB |
Output is correct |
15 |
Correct |
114 ms |
58676 KB |
Output is correct |
16 |
Correct |
86 ms |
58884 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
478 ms |
79856 KB |
Output is correct |
2 |
Correct |
382 ms |
74816 KB |
Output is correct |
3 |
Correct |
472 ms |
82456 KB |
Output is correct |
4 |
Correct |
305 ms |
74816 KB |
Output is correct |
5 |
Correct |
304 ms |
74736 KB |
Output is correct |
6 |
Correct |
428 ms |
82484 KB |
Output is correct |
7 |
Correct |
312 ms |
77044 KB |
Output is correct |
8 |
Correct |
252 ms |
76016 KB |
Output is correct |
9 |
Correct |
488 ms |
82932 KB |
Output is correct |
10 |
Correct |
490 ms |
82828 KB |
Output is correct |
11 |
Correct |
436 ms |
82432 KB |
Output is correct |
12 |
Correct |
469 ms |
82268 KB |
Output is correct |
13 |
Correct |
492 ms |
82268 KB |
Output is correct |
14 |
Correct |
478 ms |
82164 KB |
Output is correct |
15 |
Correct |
446 ms |
82164 KB |
Output is correct |
16 |
Correct |
492 ms |
82112 KB |
Output is correct |
17 |
Correct |
455 ms |
82160 KB |
Output is correct |
18 |
Correct |
421 ms |
82416 KB |
Output is correct |
19 |
Correct |
458 ms |
82416 KB |
Output is correct |
20 |
Correct |
444 ms |
82240 KB |
Output is correct |
21 |
Correct |
435 ms |
82244 KB |
Output is correct |
22 |
Correct |
446 ms |
82164 KB |
Output is correct |
23 |
Correct |
437 ms |
82164 KB |
Output is correct |
24 |
Correct |
459 ms |
82164 KB |
Output is correct |
25 |
Correct |
395 ms |
79600 KB |
Output is correct |
26 |
Correct |
412 ms |
80112 KB |
Output is correct |
27 |
Correct |
331 ms |
80628 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
24 ms |
52568 KB |
Output is correct |
2 |
Correct |
25 ms |
52800 KB |
Output is correct |
3 |
Correct |
23 ms |
52552 KB |
Output is correct |
4 |
Correct |
24 ms |
52576 KB |
Output is correct |
5 |
Correct |
26 ms |
52572 KB |
Output is correct |
6 |
Correct |
26 ms |
52560 KB |
Output is correct |
7 |
Correct |
23 ms |
52564 KB |
Output is correct |
8 |
Correct |
21 ms |
52572 KB |
Output is correct |
9 |
Correct |
37 ms |
52756 KB |
Output is correct |
10 |
Correct |
25 ms |
51548 KB |
Output is correct |
11 |
Correct |
25 ms |
51548 KB |
Output is correct |
12 |
Correct |
36 ms |
51536 KB |
Output is correct |
13 |
Correct |
31 ms |
51292 KB |
Output is correct |
14 |
Correct |
36 ms |
51424 KB |
Output is correct |
15 |
Correct |
22 ms |
51292 KB |
Output is correct |
16 |
Correct |
21 ms |
51548 KB |
Output is correct |
17 |
Correct |
35 ms |
51292 KB |
Output is correct |
18 |
Correct |
23 ms |
51544 KB |
Output is correct |
19 |
Correct |
23 ms |
51368 KB |
Output is correct |
20 |
Correct |
26 ms |
52572 KB |
Output is correct |
21 |
Correct |
105 ms |
58924 KB |
Output is correct |
22 |
Correct |
97 ms |
58892 KB |
Output is correct |
23 |
Correct |
108 ms |
59072 KB |
Output is correct |
24 |
Correct |
143 ms |
59032 KB |
Output is correct |
25 |
Correct |
99 ms |
59064 KB |
Output is correct |
26 |
Correct |
94 ms |
59076 KB |
Output is correct |
27 |
Correct |
69 ms |
57372 KB |
Output is correct |
28 |
Correct |
71 ms |
57612 KB |
Output is correct |
29 |
Correct |
140 ms |
59116 KB |
Output is correct |
30 |
Correct |
96 ms |
58960 KB |
Output is correct |
31 |
Correct |
97 ms |
59072 KB |
Output is correct |
32 |
Correct |
100 ms |
58972 KB |
Output is correct |
33 |
Correct |
119 ms |
57860 KB |
Output is correct |
34 |
Correct |
131 ms |
58888 KB |
Output is correct |
35 |
Correct |
114 ms |
58676 KB |
Output is correct |
36 |
Correct |
86 ms |
58884 KB |
Output is correct |
37 |
Correct |
91 ms |
59356 KB |
Output is correct |
38 |
Correct |
77 ms |
58628 KB |
Output is correct |
39 |
Correct |
58 ms |
57604 KB |
Output is correct |
40 |
Correct |
70 ms |
58376 KB |
Output is correct |
41 |
Correct |
99 ms |
59972 KB |
Output is correct |
42 |
Correct |
95 ms |
60164 KB |
Output is correct |
43 |
Correct |
104 ms |
60160 KB |
Output is correct |
44 |
Correct |
102 ms |
60012 KB |
Output is correct |
45 |
Correct |
97 ms |
60160 KB |
Output is correct |
46 |
Correct |
105 ms |
60160 KB |
Output is correct |
47 |
Correct |
82 ms |
58980 KB |
Output is correct |
48 |
Correct |
106 ms |
59400 KB |
Output is correct |
49 |
Correct |
84 ms |
57864 KB |
Output is correct |
50 |
Correct |
88 ms |
58888 KB |
Output is correct |
51 |
Correct |
99 ms |
59996 KB |
Output is correct |
52 |
Correct |
101 ms |
59984 KB |
Output is correct |
53 |
Correct |
80 ms |
58644 KB |
Output is correct |
54 |
Correct |
92 ms |
60164 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
103 ms |
59912 KB |
Output is correct |
2 |
Correct |
111 ms |
60628 KB |
Output is correct |
3 |
Correct |
121 ms |
60748 KB |
Output is correct |
4 |
Correct |
93 ms |
58376 KB |
Output is correct |
5 |
Correct |
105 ms |
59652 KB |
Output is correct |
6 |
Correct |
109 ms |
60940 KB |
Output is correct |
7 |
Correct |
79 ms |
58396 KB |
Output is correct |
8 |
Correct |
82 ms |
58160 KB |
Output is correct |
9 |
Correct |
96 ms |
59932 KB |
Output is correct |
10 |
Correct |
84 ms |
57860 KB |
Output is correct |
11 |
Correct |
103 ms |
60164 KB |
Output is correct |
12 |
Correct |
116 ms |
60164 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
24 ms |
52568 KB |
Output is correct |
2 |
Correct |
25 ms |
52800 KB |
Output is correct |
3 |
Correct |
23 ms |
52552 KB |
Output is correct |
4 |
Correct |
24 ms |
52576 KB |
Output is correct |
5 |
Correct |
26 ms |
52572 KB |
Output is correct |
6 |
Correct |
26 ms |
52560 KB |
Output is correct |
7 |
Correct |
23 ms |
52564 KB |
Output is correct |
8 |
Correct |
21 ms |
52572 KB |
Output is correct |
9 |
Correct |
37 ms |
52756 KB |
Output is correct |
10 |
Correct |
25 ms |
51548 KB |
Output is correct |
11 |
Correct |
25 ms |
51548 KB |
Output is correct |
12 |
Correct |
36 ms |
51536 KB |
Output is correct |
13 |
Correct |
31 ms |
51292 KB |
Output is correct |
14 |
Correct |
36 ms |
51424 KB |
Output is correct |
15 |
Correct |
22 ms |
51292 KB |
Output is correct |
16 |
Correct |
21 ms |
51548 KB |
Output is correct |
17 |
Correct |
35 ms |
51292 KB |
Output is correct |
18 |
Correct |
23 ms |
51544 KB |
Output is correct |
19 |
Correct |
23 ms |
51368 KB |
Output is correct |
20 |
Correct |
26 ms |
52572 KB |
Output is correct |
21 |
Correct |
27 ms |
52604 KB |
Output is correct |
22 |
Correct |
26 ms |
51548 KB |
Output is correct |
23 |
Correct |
25 ms |
51352 KB |
Output is correct |
24 |
Correct |
30 ms |
51416 KB |
Output is correct |
25 |
Correct |
38 ms |
51452 KB |
Output is correct |
26 |
Correct |
27 ms |
51548 KB |
Output is correct |
27 |
Correct |
37 ms |
51548 KB |
Output is correct |
28 |
Correct |
28 ms |
51544 KB |
Output is correct |
29 |
Correct |
30 ms |
51364 KB |
Output is correct |
30 |
Correct |
31 ms |
51540 KB |
Output is correct |
31 |
Correct |
26 ms |
51584 KB |
Output is correct |
32 |
Correct |
29 ms |
51552 KB |
Output is correct |
33 |
Correct |
27 ms |
51364 KB |
Output is correct |
34 |
Correct |
24 ms |
51360 KB |
Output is correct |
35 |
Correct |
39 ms |
51540 KB |
Output is correct |
36 |
Correct |
27 ms |
51540 KB |
Output is correct |
37 |
Correct |
32 ms |
51280 KB |
Output is correct |
38 |
Correct |
30 ms |
51556 KB |
Output is correct |
39 |
Correct |
105 ms |
58924 KB |
Output is correct |
40 |
Correct |
97 ms |
58892 KB |
Output is correct |
41 |
Correct |
108 ms |
59072 KB |
Output is correct |
42 |
Correct |
143 ms |
59032 KB |
Output is correct |
43 |
Correct |
99 ms |
59064 KB |
Output is correct |
44 |
Correct |
94 ms |
59076 KB |
Output is correct |
45 |
Correct |
69 ms |
57372 KB |
Output is correct |
46 |
Correct |
71 ms |
57612 KB |
Output is correct |
47 |
Correct |
140 ms |
59116 KB |
Output is correct |
48 |
Correct |
96 ms |
58960 KB |
Output is correct |
49 |
Correct |
97 ms |
59072 KB |
Output is correct |
50 |
Correct |
100 ms |
58972 KB |
Output is correct |
51 |
Correct |
119 ms |
57860 KB |
Output is correct |
52 |
Correct |
131 ms |
58888 KB |
Output is correct |
53 |
Correct |
114 ms |
58676 KB |
Output is correct |
54 |
Correct |
86 ms |
58884 KB |
Output is correct |
55 |
Correct |
91 ms |
59356 KB |
Output is correct |
56 |
Correct |
77 ms |
58628 KB |
Output is correct |
57 |
Correct |
58 ms |
57604 KB |
Output is correct |
58 |
Correct |
70 ms |
58376 KB |
Output is correct |
59 |
Correct |
99 ms |
59972 KB |
Output is correct |
60 |
Correct |
95 ms |
60164 KB |
Output is correct |
61 |
Correct |
104 ms |
60160 KB |
Output is correct |
62 |
Correct |
102 ms |
60012 KB |
Output is correct |
63 |
Correct |
97 ms |
60160 KB |
Output is correct |
64 |
Correct |
105 ms |
60160 KB |
Output is correct |
65 |
Correct |
82 ms |
58980 KB |
Output is correct |
66 |
Correct |
106 ms |
59400 KB |
Output is correct |
67 |
Correct |
84 ms |
57864 KB |
Output is correct |
68 |
Correct |
88 ms |
58888 KB |
Output is correct |
69 |
Correct |
99 ms |
59996 KB |
Output is correct |
70 |
Correct |
101 ms |
59984 KB |
Output is correct |
71 |
Correct |
80 ms |
58644 KB |
Output is correct |
72 |
Correct |
92 ms |
60164 KB |
Output is correct |
73 |
Correct |
103 ms |
59912 KB |
Output is correct |
74 |
Correct |
111 ms |
60628 KB |
Output is correct |
75 |
Correct |
121 ms |
60748 KB |
Output is correct |
76 |
Correct |
93 ms |
58376 KB |
Output is correct |
77 |
Correct |
105 ms |
59652 KB |
Output is correct |
78 |
Correct |
109 ms |
60940 KB |
Output is correct |
79 |
Correct |
79 ms |
58396 KB |
Output is correct |
80 |
Correct |
82 ms |
58160 KB |
Output is correct |
81 |
Correct |
96 ms |
59932 KB |
Output is correct |
82 |
Correct |
84 ms |
57860 KB |
Output is correct |
83 |
Correct |
103 ms |
60164 KB |
Output is correct |
84 |
Correct |
116 ms |
60164 KB |
Output is correct |
85 |
Correct |
106 ms |
59912 KB |
Output is correct |
86 |
Correct |
101 ms |
60588 KB |
Output is correct |
87 |
Correct |
85 ms |
59744 KB |
Output is correct |
88 |
Correct |
98 ms |
60680 KB |
Output is correct |
89 |
Correct |
74 ms |
58120 KB |
Output is correct |
90 |
Correct |
96 ms |
60672 KB |
Output is correct |
91 |
Correct |
82 ms |
59152 KB |
Output is correct |
92 |
Correct |
84 ms |
58628 KB |
Output is correct |
93 |
Correct |
100 ms |
60680 KB |
Output is correct |
94 |
Correct |
96 ms |
60672 KB |
Output is correct |
95 |
Correct |
101 ms |
60424 KB |
Output is correct |
96 |
Correct |
107 ms |
60476 KB |
Output is correct |
97 |
Correct |
106 ms |
60636 KB |
Output is correct |
98 |
Correct |
100 ms |
59416 KB |
Output is correct |
99 |
Correct |
82 ms |
59656 KB |
Output is correct |
100 |
Correct |
95 ms |
58756 KB |
Output is correct |
101 |
Correct |
100 ms |
59916 KB |
Output is correct |
102 |
Correct |
111 ms |
60420 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
24 ms |
52568 KB |
Output is correct |
2 |
Correct |
25 ms |
52800 KB |
Output is correct |
3 |
Correct |
23 ms |
52552 KB |
Output is correct |
4 |
Correct |
24 ms |
52576 KB |
Output is correct |
5 |
Correct |
26 ms |
52572 KB |
Output is correct |
6 |
Correct |
26 ms |
52560 KB |
Output is correct |
7 |
Correct |
23 ms |
52564 KB |
Output is correct |
8 |
Correct |
21 ms |
52572 KB |
Output is correct |
9 |
Correct |
37 ms |
52756 KB |
Output is correct |
10 |
Correct |
25 ms |
51548 KB |
Output is correct |
11 |
Correct |
25 ms |
51548 KB |
Output is correct |
12 |
Correct |
36 ms |
51536 KB |
Output is correct |
13 |
Correct |
31 ms |
51292 KB |
Output is correct |
14 |
Correct |
36 ms |
51424 KB |
Output is correct |
15 |
Correct |
22 ms |
51292 KB |
Output is correct |
16 |
Correct |
21 ms |
51548 KB |
Output is correct |
17 |
Correct |
35 ms |
51292 KB |
Output is correct |
18 |
Correct |
23 ms |
51544 KB |
Output is correct |
19 |
Correct |
23 ms |
51368 KB |
Output is correct |
20 |
Correct |
26 ms |
52572 KB |
Output is correct |
21 |
Correct |
27 ms |
52604 KB |
Output is correct |
22 |
Correct |
26 ms |
51548 KB |
Output is correct |
23 |
Correct |
25 ms |
51352 KB |
Output is correct |
24 |
Correct |
30 ms |
51416 KB |
Output is correct |
25 |
Correct |
38 ms |
51452 KB |
Output is correct |
26 |
Correct |
27 ms |
51548 KB |
Output is correct |
27 |
Correct |
37 ms |
51548 KB |
Output is correct |
28 |
Correct |
28 ms |
51544 KB |
Output is correct |
29 |
Correct |
30 ms |
51364 KB |
Output is correct |
30 |
Correct |
31 ms |
51540 KB |
Output is correct |
31 |
Correct |
26 ms |
51584 KB |
Output is correct |
32 |
Correct |
29 ms |
51552 KB |
Output is correct |
33 |
Correct |
27 ms |
51364 KB |
Output is correct |
34 |
Correct |
24 ms |
51360 KB |
Output is correct |
35 |
Correct |
39 ms |
51540 KB |
Output is correct |
36 |
Correct |
27 ms |
51540 KB |
Output is correct |
37 |
Correct |
32 ms |
51280 KB |
Output is correct |
38 |
Correct |
30 ms |
51556 KB |
Output is correct |
39 |
Correct |
105 ms |
58924 KB |
Output is correct |
40 |
Correct |
97 ms |
58892 KB |
Output is correct |
41 |
Correct |
108 ms |
59072 KB |
Output is correct |
42 |
Correct |
143 ms |
59032 KB |
Output is correct |
43 |
Correct |
99 ms |
59064 KB |
Output is correct |
44 |
Correct |
94 ms |
59076 KB |
Output is correct |
45 |
Correct |
69 ms |
57372 KB |
Output is correct |
46 |
Correct |
71 ms |
57612 KB |
Output is correct |
47 |
Correct |
140 ms |
59116 KB |
Output is correct |
48 |
Correct |
96 ms |
58960 KB |
Output is correct |
49 |
Correct |
97 ms |
59072 KB |
Output is correct |
50 |
Correct |
100 ms |
58972 KB |
Output is correct |
51 |
Correct |
119 ms |
57860 KB |
Output is correct |
52 |
Correct |
131 ms |
58888 KB |
Output is correct |
53 |
Correct |
114 ms |
58676 KB |
Output is correct |
54 |
Correct |
86 ms |
58884 KB |
Output is correct |
55 |
Correct |
478 ms |
79856 KB |
Output is correct |
56 |
Correct |
382 ms |
74816 KB |
Output is correct |
57 |
Correct |
472 ms |
82456 KB |
Output is correct |
58 |
Correct |
305 ms |
74816 KB |
Output is correct |
59 |
Correct |
304 ms |
74736 KB |
Output is correct |
60 |
Correct |
428 ms |
82484 KB |
Output is correct |
61 |
Correct |
312 ms |
77044 KB |
Output is correct |
62 |
Correct |
252 ms |
76016 KB |
Output is correct |
63 |
Correct |
488 ms |
82932 KB |
Output is correct |
64 |
Correct |
490 ms |
82828 KB |
Output is correct |
65 |
Correct |
436 ms |
82432 KB |
Output is correct |
66 |
Correct |
469 ms |
82268 KB |
Output is correct |
67 |
Correct |
492 ms |
82268 KB |
Output is correct |
68 |
Correct |
478 ms |
82164 KB |
Output is correct |
69 |
Correct |
446 ms |
82164 KB |
Output is correct |
70 |
Correct |
492 ms |
82112 KB |
Output is correct |
71 |
Correct |
455 ms |
82160 KB |
Output is correct |
72 |
Correct |
421 ms |
82416 KB |
Output is correct |
73 |
Correct |
458 ms |
82416 KB |
Output is correct |
74 |
Correct |
444 ms |
82240 KB |
Output is correct |
75 |
Correct |
435 ms |
82244 KB |
Output is correct |
76 |
Correct |
446 ms |
82164 KB |
Output is correct |
77 |
Correct |
437 ms |
82164 KB |
Output is correct |
78 |
Correct |
459 ms |
82164 KB |
Output is correct |
79 |
Correct |
395 ms |
79600 KB |
Output is correct |
80 |
Correct |
412 ms |
80112 KB |
Output is correct |
81 |
Correct |
331 ms |
80628 KB |
Output is correct |
82 |
Correct |
91 ms |
59356 KB |
Output is correct |
83 |
Correct |
77 ms |
58628 KB |
Output is correct |
84 |
Correct |
58 ms |
57604 KB |
Output is correct |
85 |
Correct |
70 ms |
58376 KB |
Output is correct |
86 |
Correct |
99 ms |
59972 KB |
Output is correct |
87 |
Correct |
95 ms |
60164 KB |
Output is correct |
88 |
Correct |
104 ms |
60160 KB |
Output is correct |
89 |
Correct |
102 ms |
60012 KB |
Output is correct |
90 |
Correct |
97 ms |
60160 KB |
Output is correct |
91 |
Correct |
105 ms |
60160 KB |
Output is correct |
92 |
Correct |
82 ms |
58980 KB |
Output is correct |
93 |
Correct |
106 ms |
59400 KB |
Output is correct |
94 |
Correct |
84 ms |
57864 KB |
Output is correct |
95 |
Correct |
88 ms |
58888 KB |
Output is correct |
96 |
Correct |
99 ms |
59996 KB |
Output is correct |
97 |
Correct |
101 ms |
59984 KB |
Output is correct |
98 |
Correct |
80 ms |
58644 KB |
Output is correct |
99 |
Correct |
92 ms |
60164 KB |
Output is correct |
100 |
Correct |
103 ms |
59912 KB |
Output is correct |
101 |
Correct |
111 ms |
60628 KB |
Output is correct |
102 |
Correct |
121 ms |
60748 KB |
Output is correct |
103 |
Correct |
93 ms |
58376 KB |
Output is correct |
104 |
Correct |
105 ms |
59652 KB |
Output is correct |
105 |
Correct |
109 ms |
60940 KB |
Output is correct |
106 |
Correct |
79 ms |
58396 KB |
Output is correct |
107 |
Correct |
82 ms |
58160 KB |
Output is correct |
108 |
Correct |
96 ms |
59932 KB |
Output is correct |
109 |
Correct |
84 ms |
57860 KB |
Output is correct |
110 |
Correct |
103 ms |
60164 KB |
Output is correct |
111 |
Correct |
116 ms |
60164 KB |
Output is correct |
112 |
Correct |
106 ms |
59912 KB |
Output is correct |
113 |
Correct |
101 ms |
60588 KB |
Output is correct |
114 |
Correct |
85 ms |
59744 KB |
Output is correct |
115 |
Correct |
98 ms |
60680 KB |
Output is correct |
116 |
Correct |
74 ms |
58120 KB |
Output is correct |
117 |
Correct |
96 ms |
60672 KB |
Output is correct |
118 |
Correct |
82 ms |
59152 KB |
Output is correct |
119 |
Correct |
84 ms |
58628 KB |
Output is correct |
120 |
Correct |
100 ms |
60680 KB |
Output is correct |
121 |
Correct |
96 ms |
60672 KB |
Output is correct |
122 |
Correct |
101 ms |
60424 KB |
Output is correct |
123 |
Correct |
107 ms |
60476 KB |
Output is correct |
124 |
Correct |
106 ms |
60636 KB |
Output is correct |
125 |
Correct |
100 ms |
59416 KB |
Output is correct |
126 |
Correct |
82 ms |
59656 KB |
Output is correct |
127 |
Correct |
95 ms |
58756 KB |
Output is correct |
128 |
Correct |
100 ms |
59916 KB |
Output is correct |
129 |
Correct |
111 ms |
60420 KB |
Output is correct |
130 |
Correct |
470 ms |
82928 KB |
Output is correct |
131 |
Correct |
324 ms |
74996 KB |
Output is correct |
132 |
Correct |
443 ms |
83192 KB |
Output is correct |
133 |
Correct |
401 ms |
81904 KB |
Output is correct |
134 |
Correct |
356 ms |
78836 KB |
Output is correct |
135 |
Correct |
440 ms |
83280 KB |
Output is correct |
136 |
Correct |
473 ms |
83952 KB |
Output is correct |
137 |
Correct |
472 ms |
83952 KB |
Output is correct |
138 |
Correct |
407 ms |
83016 KB |
Output is correct |
139 |
Correct |
397 ms |
82892 KB |
Output is correct |
140 |
Correct |
433 ms |
82936 KB |
Output is correct |
141 |
Correct |
422 ms |
82928 KB |
Output is correct |
142 |
Correct |
445 ms |
82716 KB |
Output is correct |
143 |
Correct |
438 ms |
82936 KB |
Output is correct |
144 |
Correct |
425 ms |
82928 KB |
Output is correct |
145 |
Correct |
436 ms |
82976 KB |
Output is correct |
146 |
Correct |
444 ms |
82932 KB |
Output is correct |
147 |
Correct |
434 ms |
82888 KB |
Output is correct |
148 |
Correct |
464 ms |
82724 KB |
Output is correct |
149 |
Correct |
462 ms |
82932 KB |
Output is correct |
150 |
Correct |
306 ms |
79088 KB |
Output is correct |
151 |
Correct |
400 ms |
80536 KB |
Output is correct |
152 |
Correct |
414 ms |
80624 KB |
Output is correct |
153 |
Correct |
327 ms |
81400 KB |
Output is correct |