#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define foru(i, l, r) for(int i = l; i <= r; i++)
#define ford(i, r, l) for(int i = r; i >= l; i--)
#define eb emplace_back
typedef pair<int, int> ii;
typedef pair<ii, int> iii;
typedef pair<ii, ii> iiii;
const int N = 4e5 + 5, MAXN = 1e7 + 5;
const long long oo = 1e9 + 7, mod = 1e9 + 7;
/*
upd[]: content of ith update
in[] -> if the ith query is in the segtree
ques[] -> queries that begin/end at i
ask[] -> "service" queries
*/
int n, m, q;
ii upd[N];
bool in[N];
vector<int> ques[N];
vector<ii> ask[N];
struct node{
int mn_pref = oo, mn_pos = 0;
int tol_plus = 0, tol_minus = 0;
node(){}
};
node IT[N << 2];
node merge(node a, node b){
node c;
c.mn_pref = min(a.mn_pref, a.tol_plus - a.tol_minus + b.mn_pref);
c.mn_pos = ((c.mn_pref == a.mn_pref) ? a.mn_pos : b.mn_pos);
c.tol_plus = a.tol_plus + b.tol_plus;
c.tol_minus = a.tol_minus + b.tol_minus;
return c;
}
void update(int id, int l, int r, int pos, bool add){
if(l == r){
//cout << l << " " << r << " " << pos << " " << id << "\n";
IT[id].mn_pref = IT[id].tol_plus = IT[id].tol_minus = 0;
IT[id].mn_pos = l;
if(!add) return;
if(upd[pos].se == 0){
IT[id].mn_pref = -upd[pos].fi;
IT[id].tol_minus = upd[pos].fi;
}
else{
IT[id].mn_pref = upd[pos].fi;
IT[id].tol_plus = upd[pos].fi;
}
return;
}
int mid = (l + r) >> 1;
if(mid >= pos) update(id << 1, l, mid, pos, add);
else update(id << 1 | 1, mid + 1, r, pos, add);
IT[id] = merge(IT[id << 1], IT[id << 1 | 1]);
}
node zero;
node get(int id, int l, int r, int L, int R){
if(l > R || r < L) return zero;
if(l >= L && r <= R) return IT[id];
int mid = (l + r) >> 1;
return merge(get(id << 1, l, mid, L, R), get(id << 1 | 1, mid + 1, r, L, R));
}
int bins(int id, int l, int r, int rem){
if(l == r){
if(rem > IT[id].tol_plus) return -1;
return l;
}
int mid = (l + r) >> 1;
if(IT[id << 1].tol_plus >= rem) return bins(id << 1, l, mid, rem);
else return bins(id << 1 | 1, mid + 1, r, rem - IT[id << 1].tol_plus);
}
int ans[N];
void process(){
cin >> n >> m >> q;
for(int i = 1; i <= q; i++){
int t, l, r, k, c = 0, a, b;
cin >> t;
if(t == 1) cin >> l >> r >> c >> k;
else if(t == 2) cin >> l >> r >> k;
else cin >> a >> b;
//cout << t << "\n";
if(t <= 2){
upd[i] = {k, c};
ques[l].pb(i);
ques[r + 1].pb(i);
}
else{
ask[a].pb({i, b});
}
}
//cout << "OK\n";
//return;
for(int i = 1; i <= n; i++){
for(auto it : ques[i]){
//continue;
in[it] ^= 1;
update(1, 1, q, it, in[it]);
}
//for(int j = 1; j <= q; j++) cout << get(1, 1, q, j, j).tol_plus << "\n";
for(auto it : ask[i]){
//continue;
node temp = get(1, 1, q, 1, it.fi);
if(temp.mn_pref > 0){
temp.mn_pref = temp.mn_pos = 0;
}
//cout << temp.mn_pos << "\n";
//cout << i << " " << it.fi << " " << temp.tol_plus << " " << temp.tol_minus << "\n";
node temp2 = get(1, 1, q, temp.mn_pos + 1, it.fi);
int tol_pluss = temp.tol_plus - temp2.tol_plus;
int posi = bins(1, 1, q, it.se + tol_pluss + temp2.tol_minus);
//cout << it.se << " " << tol_pluss << " " << temp2.tol_minus << "\n";
if(posi < 0 || posi > it.fi) ans[it.fi] = 0;
else ans[it.fi] = upd[posi].se;
}
}
for(int i = 1; i <= q; i++){
if(upd[i].fi) continue;
cout << ans[i] << "\n";
}
}
signed main(){
ios_base::sync_with_stdio(0);
#ifdef nqm
freopen("input.inp", "r", stdin);
freopen("output.out", "w", stdout);
#endif
#ifndef nqm
#endif
process();
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
30 ms |
69324 KB |
Output is correct |
2 |
Correct |
29 ms |
69464 KB |
Output is correct |
3 |
Correct |
31 ms |
69208 KB |
Output is correct |
4 |
Correct |
33 ms |
69356 KB |
Output is correct |
5 |
Correct |
34 ms |
69376 KB |
Output is correct |
6 |
Correct |
40 ms |
69332 KB |
Output is correct |
7 |
Correct |
33 ms |
69264 KB |
Output is correct |
8 |
Correct |
32 ms |
69332 KB |
Output is correct |
9 |
Correct |
31 ms |
69268 KB |
Output is correct |
10 |
Correct |
30 ms |
69344 KB |
Output is correct |
11 |
Correct |
31 ms |
69356 KB |
Output is correct |
12 |
Correct |
32 ms |
69376 KB |
Output is correct |
13 |
Correct |
30 ms |
69248 KB |
Output is correct |
14 |
Correct |
29 ms |
69292 KB |
Output is correct |
15 |
Correct |
35 ms |
69336 KB |
Output is correct |
16 |
Correct |
31 ms |
69324 KB |
Output is correct |
17 |
Correct |
32 ms |
69216 KB |
Output is correct |
18 |
Correct |
30 ms |
69260 KB |
Output is correct |
19 |
Correct |
31 ms |
69400 KB |
Output is correct |
20 |
Correct |
30 ms |
69324 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
30 ms |
69324 KB |
Output is correct |
2 |
Correct |
29 ms |
69464 KB |
Output is correct |
3 |
Correct |
31 ms |
69208 KB |
Output is correct |
4 |
Correct |
33 ms |
69356 KB |
Output is correct |
5 |
Correct |
34 ms |
69376 KB |
Output is correct |
6 |
Correct |
40 ms |
69332 KB |
Output is correct |
7 |
Correct |
33 ms |
69264 KB |
Output is correct |
8 |
Correct |
32 ms |
69332 KB |
Output is correct |
9 |
Correct |
31 ms |
69268 KB |
Output is correct |
10 |
Correct |
30 ms |
69344 KB |
Output is correct |
11 |
Correct |
31 ms |
69356 KB |
Output is correct |
12 |
Correct |
32 ms |
69376 KB |
Output is correct |
13 |
Correct |
30 ms |
69248 KB |
Output is correct |
14 |
Correct |
29 ms |
69292 KB |
Output is correct |
15 |
Correct |
35 ms |
69336 KB |
Output is correct |
16 |
Correct |
31 ms |
69324 KB |
Output is correct |
17 |
Correct |
32 ms |
69216 KB |
Output is correct |
18 |
Correct |
30 ms |
69260 KB |
Output is correct |
19 |
Correct |
31 ms |
69400 KB |
Output is correct |
20 |
Correct |
30 ms |
69324 KB |
Output is correct |
21 |
Correct |
34 ms |
69336 KB |
Output is correct |
22 |
Correct |
32 ms |
69348 KB |
Output is correct |
23 |
Correct |
33 ms |
69284 KB |
Output is correct |
24 |
Correct |
37 ms |
69368 KB |
Output is correct |
25 |
Correct |
38 ms |
69328 KB |
Output is correct |
26 |
Correct |
31 ms |
69296 KB |
Output is correct |
27 |
Correct |
31 ms |
69360 KB |
Output is correct |
28 |
Correct |
31 ms |
69376 KB |
Output is correct |
29 |
Correct |
30 ms |
69356 KB |
Output is correct |
30 |
Correct |
30 ms |
69272 KB |
Output is correct |
31 |
Correct |
31 ms |
69348 KB |
Output is correct |
32 |
Correct |
31 ms |
69300 KB |
Output is correct |
33 |
Correct |
34 ms |
69284 KB |
Output is correct |
34 |
Correct |
34 ms |
69308 KB |
Output is correct |
35 |
Correct |
33 ms |
69348 KB |
Output is correct |
36 |
Correct |
31 ms |
69360 KB |
Output is correct |
37 |
Correct |
31 ms |
69220 KB |
Output is correct |
38 |
Correct |
31 ms |
69332 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
97 ms |
74448 KB |
Output is correct |
2 |
Correct |
101 ms |
74340 KB |
Output is correct |
3 |
Correct |
96 ms |
74316 KB |
Output is correct |
4 |
Correct |
101 ms |
74292 KB |
Output is correct |
5 |
Correct |
107 ms |
74280 KB |
Output is correct |
6 |
Correct |
115 ms |
74364 KB |
Output is correct |
7 |
Correct |
66 ms |
72816 KB |
Output is correct |
8 |
Correct |
60 ms |
72716 KB |
Output is correct |
9 |
Correct |
107 ms |
74380 KB |
Output is correct |
10 |
Correct |
115 ms |
74312 KB |
Output is correct |
11 |
Correct |
118 ms |
74372 KB |
Output is correct |
12 |
Correct |
122 ms |
74332 KB |
Output is correct |
13 |
Correct |
93 ms |
73524 KB |
Output is correct |
14 |
Correct |
98 ms |
74148 KB |
Output is correct |
15 |
Correct |
95 ms |
74076 KB |
Output is correct |
16 |
Correct |
107 ms |
74400 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
410 ms |
88456 KB |
Output is correct |
2 |
Correct |
330 ms |
84752 KB |
Output is correct |
3 |
Correct |
446 ms |
90316 KB |
Output is correct |
4 |
Correct |
313 ms |
85068 KB |
Output is correct |
5 |
Correct |
310 ms |
84800 KB |
Output is correct |
6 |
Correct |
424 ms |
90548 KB |
Output is correct |
7 |
Correct |
193 ms |
83744 KB |
Output is correct |
8 |
Correct |
199 ms |
83916 KB |
Output is correct |
9 |
Correct |
474 ms |
90284 KB |
Output is correct |
10 |
Correct |
405 ms |
90400 KB |
Output is correct |
11 |
Correct |
481 ms |
90328 KB |
Output is correct |
12 |
Correct |
448 ms |
90396 KB |
Output is correct |
13 |
Correct |
471 ms |
90328 KB |
Output is correct |
14 |
Correct |
461 ms |
90260 KB |
Output is correct |
15 |
Correct |
499 ms |
90104 KB |
Output is correct |
16 |
Correct |
518 ms |
90056 KB |
Output is correct |
17 |
Correct |
463 ms |
90176 KB |
Output is correct |
18 |
Correct |
452 ms |
90272 KB |
Output is correct |
19 |
Correct |
442 ms |
90340 KB |
Output is correct |
20 |
Correct |
434 ms |
90096 KB |
Output is correct |
21 |
Correct |
477 ms |
90084 KB |
Output is correct |
22 |
Correct |
511 ms |
90316 KB |
Output is correct |
23 |
Correct |
471 ms |
90304 KB |
Output is correct |
24 |
Correct |
467 ms |
90052 KB |
Output is correct |
25 |
Correct |
387 ms |
87764 KB |
Output is correct |
26 |
Correct |
382 ms |
88308 KB |
Output is correct |
27 |
Correct |
377 ms |
88380 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
30 ms |
69324 KB |
Output is correct |
2 |
Correct |
29 ms |
69464 KB |
Output is correct |
3 |
Correct |
31 ms |
69208 KB |
Output is correct |
4 |
Correct |
33 ms |
69356 KB |
Output is correct |
5 |
Correct |
34 ms |
69376 KB |
Output is correct |
6 |
Correct |
40 ms |
69332 KB |
Output is correct |
7 |
Correct |
33 ms |
69264 KB |
Output is correct |
8 |
Correct |
32 ms |
69332 KB |
Output is correct |
9 |
Correct |
31 ms |
69268 KB |
Output is correct |
10 |
Correct |
30 ms |
69344 KB |
Output is correct |
11 |
Correct |
31 ms |
69356 KB |
Output is correct |
12 |
Correct |
32 ms |
69376 KB |
Output is correct |
13 |
Correct |
30 ms |
69248 KB |
Output is correct |
14 |
Correct |
29 ms |
69292 KB |
Output is correct |
15 |
Correct |
35 ms |
69336 KB |
Output is correct |
16 |
Correct |
31 ms |
69324 KB |
Output is correct |
17 |
Correct |
32 ms |
69216 KB |
Output is correct |
18 |
Correct |
30 ms |
69260 KB |
Output is correct |
19 |
Correct |
31 ms |
69400 KB |
Output is correct |
20 |
Correct |
30 ms |
69324 KB |
Output is correct |
21 |
Correct |
97 ms |
74448 KB |
Output is correct |
22 |
Correct |
101 ms |
74340 KB |
Output is correct |
23 |
Correct |
96 ms |
74316 KB |
Output is correct |
24 |
Correct |
101 ms |
74292 KB |
Output is correct |
25 |
Correct |
107 ms |
74280 KB |
Output is correct |
26 |
Correct |
115 ms |
74364 KB |
Output is correct |
27 |
Correct |
66 ms |
72816 KB |
Output is correct |
28 |
Correct |
60 ms |
72716 KB |
Output is correct |
29 |
Correct |
107 ms |
74380 KB |
Output is correct |
30 |
Correct |
115 ms |
74312 KB |
Output is correct |
31 |
Correct |
118 ms |
74372 KB |
Output is correct |
32 |
Correct |
122 ms |
74332 KB |
Output is correct |
33 |
Correct |
93 ms |
73524 KB |
Output is correct |
34 |
Correct |
98 ms |
74148 KB |
Output is correct |
35 |
Correct |
95 ms |
74076 KB |
Output is correct |
36 |
Correct |
107 ms |
74400 KB |
Output is correct |
37 |
Correct |
100 ms |
73628 KB |
Output is correct |
38 |
Correct |
96 ms |
73392 KB |
Output is correct |
39 |
Correct |
65 ms |
72004 KB |
Output is correct |
40 |
Correct |
64 ms |
72480 KB |
Output is correct |
41 |
Correct |
108 ms |
74168 KB |
Output is correct |
42 |
Correct |
111 ms |
74208 KB |
Output is correct |
43 |
Correct |
128 ms |
74196 KB |
Output is correct |
44 |
Correct |
126 ms |
74192 KB |
Output is correct |
45 |
Correct |
102 ms |
74188 KB |
Output is correct |
46 |
Correct |
115 ms |
74120 KB |
Output is correct |
47 |
Correct |
81 ms |
73056 KB |
Output is correct |
48 |
Correct |
102 ms |
73572 KB |
Output is correct |
49 |
Correct |
95 ms |
72672 KB |
Output is correct |
50 |
Correct |
91 ms |
73472 KB |
Output is correct |
51 |
Correct |
107 ms |
74208 KB |
Output is correct |
52 |
Correct |
110 ms |
74204 KB |
Output is correct |
53 |
Correct |
91 ms |
73192 KB |
Output is correct |
54 |
Correct |
119 ms |
74260 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
105 ms |
74256 KB |
Output is correct |
2 |
Correct |
118 ms |
74740 KB |
Output is correct |
3 |
Correct |
112 ms |
74828 KB |
Output is correct |
4 |
Correct |
91 ms |
73236 KB |
Output is correct |
5 |
Correct |
100 ms |
74116 KB |
Output is correct |
6 |
Correct |
113 ms |
74788 KB |
Output is correct |
7 |
Correct |
83 ms |
73088 KB |
Output is correct |
8 |
Correct |
66 ms |
72892 KB |
Output is correct |
9 |
Correct |
81 ms |
73920 KB |
Output is correct |
10 |
Correct |
77 ms |
72732 KB |
Output is correct |
11 |
Correct |
106 ms |
74244 KB |
Output is correct |
12 |
Correct |
103 ms |
74188 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
30 ms |
69324 KB |
Output is correct |
2 |
Correct |
29 ms |
69464 KB |
Output is correct |
3 |
Correct |
31 ms |
69208 KB |
Output is correct |
4 |
Correct |
33 ms |
69356 KB |
Output is correct |
5 |
Correct |
34 ms |
69376 KB |
Output is correct |
6 |
Correct |
40 ms |
69332 KB |
Output is correct |
7 |
Correct |
33 ms |
69264 KB |
Output is correct |
8 |
Correct |
32 ms |
69332 KB |
Output is correct |
9 |
Correct |
31 ms |
69268 KB |
Output is correct |
10 |
Correct |
30 ms |
69344 KB |
Output is correct |
11 |
Correct |
31 ms |
69356 KB |
Output is correct |
12 |
Correct |
32 ms |
69376 KB |
Output is correct |
13 |
Correct |
30 ms |
69248 KB |
Output is correct |
14 |
Correct |
29 ms |
69292 KB |
Output is correct |
15 |
Correct |
35 ms |
69336 KB |
Output is correct |
16 |
Correct |
31 ms |
69324 KB |
Output is correct |
17 |
Correct |
32 ms |
69216 KB |
Output is correct |
18 |
Correct |
30 ms |
69260 KB |
Output is correct |
19 |
Correct |
31 ms |
69400 KB |
Output is correct |
20 |
Correct |
30 ms |
69324 KB |
Output is correct |
21 |
Correct |
34 ms |
69336 KB |
Output is correct |
22 |
Correct |
32 ms |
69348 KB |
Output is correct |
23 |
Correct |
33 ms |
69284 KB |
Output is correct |
24 |
Correct |
37 ms |
69368 KB |
Output is correct |
25 |
Correct |
38 ms |
69328 KB |
Output is correct |
26 |
Correct |
31 ms |
69296 KB |
Output is correct |
27 |
Correct |
31 ms |
69360 KB |
Output is correct |
28 |
Correct |
31 ms |
69376 KB |
Output is correct |
29 |
Correct |
30 ms |
69356 KB |
Output is correct |
30 |
Correct |
30 ms |
69272 KB |
Output is correct |
31 |
Correct |
31 ms |
69348 KB |
Output is correct |
32 |
Correct |
31 ms |
69300 KB |
Output is correct |
33 |
Correct |
34 ms |
69284 KB |
Output is correct |
34 |
Correct |
34 ms |
69308 KB |
Output is correct |
35 |
Correct |
33 ms |
69348 KB |
Output is correct |
36 |
Correct |
31 ms |
69360 KB |
Output is correct |
37 |
Correct |
31 ms |
69220 KB |
Output is correct |
38 |
Correct |
31 ms |
69332 KB |
Output is correct |
39 |
Correct |
97 ms |
74448 KB |
Output is correct |
40 |
Correct |
101 ms |
74340 KB |
Output is correct |
41 |
Correct |
96 ms |
74316 KB |
Output is correct |
42 |
Correct |
101 ms |
74292 KB |
Output is correct |
43 |
Correct |
107 ms |
74280 KB |
Output is correct |
44 |
Correct |
115 ms |
74364 KB |
Output is correct |
45 |
Correct |
66 ms |
72816 KB |
Output is correct |
46 |
Correct |
60 ms |
72716 KB |
Output is correct |
47 |
Correct |
107 ms |
74380 KB |
Output is correct |
48 |
Correct |
115 ms |
74312 KB |
Output is correct |
49 |
Correct |
118 ms |
74372 KB |
Output is correct |
50 |
Correct |
122 ms |
74332 KB |
Output is correct |
51 |
Correct |
93 ms |
73524 KB |
Output is correct |
52 |
Correct |
98 ms |
74148 KB |
Output is correct |
53 |
Correct |
95 ms |
74076 KB |
Output is correct |
54 |
Correct |
107 ms |
74400 KB |
Output is correct |
55 |
Correct |
100 ms |
73628 KB |
Output is correct |
56 |
Correct |
96 ms |
73392 KB |
Output is correct |
57 |
Correct |
65 ms |
72004 KB |
Output is correct |
58 |
Correct |
64 ms |
72480 KB |
Output is correct |
59 |
Correct |
108 ms |
74168 KB |
Output is correct |
60 |
Correct |
111 ms |
74208 KB |
Output is correct |
61 |
Correct |
128 ms |
74196 KB |
Output is correct |
62 |
Correct |
126 ms |
74192 KB |
Output is correct |
63 |
Correct |
102 ms |
74188 KB |
Output is correct |
64 |
Correct |
115 ms |
74120 KB |
Output is correct |
65 |
Correct |
81 ms |
73056 KB |
Output is correct |
66 |
Correct |
102 ms |
73572 KB |
Output is correct |
67 |
Correct |
95 ms |
72672 KB |
Output is correct |
68 |
Correct |
91 ms |
73472 KB |
Output is correct |
69 |
Correct |
107 ms |
74208 KB |
Output is correct |
70 |
Correct |
110 ms |
74204 KB |
Output is correct |
71 |
Correct |
91 ms |
73192 KB |
Output is correct |
72 |
Correct |
119 ms |
74260 KB |
Output is correct |
73 |
Correct |
105 ms |
74256 KB |
Output is correct |
74 |
Correct |
118 ms |
74740 KB |
Output is correct |
75 |
Correct |
112 ms |
74828 KB |
Output is correct |
76 |
Correct |
91 ms |
73236 KB |
Output is correct |
77 |
Correct |
100 ms |
74116 KB |
Output is correct |
78 |
Correct |
113 ms |
74788 KB |
Output is correct |
79 |
Correct |
83 ms |
73088 KB |
Output is correct |
80 |
Correct |
66 ms |
72892 KB |
Output is correct |
81 |
Correct |
81 ms |
73920 KB |
Output is correct |
82 |
Correct |
77 ms |
72732 KB |
Output is correct |
83 |
Correct |
106 ms |
74244 KB |
Output is correct |
84 |
Correct |
103 ms |
74188 KB |
Output is correct |
85 |
Correct |
105 ms |
74092 KB |
Output is correct |
86 |
Correct |
112 ms |
74716 KB |
Output is correct |
87 |
Correct |
100 ms |
74080 KB |
Output is correct |
88 |
Correct |
123 ms |
74796 KB |
Output is correct |
89 |
Correct |
95 ms |
72928 KB |
Output is correct |
90 |
Correct |
115 ms |
74672 KB |
Output is correct |
91 |
Correct |
96 ms |
73680 KB |
Output is correct |
92 |
Correct |
91 ms |
73432 KB |
Output is correct |
93 |
Correct |
117 ms |
74704 KB |
Output is correct |
94 |
Correct |
148 ms |
74724 KB |
Output is correct |
95 |
Correct |
110 ms |
74464 KB |
Output is correct |
96 |
Correct |
126 ms |
74700 KB |
Output is correct |
97 |
Correct |
111 ms |
74688 KB |
Output is correct |
98 |
Correct |
94 ms |
73768 KB |
Output is correct |
99 |
Correct |
88 ms |
73536 KB |
Output is correct |
100 |
Correct |
93 ms |
73148 KB |
Output is correct |
101 |
Correct |
96 ms |
74096 KB |
Output is correct |
102 |
Correct |
93 ms |
74316 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
30 ms |
69324 KB |
Output is correct |
2 |
Correct |
29 ms |
69464 KB |
Output is correct |
3 |
Correct |
31 ms |
69208 KB |
Output is correct |
4 |
Correct |
33 ms |
69356 KB |
Output is correct |
5 |
Correct |
34 ms |
69376 KB |
Output is correct |
6 |
Correct |
40 ms |
69332 KB |
Output is correct |
7 |
Correct |
33 ms |
69264 KB |
Output is correct |
8 |
Correct |
32 ms |
69332 KB |
Output is correct |
9 |
Correct |
31 ms |
69268 KB |
Output is correct |
10 |
Correct |
30 ms |
69344 KB |
Output is correct |
11 |
Correct |
31 ms |
69356 KB |
Output is correct |
12 |
Correct |
32 ms |
69376 KB |
Output is correct |
13 |
Correct |
30 ms |
69248 KB |
Output is correct |
14 |
Correct |
29 ms |
69292 KB |
Output is correct |
15 |
Correct |
35 ms |
69336 KB |
Output is correct |
16 |
Correct |
31 ms |
69324 KB |
Output is correct |
17 |
Correct |
32 ms |
69216 KB |
Output is correct |
18 |
Correct |
30 ms |
69260 KB |
Output is correct |
19 |
Correct |
31 ms |
69400 KB |
Output is correct |
20 |
Correct |
30 ms |
69324 KB |
Output is correct |
21 |
Correct |
34 ms |
69336 KB |
Output is correct |
22 |
Correct |
32 ms |
69348 KB |
Output is correct |
23 |
Correct |
33 ms |
69284 KB |
Output is correct |
24 |
Correct |
37 ms |
69368 KB |
Output is correct |
25 |
Correct |
38 ms |
69328 KB |
Output is correct |
26 |
Correct |
31 ms |
69296 KB |
Output is correct |
27 |
Correct |
31 ms |
69360 KB |
Output is correct |
28 |
Correct |
31 ms |
69376 KB |
Output is correct |
29 |
Correct |
30 ms |
69356 KB |
Output is correct |
30 |
Correct |
30 ms |
69272 KB |
Output is correct |
31 |
Correct |
31 ms |
69348 KB |
Output is correct |
32 |
Correct |
31 ms |
69300 KB |
Output is correct |
33 |
Correct |
34 ms |
69284 KB |
Output is correct |
34 |
Correct |
34 ms |
69308 KB |
Output is correct |
35 |
Correct |
33 ms |
69348 KB |
Output is correct |
36 |
Correct |
31 ms |
69360 KB |
Output is correct |
37 |
Correct |
31 ms |
69220 KB |
Output is correct |
38 |
Correct |
31 ms |
69332 KB |
Output is correct |
39 |
Correct |
97 ms |
74448 KB |
Output is correct |
40 |
Correct |
101 ms |
74340 KB |
Output is correct |
41 |
Correct |
96 ms |
74316 KB |
Output is correct |
42 |
Correct |
101 ms |
74292 KB |
Output is correct |
43 |
Correct |
107 ms |
74280 KB |
Output is correct |
44 |
Correct |
115 ms |
74364 KB |
Output is correct |
45 |
Correct |
66 ms |
72816 KB |
Output is correct |
46 |
Correct |
60 ms |
72716 KB |
Output is correct |
47 |
Correct |
107 ms |
74380 KB |
Output is correct |
48 |
Correct |
115 ms |
74312 KB |
Output is correct |
49 |
Correct |
118 ms |
74372 KB |
Output is correct |
50 |
Correct |
122 ms |
74332 KB |
Output is correct |
51 |
Correct |
93 ms |
73524 KB |
Output is correct |
52 |
Correct |
98 ms |
74148 KB |
Output is correct |
53 |
Correct |
95 ms |
74076 KB |
Output is correct |
54 |
Correct |
107 ms |
74400 KB |
Output is correct |
55 |
Correct |
410 ms |
88456 KB |
Output is correct |
56 |
Correct |
330 ms |
84752 KB |
Output is correct |
57 |
Correct |
446 ms |
90316 KB |
Output is correct |
58 |
Correct |
313 ms |
85068 KB |
Output is correct |
59 |
Correct |
310 ms |
84800 KB |
Output is correct |
60 |
Correct |
424 ms |
90548 KB |
Output is correct |
61 |
Correct |
193 ms |
83744 KB |
Output is correct |
62 |
Correct |
199 ms |
83916 KB |
Output is correct |
63 |
Correct |
474 ms |
90284 KB |
Output is correct |
64 |
Correct |
405 ms |
90400 KB |
Output is correct |
65 |
Correct |
481 ms |
90328 KB |
Output is correct |
66 |
Correct |
448 ms |
90396 KB |
Output is correct |
67 |
Correct |
471 ms |
90328 KB |
Output is correct |
68 |
Correct |
461 ms |
90260 KB |
Output is correct |
69 |
Correct |
499 ms |
90104 KB |
Output is correct |
70 |
Correct |
518 ms |
90056 KB |
Output is correct |
71 |
Correct |
463 ms |
90176 KB |
Output is correct |
72 |
Correct |
452 ms |
90272 KB |
Output is correct |
73 |
Correct |
442 ms |
90340 KB |
Output is correct |
74 |
Correct |
434 ms |
90096 KB |
Output is correct |
75 |
Correct |
477 ms |
90084 KB |
Output is correct |
76 |
Correct |
511 ms |
90316 KB |
Output is correct |
77 |
Correct |
471 ms |
90304 KB |
Output is correct |
78 |
Correct |
467 ms |
90052 KB |
Output is correct |
79 |
Correct |
387 ms |
87764 KB |
Output is correct |
80 |
Correct |
382 ms |
88308 KB |
Output is correct |
81 |
Correct |
377 ms |
88380 KB |
Output is correct |
82 |
Correct |
100 ms |
73628 KB |
Output is correct |
83 |
Correct |
96 ms |
73392 KB |
Output is correct |
84 |
Correct |
65 ms |
72004 KB |
Output is correct |
85 |
Correct |
64 ms |
72480 KB |
Output is correct |
86 |
Correct |
108 ms |
74168 KB |
Output is correct |
87 |
Correct |
111 ms |
74208 KB |
Output is correct |
88 |
Correct |
128 ms |
74196 KB |
Output is correct |
89 |
Correct |
126 ms |
74192 KB |
Output is correct |
90 |
Correct |
102 ms |
74188 KB |
Output is correct |
91 |
Correct |
115 ms |
74120 KB |
Output is correct |
92 |
Correct |
81 ms |
73056 KB |
Output is correct |
93 |
Correct |
102 ms |
73572 KB |
Output is correct |
94 |
Correct |
95 ms |
72672 KB |
Output is correct |
95 |
Correct |
91 ms |
73472 KB |
Output is correct |
96 |
Correct |
107 ms |
74208 KB |
Output is correct |
97 |
Correct |
110 ms |
74204 KB |
Output is correct |
98 |
Correct |
91 ms |
73192 KB |
Output is correct |
99 |
Correct |
119 ms |
74260 KB |
Output is correct |
100 |
Correct |
105 ms |
74256 KB |
Output is correct |
101 |
Correct |
118 ms |
74740 KB |
Output is correct |
102 |
Correct |
112 ms |
74828 KB |
Output is correct |
103 |
Correct |
91 ms |
73236 KB |
Output is correct |
104 |
Correct |
100 ms |
74116 KB |
Output is correct |
105 |
Correct |
113 ms |
74788 KB |
Output is correct |
106 |
Correct |
83 ms |
73088 KB |
Output is correct |
107 |
Correct |
66 ms |
72892 KB |
Output is correct |
108 |
Correct |
81 ms |
73920 KB |
Output is correct |
109 |
Correct |
77 ms |
72732 KB |
Output is correct |
110 |
Correct |
106 ms |
74244 KB |
Output is correct |
111 |
Correct |
103 ms |
74188 KB |
Output is correct |
112 |
Correct |
105 ms |
74092 KB |
Output is correct |
113 |
Correct |
112 ms |
74716 KB |
Output is correct |
114 |
Correct |
100 ms |
74080 KB |
Output is correct |
115 |
Correct |
123 ms |
74796 KB |
Output is correct |
116 |
Correct |
95 ms |
72928 KB |
Output is correct |
117 |
Correct |
115 ms |
74672 KB |
Output is correct |
118 |
Correct |
96 ms |
73680 KB |
Output is correct |
119 |
Correct |
91 ms |
73432 KB |
Output is correct |
120 |
Correct |
117 ms |
74704 KB |
Output is correct |
121 |
Correct |
148 ms |
74724 KB |
Output is correct |
122 |
Correct |
110 ms |
74464 KB |
Output is correct |
123 |
Correct |
126 ms |
74700 KB |
Output is correct |
124 |
Correct |
111 ms |
74688 KB |
Output is correct |
125 |
Correct |
94 ms |
73768 KB |
Output is correct |
126 |
Correct |
88 ms |
73536 KB |
Output is correct |
127 |
Correct |
93 ms |
73148 KB |
Output is correct |
128 |
Correct |
96 ms |
74096 KB |
Output is correct |
129 |
Correct |
93 ms |
74316 KB |
Output is correct |
130 |
Correct |
434 ms |
90788 KB |
Output is correct |
131 |
Correct |
323 ms |
84880 KB |
Output is correct |
132 |
Correct |
445 ms |
90844 KB |
Output is correct |
133 |
Correct |
400 ms |
90136 KB |
Output is correct |
134 |
Correct |
413 ms |
88036 KB |
Output is correct |
135 |
Correct |
402 ms |
91116 KB |
Output is correct |
136 |
Correct |
412 ms |
91316 KB |
Output is correct |
137 |
Correct |
424 ms |
91276 KB |
Output is correct |
138 |
Correct |
421 ms |
90928 KB |
Output is correct |
139 |
Correct |
465 ms |
90852 KB |
Output is correct |
140 |
Correct |
446 ms |
90784 KB |
Output is correct |
141 |
Correct |
431 ms |
90740 KB |
Output is correct |
142 |
Correct |
480 ms |
90744 KB |
Output is correct |
143 |
Correct |
438 ms |
90724 KB |
Output is correct |
144 |
Correct |
475 ms |
90804 KB |
Output is correct |
145 |
Correct |
472 ms |
90812 KB |
Output is correct |
146 |
Correct |
443 ms |
90756 KB |
Output is correct |
147 |
Correct |
445 ms |
90748 KB |
Output is correct |
148 |
Correct |
444 ms |
90856 KB |
Output is correct |
149 |
Correct |
433 ms |
90736 KB |
Output is correct |
150 |
Correct |
260 ms |
86396 KB |
Output is correct |
151 |
Correct |
374 ms |
88840 KB |
Output is correct |
152 |
Correct |
396 ms |
88784 KB |
Output is correct |
153 |
Correct |
349 ms |
89312 KB |
Output is correct |