#include "bits/stdc++.h"
using namespace std;
#define ar array
#define int long long
const int N = 25e4 + 5;
struct node{
int t, l, r, c, k, a, b;
};
struct BIT{
int tree[N<<2], p[2][N<<2];
void push(int x, int lx, int rx){
if(lx == rx) return;
tree[x<<1] += p[0][x], tree[x<<1|1] += p[0][x];
p[0][x<<1] += p[0][x], p[0][x<<1|1] += p[0][x];
p[1][x<<1] += p[0][x], p[1][x<<1|1] += p[0][x];
tree[x<<1] = max(tree[x<<1], p[1][x]);
p[1][x<<1] = max(p[1][x<<1], p[1][x]);
//~ p[0][x<<1] = max(p[0][x<<1], p[1][x]);
tree[x<<1|1] = max(tree[x<<1|1], p[1][x]);
p[1][x<<1|1] = max(p[1][x<<1|1], p[1][x]);
//~ p[0][x<<1|1] = max(p[0][x<<1|1], p[1][x]);
p[0][x] = 0, p[1][x] = -1e18;
}
void add(int l, int r, int v, int lx = 0, int rx = N, int x = 1){
if(lx > r || rx < l) return;
push(x, lx, rx);
if(lx >= l && rx <= r){
tree[x] += v, p[0][x] += v, p[1][x] += v;
return;
} int m = (lx + rx) >> 1;
add(l, r, v, lx, m, x<<1),
add(l, r, v, m+1, rx, x<<1|1);
tree[x] = max(tree[x<<1], tree[x<<1|1]);
}
void umax(int l, int r, int v, int lx = 0, int rx = N, int x = 1){
if(lx > r || rx < l) return;
if(lx >= l && rx <= r){
tree[x] = max(tree[x], v);
p[1][x] = max(p[1][x], v);
//~ p[0][x] = max(p[0][x], v);
return;
} int m = (lx + rx) >> 1;
push(x, lx, rx);
umax(l, r, v, lx, m, x<<1),
umax(l, r, v, m+1, rx, x<<1|1);
tree[x] = max(tree[x<<1], tree[x<<1|1]);
}
int get(int i, int lx = 0, int rx = N, int x = 1){
if(lx == rx) return tree[x];
push(x, lx, rx);
int m = (lx + rx) >> 1;
if(i <= m) return get(i, lx, m, x<<1);
else return get(i, m+1, rx, x<<1|1);
}
}cur, tot;
struct ST2{
ar<int, 2> tree[N<<2];
int p[N<<2];
void push(int x, int lx, int rx){
if(lx == rx) return;
tree[x<<1][0] += p[x], tree[x<<1|1][0] += p[x];
p[x<<1] += p[x], p[x<<1|1] += p[x];
p[x] = 0;
}
void sett(int i, int v, int lx = 0, int rx = N, int x = 1){
if(lx == rx) { tree[x] = {v, i}; return; }
int m = (lx + rx) >> 1;
push(x, lx, rx);
if(i <= m) sett(i, v, lx, m, x<<1);
else sett(i, v, m+1, rx, x<<1|1);
tree[x] = min(tree[x<<1], tree[x<<1|1]);
}
void add(int l, int r, int v, int lx = 0, int rx = N, int x = 1){
if(lx > r || rx < l) return;
if(lx >= l && rx <= r){
tree[x][0] += v;
p[x] += v; return;
} int m = (lx + rx) >> 1;
push(x, lx, rx);
add(l, r, v, lx, m, x<<1),
add(l, r, v, m+1, rx, x<<1|1);
tree[x] = min(tree[x<<1], tree[x<<1|1]);
}
ar<int, 2> get(int l, int r, int lx = 0, int rx = N, int x = 1){
if(lx > r || rx < l) return {(int)1e18, (int)1e18};
if(lx >= l && rx <= r) return tree[x];
int m = (lx + rx) >> 1;
push(x, lx, rx);
return min(get(l, r, lx, m, x<<1), get(l, r, m+1, rx, x<<1|1));
}
}tree;
int res[N], pos[N];
vector<int> qq[N];
node a[N];
signed main(){
ios::sync_with_stdio(0); cin.tie(0);
memset(cur.p[1], 128, sizeof cur.p[1]);
int n, m, q; cin>>n>>m>>q;
for(int i=0;i<q;i++){
cin>>a[i].t;
if(a[i].t == 1){
cin>>a[i].l>>a[i].r>>a[i].c>>a[i].k;
cur.add(a[i].l, a[i].r, a[i].k);
tot.add(a[i].l, a[i].r, a[i].k);
} if(a[i].t == 2){
cin>>a[i].l>>a[i].r>>a[i].k;
cur.add(a[i].l, a[i].r, -a[i].k);
cur.umax(a[i].l, a[i].r, 0);
} if(a[i].t == 3){
cin>>a[i].a>>a[i].b;
int c = cur.get(a[i].a), t = tot.get(a[i].a) - c;
if(a[i].b > c) res[i] = 0;
else {
qq[a[i].a].push_back(i);
pos[i] = t + a[i].b;
}
}
}
for(int i=1;i<=n;i++){
sort(qq[i].begin(), qq[i].end(), [&](int i, int j){
return (pos[i] > pos[j]);
});
if(qq[i].empty()) tree.sett(i, 1e18);
else tree.sett(i, pos[qq[i].back()]);
}
for(auto x : a){
if(x.t != 1) continue;
tree.add(x.l, x.r, -x.k);
auto mn = tree.get(x.l, x.r);
while(mn[0] <= 0){
int i = mn[1], last = qq[i].back();
qq[i].pop_back();
res[last] = x.c;
if(qq[i].empty()) tree.sett(i, 1e18);
else tree.sett(i, pos[qq[i].back()] - pos[last] + mn[0]);
mn = tree.get(x.l, x.r);
}
}
for(int i=0;i<q;i++){
if(a[i].t == 3) cout<<res[i]<<"\n";
} cout<<"\n";
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
14668 KB |
Output is correct |
2 |
Correct |
14 ms |
14764 KB |
Output is correct |
3 |
Correct |
11 ms |
14700 KB |
Output is correct |
4 |
Correct |
22 ms |
14796 KB |
Output is correct |
5 |
Correct |
10 ms |
14540 KB |
Output is correct |
6 |
Correct |
11 ms |
14540 KB |
Output is correct |
7 |
Correct |
12 ms |
14760 KB |
Output is correct |
8 |
Correct |
13 ms |
14796 KB |
Output is correct |
9 |
Correct |
17 ms |
14796 KB |
Output is correct |
10 |
Correct |
13 ms |
14796 KB |
Output is correct |
11 |
Correct |
13 ms |
14844 KB |
Output is correct |
12 |
Correct |
12 ms |
14792 KB |
Output is correct |
13 |
Correct |
11 ms |
14668 KB |
Output is correct |
14 |
Correct |
16 ms |
14832 KB |
Output is correct |
15 |
Correct |
13 ms |
14780 KB |
Output is correct |
16 |
Correct |
21 ms |
14748 KB |
Output is correct |
17 |
Correct |
12 ms |
14728 KB |
Output is correct |
18 |
Correct |
13 ms |
14796 KB |
Output is correct |
19 |
Correct |
12 ms |
14740 KB |
Output is correct |
20 |
Correct |
21 ms |
14824 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
14668 KB |
Output is correct |
2 |
Correct |
14 ms |
14764 KB |
Output is correct |
3 |
Correct |
11 ms |
14700 KB |
Output is correct |
4 |
Correct |
22 ms |
14796 KB |
Output is correct |
5 |
Correct |
10 ms |
14540 KB |
Output is correct |
6 |
Correct |
11 ms |
14540 KB |
Output is correct |
7 |
Correct |
12 ms |
14760 KB |
Output is correct |
8 |
Correct |
13 ms |
14796 KB |
Output is correct |
9 |
Correct |
17 ms |
14796 KB |
Output is correct |
10 |
Correct |
13 ms |
14796 KB |
Output is correct |
11 |
Correct |
13 ms |
14844 KB |
Output is correct |
12 |
Correct |
12 ms |
14792 KB |
Output is correct |
13 |
Correct |
11 ms |
14668 KB |
Output is correct |
14 |
Correct |
16 ms |
14832 KB |
Output is correct |
15 |
Correct |
13 ms |
14780 KB |
Output is correct |
16 |
Correct |
21 ms |
14748 KB |
Output is correct |
17 |
Correct |
12 ms |
14728 KB |
Output is correct |
18 |
Correct |
13 ms |
14796 KB |
Output is correct |
19 |
Correct |
12 ms |
14740 KB |
Output is correct |
20 |
Correct |
21 ms |
14824 KB |
Output is correct |
21 |
Correct |
12 ms |
14796 KB |
Output is correct |
22 |
Correct |
14 ms |
14732 KB |
Output is correct |
23 |
Correct |
13 ms |
14668 KB |
Output is correct |
24 |
Correct |
15 ms |
14840 KB |
Output is correct |
25 |
Correct |
10 ms |
14540 KB |
Output is correct |
26 |
Correct |
11 ms |
14476 KB |
Output is correct |
27 |
Correct |
12 ms |
14724 KB |
Output is correct |
28 |
Correct |
15 ms |
14924 KB |
Output is correct |
29 |
Correct |
14 ms |
14796 KB |
Output is correct |
30 |
Correct |
13 ms |
14796 KB |
Output is correct |
31 |
Correct |
12 ms |
14796 KB |
Output is correct |
32 |
Correct |
13 ms |
14804 KB |
Output is correct |
33 |
Correct |
13 ms |
14668 KB |
Output is correct |
34 |
Correct |
20 ms |
14796 KB |
Output is correct |
35 |
Correct |
19 ms |
14676 KB |
Output is correct |
36 |
Correct |
13 ms |
14796 KB |
Output is correct |
37 |
Correct |
18 ms |
14612 KB |
Output is correct |
38 |
Correct |
12 ms |
14796 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
120 ms |
27004 KB |
Output is correct |
2 |
Correct |
134 ms |
27064 KB |
Output is correct |
3 |
Correct |
127 ms |
27092 KB |
Output is correct |
4 |
Correct |
122 ms |
27020 KB |
Output is correct |
5 |
Correct |
137 ms |
27204 KB |
Output is correct |
6 |
Correct |
143 ms |
26984 KB |
Output is correct |
7 |
Correct |
71 ms |
18764 KB |
Output is correct |
8 |
Correct |
65 ms |
18920 KB |
Output is correct |
9 |
Correct |
119 ms |
27240 KB |
Output is correct |
10 |
Correct |
120 ms |
27004 KB |
Output is correct |
11 |
Correct |
131 ms |
27072 KB |
Output is correct |
12 |
Correct |
129 ms |
26988 KB |
Output is correct |
13 |
Correct |
109 ms |
24452 KB |
Output is correct |
14 |
Correct |
120 ms |
27648 KB |
Output is correct |
15 |
Correct |
163 ms |
24624 KB |
Output is correct |
16 |
Correct |
147 ms |
27524 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
756 ms |
61564 KB |
Output is correct |
2 |
Correct |
570 ms |
54068 KB |
Output is correct |
3 |
Correct |
820 ms |
66208 KB |
Output is correct |
4 |
Correct |
650 ms |
60444 KB |
Output is correct |
5 |
Correct |
629 ms |
52944 KB |
Output is correct |
6 |
Correct |
862 ms |
65856 KB |
Output is correct |
7 |
Correct |
261 ms |
32664 KB |
Output is correct |
8 |
Correct |
270 ms |
32804 KB |
Output is correct |
9 |
Correct |
849 ms |
66880 KB |
Output is correct |
10 |
Correct |
879 ms |
66872 KB |
Output is correct |
11 |
Correct |
877 ms |
65840 KB |
Output is correct |
12 |
Correct |
795 ms |
65852 KB |
Output is correct |
13 |
Correct |
800 ms |
65732 KB |
Output is correct |
14 |
Correct |
785 ms |
65776 KB |
Output is correct |
15 |
Correct |
781 ms |
65896 KB |
Output is correct |
16 |
Correct |
788 ms |
65768 KB |
Output is correct |
17 |
Correct |
779 ms |
65784 KB |
Output is correct |
18 |
Correct |
768 ms |
65860 KB |
Output is correct |
19 |
Correct |
812 ms |
65744 KB |
Output is correct |
20 |
Correct |
764 ms |
65836 KB |
Output is correct |
21 |
Correct |
765 ms |
65904 KB |
Output is correct |
22 |
Correct |
755 ms |
65860 KB |
Output is correct |
23 |
Correct |
770 ms |
65728 KB |
Output is correct |
24 |
Correct |
768 ms |
65808 KB |
Output is correct |
25 |
Correct |
563 ms |
58920 KB |
Output is correct |
26 |
Correct |
602 ms |
66264 KB |
Output is correct |
27 |
Correct |
569 ms |
63556 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
14668 KB |
Output is correct |
2 |
Correct |
14 ms |
14764 KB |
Output is correct |
3 |
Correct |
11 ms |
14700 KB |
Output is correct |
4 |
Correct |
22 ms |
14796 KB |
Output is correct |
5 |
Correct |
10 ms |
14540 KB |
Output is correct |
6 |
Correct |
11 ms |
14540 KB |
Output is correct |
7 |
Correct |
12 ms |
14760 KB |
Output is correct |
8 |
Correct |
13 ms |
14796 KB |
Output is correct |
9 |
Correct |
17 ms |
14796 KB |
Output is correct |
10 |
Correct |
13 ms |
14796 KB |
Output is correct |
11 |
Correct |
13 ms |
14844 KB |
Output is correct |
12 |
Correct |
12 ms |
14792 KB |
Output is correct |
13 |
Correct |
11 ms |
14668 KB |
Output is correct |
14 |
Correct |
16 ms |
14832 KB |
Output is correct |
15 |
Correct |
13 ms |
14780 KB |
Output is correct |
16 |
Correct |
21 ms |
14748 KB |
Output is correct |
17 |
Correct |
12 ms |
14728 KB |
Output is correct |
18 |
Correct |
13 ms |
14796 KB |
Output is correct |
19 |
Correct |
12 ms |
14740 KB |
Output is correct |
20 |
Correct |
21 ms |
14824 KB |
Output is correct |
21 |
Correct |
120 ms |
27004 KB |
Output is correct |
22 |
Correct |
134 ms |
27064 KB |
Output is correct |
23 |
Correct |
127 ms |
27092 KB |
Output is correct |
24 |
Correct |
122 ms |
27020 KB |
Output is correct |
25 |
Correct |
137 ms |
27204 KB |
Output is correct |
26 |
Correct |
143 ms |
26984 KB |
Output is correct |
27 |
Correct |
71 ms |
18764 KB |
Output is correct |
28 |
Correct |
65 ms |
18920 KB |
Output is correct |
29 |
Correct |
119 ms |
27240 KB |
Output is correct |
30 |
Correct |
120 ms |
27004 KB |
Output is correct |
31 |
Correct |
131 ms |
27072 KB |
Output is correct |
32 |
Correct |
129 ms |
26988 KB |
Output is correct |
33 |
Correct |
109 ms |
24452 KB |
Output is correct |
34 |
Correct |
120 ms |
27648 KB |
Output is correct |
35 |
Correct |
163 ms |
24624 KB |
Output is correct |
36 |
Correct |
147 ms |
27524 KB |
Output is correct |
37 |
Correct |
147 ms |
26692 KB |
Output is correct |
38 |
Correct |
135 ms |
26048 KB |
Output is correct |
39 |
Correct |
77 ms |
18356 KB |
Output is correct |
40 |
Correct |
68 ms |
18796 KB |
Output is correct |
41 |
Correct |
158 ms |
27844 KB |
Output is correct |
42 |
Correct |
164 ms |
27920 KB |
Output is correct |
43 |
Correct |
154 ms |
27844 KB |
Output is correct |
44 |
Correct |
155 ms |
27824 KB |
Output is correct |
45 |
Correct |
167 ms |
27828 KB |
Output is correct |
46 |
Correct |
163 ms |
27884 KB |
Output is correct |
47 |
Correct |
141 ms |
27928 KB |
Output is correct |
48 |
Correct |
141 ms |
27972 KB |
Output is correct |
49 |
Correct |
109 ms |
23708 KB |
Output is correct |
50 |
Correct |
145 ms |
26860 KB |
Output is correct |
51 |
Correct |
160 ms |
27720 KB |
Output is correct |
52 |
Correct |
158 ms |
27756 KB |
Output is correct |
53 |
Correct |
104 ms |
25412 KB |
Output is correct |
54 |
Correct |
139 ms |
27424 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
154 ms |
27276 KB |
Output is correct |
2 |
Correct |
159 ms |
26716 KB |
Output is correct |
3 |
Correct |
170 ms |
28200 KB |
Output is correct |
4 |
Correct |
137 ms |
26188 KB |
Output is correct |
5 |
Correct |
149 ms |
27212 KB |
Output is correct |
6 |
Correct |
170 ms |
28216 KB |
Output is correct |
7 |
Correct |
72 ms |
18828 KB |
Output is correct |
8 |
Correct |
69 ms |
18660 KB |
Output is correct |
9 |
Correct |
151 ms |
28232 KB |
Output is correct |
10 |
Correct |
110 ms |
25584 KB |
Output is correct |
11 |
Correct |
155 ms |
28188 KB |
Output is correct |
12 |
Correct |
153 ms |
28216 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
14668 KB |
Output is correct |
2 |
Correct |
14 ms |
14764 KB |
Output is correct |
3 |
Correct |
11 ms |
14700 KB |
Output is correct |
4 |
Correct |
22 ms |
14796 KB |
Output is correct |
5 |
Correct |
10 ms |
14540 KB |
Output is correct |
6 |
Correct |
11 ms |
14540 KB |
Output is correct |
7 |
Correct |
12 ms |
14760 KB |
Output is correct |
8 |
Correct |
13 ms |
14796 KB |
Output is correct |
9 |
Correct |
17 ms |
14796 KB |
Output is correct |
10 |
Correct |
13 ms |
14796 KB |
Output is correct |
11 |
Correct |
13 ms |
14844 KB |
Output is correct |
12 |
Correct |
12 ms |
14792 KB |
Output is correct |
13 |
Correct |
11 ms |
14668 KB |
Output is correct |
14 |
Correct |
16 ms |
14832 KB |
Output is correct |
15 |
Correct |
13 ms |
14780 KB |
Output is correct |
16 |
Correct |
21 ms |
14748 KB |
Output is correct |
17 |
Correct |
12 ms |
14728 KB |
Output is correct |
18 |
Correct |
13 ms |
14796 KB |
Output is correct |
19 |
Correct |
12 ms |
14740 KB |
Output is correct |
20 |
Correct |
21 ms |
14824 KB |
Output is correct |
21 |
Correct |
12 ms |
14796 KB |
Output is correct |
22 |
Correct |
14 ms |
14732 KB |
Output is correct |
23 |
Correct |
13 ms |
14668 KB |
Output is correct |
24 |
Correct |
15 ms |
14840 KB |
Output is correct |
25 |
Correct |
10 ms |
14540 KB |
Output is correct |
26 |
Correct |
11 ms |
14476 KB |
Output is correct |
27 |
Correct |
12 ms |
14724 KB |
Output is correct |
28 |
Correct |
15 ms |
14924 KB |
Output is correct |
29 |
Correct |
14 ms |
14796 KB |
Output is correct |
30 |
Correct |
13 ms |
14796 KB |
Output is correct |
31 |
Correct |
12 ms |
14796 KB |
Output is correct |
32 |
Correct |
13 ms |
14804 KB |
Output is correct |
33 |
Correct |
13 ms |
14668 KB |
Output is correct |
34 |
Correct |
20 ms |
14796 KB |
Output is correct |
35 |
Correct |
19 ms |
14676 KB |
Output is correct |
36 |
Correct |
13 ms |
14796 KB |
Output is correct |
37 |
Correct |
18 ms |
14612 KB |
Output is correct |
38 |
Correct |
12 ms |
14796 KB |
Output is correct |
39 |
Correct |
120 ms |
27004 KB |
Output is correct |
40 |
Correct |
134 ms |
27064 KB |
Output is correct |
41 |
Correct |
127 ms |
27092 KB |
Output is correct |
42 |
Correct |
122 ms |
27020 KB |
Output is correct |
43 |
Correct |
137 ms |
27204 KB |
Output is correct |
44 |
Correct |
143 ms |
26984 KB |
Output is correct |
45 |
Correct |
71 ms |
18764 KB |
Output is correct |
46 |
Correct |
65 ms |
18920 KB |
Output is correct |
47 |
Correct |
119 ms |
27240 KB |
Output is correct |
48 |
Correct |
120 ms |
27004 KB |
Output is correct |
49 |
Correct |
131 ms |
27072 KB |
Output is correct |
50 |
Correct |
129 ms |
26988 KB |
Output is correct |
51 |
Correct |
109 ms |
24452 KB |
Output is correct |
52 |
Correct |
120 ms |
27648 KB |
Output is correct |
53 |
Correct |
163 ms |
24624 KB |
Output is correct |
54 |
Correct |
147 ms |
27524 KB |
Output is correct |
55 |
Correct |
147 ms |
26692 KB |
Output is correct |
56 |
Correct |
135 ms |
26048 KB |
Output is correct |
57 |
Correct |
77 ms |
18356 KB |
Output is correct |
58 |
Correct |
68 ms |
18796 KB |
Output is correct |
59 |
Correct |
158 ms |
27844 KB |
Output is correct |
60 |
Correct |
164 ms |
27920 KB |
Output is correct |
61 |
Correct |
154 ms |
27844 KB |
Output is correct |
62 |
Correct |
155 ms |
27824 KB |
Output is correct |
63 |
Correct |
167 ms |
27828 KB |
Output is correct |
64 |
Correct |
163 ms |
27884 KB |
Output is correct |
65 |
Correct |
141 ms |
27928 KB |
Output is correct |
66 |
Correct |
141 ms |
27972 KB |
Output is correct |
67 |
Correct |
109 ms |
23708 KB |
Output is correct |
68 |
Correct |
145 ms |
26860 KB |
Output is correct |
69 |
Correct |
160 ms |
27720 KB |
Output is correct |
70 |
Correct |
158 ms |
27756 KB |
Output is correct |
71 |
Correct |
104 ms |
25412 KB |
Output is correct |
72 |
Correct |
139 ms |
27424 KB |
Output is correct |
73 |
Correct |
154 ms |
27276 KB |
Output is correct |
74 |
Correct |
159 ms |
26716 KB |
Output is correct |
75 |
Correct |
170 ms |
28200 KB |
Output is correct |
76 |
Correct |
137 ms |
26188 KB |
Output is correct |
77 |
Correct |
149 ms |
27212 KB |
Output is correct |
78 |
Correct |
170 ms |
28216 KB |
Output is correct |
79 |
Correct |
72 ms |
18828 KB |
Output is correct |
80 |
Correct |
69 ms |
18660 KB |
Output is correct |
81 |
Correct |
151 ms |
28232 KB |
Output is correct |
82 |
Correct |
110 ms |
25584 KB |
Output is correct |
83 |
Correct |
155 ms |
28188 KB |
Output is correct |
84 |
Correct |
153 ms |
28216 KB |
Output is correct |
85 |
Correct |
140 ms |
25668 KB |
Output is correct |
86 |
Correct |
158 ms |
27896 KB |
Output is correct |
87 |
Correct |
158 ms |
26688 KB |
Output is correct |
88 |
Correct |
177 ms |
27900 KB |
Output is correct |
89 |
Correct |
117 ms |
24452 KB |
Output is correct |
90 |
Correct |
160 ms |
27888 KB |
Output is correct |
91 |
Correct |
123 ms |
24132 KB |
Output is correct |
92 |
Correct |
118 ms |
24072 KB |
Output is correct |
93 |
Correct |
171 ms |
27840 KB |
Output is correct |
94 |
Correct |
157 ms |
27852 KB |
Output is correct |
95 |
Correct |
155 ms |
26868 KB |
Output is correct |
96 |
Correct |
165 ms |
27844 KB |
Output is correct |
97 |
Correct |
174 ms |
27792 KB |
Output is correct |
98 |
Correct |
128 ms |
24600 KB |
Output is correct |
99 |
Correct |
165 ms |
28060 KB |
Output is correct |
100 |
Correct |
125 ms |
25924 KB |
Output is correct |
101 |
Correct |
150 ms |
27920 KB |
Output is correct |
102 |
Correct |
134 ms |
27236 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
14668 KB |
Output is correct |
2 |
Correct |
14 ms |
14764 KB |
Output is correct |
3 |
Correct |
11 ms |
14700 KB |
Output is correct |
4 |
Correct |
22 ms |
14796 KB |
Output is correct |
5 |
Correct |
10 ms |
14540 KB |
Output is correct |
6 |
Correct |
11 ms |
14540 KB |
Output is correct |
7 |
Correct |
12 ms |
14760 KB |
Output is correct |
8 |
Correct |
13 ms |
14796 KB |
Output is correct |
9 |
Correct |
17 ms |
14796 KB |
Output is correct |
10 |
Correct |
13 ms |
14796 KB |
Output is correct |
11 |
Correct |
13 ms |
14844 KB |
Output is correct |
12 |
Correct |
12 ms |
14792 KB |
Output is correct |
13 |
Correct |
11 ms |
14668 KB |
Output is correct |
14 |
Correct |
16 ms |
14832 KB |
Output is correct |
15 |
Correct |
13 ms |
14780 KB |
Output is correct |
16 |
Correct |
21 ms |
14748 KB |
Output is correct |
17 |
Correct |
12 ms |
14728 KB |
Output is correct |
18 |
Correct |
13 ms |
14796 KB |
Output is correct |
19 |
Correct |
12 ms |
14740 KB |
Output is correct |
20 |
Correct |
21 ms |
14824 KB |
Output is correct |
21 |
Correct |
12 ms |
14796 KB |
Output is correct |
22 |
Correct |
14 ms |
14732 KB |
Output is correct |
23 |
Correct |
13 ms |
14668 KB |
Output is correct |
24 |
Correct |
15 ms |
14840 KB |
Output is correct |
25 |
Correct |
10 ms |
14540 KB |
Output is correct |
26 |
Correct |
11 ms |
14476 KB |
Output is correct |
27 |
Correct |
12 ms |
14724 KB |
Output is correct |
28 |
Correct |
15 ms |
14924 KB |
Output is correct |
29 |
Correct |
14 ms |
14796 KB |
Output is correct |
30 |
Correct |
13 ms |
14796 KB |
Output is correct |
31 |
Correct |
12 ms |
14796 KB |
Output is correct |
32 |
Correct |
13 ms |
14804 KB |
Output is correct |
33 |
Correct |
13 ms |
14668 KB |
Output is correct |
34 |
Correct |
20 ms |
14796 KB |
Output is correct |
35 |
Correct |
19 ms |
14676 KB |
Output is correct |
36 |
Correct |
13 ms |
14796 KB |
Output is correct |
37 |
Correct |
18 ms |
14612 KB |
Output is correct |
38 |
Correct |
12 ms |
14796 KB |
Output is correct |
39 |
Correct |
120 ms |
27004 KB |
Output is correct |
40 |
Correct |
134 ms |
27064 KB |
Output is correct |
41 |
Correct |
127 ms |
27092 KB |
Output is correct |
42 |
Correct |
122 ms |
27020 KB |
Output is correct |
43 |
Correct |
137 ms |
27204 KB |
Output is correct |
44 |
Correct |
143 ms |
26984 KB |
Output is correct |
45 |
Correct |
71 ms |
18764 KB |
Output is correct |
46 |
Correct |
65 ms |
18920 KB |
Output is correct |
47 |
Correct |
119 ms |
27240 KB |
Output is correct |
48 |
Correct |
120 ms |
27004 KB |
Output is correct |
49 |
Correct |
131 ms |
27072 KB |
Output is correct |
50 |
Correct |
129 ms |
26988 KB |
Output is correct |
51 |
Correct |
109 ms |
24452 KB |
Output is correct |
52 |
Correct |
120 ms |
27648 KB |
Output is correct |
53 |
Correct |
163 ms |
24624 KB |
Output is correct |
54 |
Correct |
147 ms |
27524 KB |
Output is correct |
55 |
Correct |
756 ms |
61564 KB |
Output is correct |
56 |
Correct |
570 ms |
54068 KB |
Output is correct |
57 |
Correct |
820 ms |
66208 KB |
Output is correct |
58 |
Correct |
650 ms |
60444 KB |
Output is correct |
59 |
Correct |
629 ms |
52944 KB |
Output is correct |
60 |
Correct |
862 ms |
65856 KB |
Output is correct |
61 |
Correct |
261 ms |
32664 KB |
Output is correct |
62 |
Correct |
270 ms |
32804 KB |
Output is correct |
63 |
Correct |
849 ms |
66880 KB |
Output is correct |
64 |
Correct |
879 ms |
66872 KB |
Output is correct |
65 |
Correct |
877 ms |
65840 KB |
Output is correct |
66 |
Correct |
795 ms |
65852 KB |
Output is correct |
67 |
Correct |
800 ms |
65732 KB |
Output is correct |
68 |
Correct |
785 ms |
65776 KB |
Output is correct |
69 |
Correct |
781 ms |
65896 KB |
Output is correct |
70 |
Correct |
788 ms |
65768 KB |
Output is correct |
71 |
Correct |
779 ms |
65784 KB |
Output is correct |
72 |
Correct |
768 ms |
65860 KB |
Output is correct |
73 |
Correct |
812 ms |
65744 KB |
Output is correct |
74 |
Correct |
764 ms |
65836 KB |
Output is correct |
75 |
Correct |
765 ms |
65904 KB |
Output is correct |
76 |
Correct |
755 ms |
65860 KB |
Output is correct |
77 |
Correct |
770 ms |
65728 KB |
Output is correct |
78 |
Correct |
768 ms |
65808 KB |
Output is correct |
79 |
Correct |
563 ms |
58920 KB |
Output is correct |
80 |
Correct |
602 ms |
66264 KB |
Output is correct |
81 |
Correct |
569 ms |
63556 KB |
Output is correct |
82 |
Correct |
147 ms |
26692 KB |
Output is correct |
83 |
Correct |
135 ms |
26048 KB |
Output is correct |
84 |
Correct |
77 ms |
18356 KB |
Output is correct |
85 |
Correct |
68 ms |
18796 KB |
Output is correct |
86 |
Correct |
158 ms |
27844 KB |
Output is correct |
87 |
Correct |
164 ms |
27920 KB |
Output is correct |
88 |
Correct |
154 ms |
27844 KB |
Output is correct |
89 |
Correct |
155 ms |
27824 KB |
Output is correct |
90 |
Correct |
167 ms |
27828 KB |
Output is correct |
91 |
Correct |
163 ms |
27884 KB |
Output is correct |
92 |
Correct |
141 ms |
27928 KB |
Output is correct |
93 |
Correct |
141 ms |
27972 KB |
Output is correct |
94 |
Correct |
109 ms |
23708 KB |
Output is correct |
95 |
Correct |
145 ms |
26860 KB |
Output is correct |
96 |
Correct |
160 ms |
27720 KB |
Output is correct |
97 |
Correct |
158 ms |
27756 KB |
Output is correct |
98 |
Correct |
104 ms |
25412 KB |
Output is correct |
99 |
Correct |
139 ms |
27424 KB |
Output is correct |
100 |
Correct |
154 ms |
27276 KB |
Output is correct |
101 |
Correct |
159 ms |
26716 KB |
Output is correct |
102 |
Correct |
170 ms |
28200 KB |
Output is correct |
103 |
Correct |
137 ms |
26188 KB |
Output is correct |
104 |
Correct |
149 ms |
27212 KB |
Output is correct |
105 |
Correct |
170 ms |
28216 KB |
Output is correct |
106 |
Correct |
72 ms |
18828 KB |
Output is correct |
107 |
Correct |
69 ms |
18660 KB |
Output is correct |
108 |
Correct |
151 ms |
28232 KB |
Output is correct |
109 |
Correct |
110 ms |
25584 KB |
Output is correct |
110 |
Correct |
155 ms |
28188 KB |
Output is correct |
111 |
Correct |
153 ms |
28216 KB |
Output is correct |
112 |
Correct |
140 ms |
25668 KB |
Output is correct |
113 |
Correct |
158 ms |
27896 KB |
Output is correct |
114 |
Correct |
158 ms |
26688 KB |
Output is correct |
115 |
Correct |
177 ms |
27900 KB |
Output is correct |
116 |
Correct |
117 ms |
24452 KB |
Output is correct |
117 |
Correct |
160 ms |
27888 KB |
Output is correct |
118 |
Correct |
123 ms |
24132 KB |
Output is correct |
119 |
Correct |
118 ms |
24072 KB |
Output is correct |
120 |
Correct |
171 ms |
27840 KB |
Output is correct |
121 |
Correct |
157 ms |
27852 KB |
Output is correct |
122 |
Correct |
155 ms |
26868 KB |
Output is correct |
123 |
Correct |
165 ms |
27844 KB |
Output is correct |
124 |
Correct |
174 ms |
27792 KB |
Output is correct |
125 |
Correct |
128 ms |
24600 KB |
Output is correct |
126 |
Correct |
165 ms |
28060 KB |
Output is correct |
127 |
Correct |
125 ms |
25924 KB |
Output is correct |
128 |
Correct |
150 ms |
27920 KB |
Output is correct |
129 |
Correct |
134 ms |
27236 KB |
Output is correct |
130 |
Correct |
747 ms |
65776 KB |
Output is correct |
131 |
Correct |
533 ms |
53000 KB |
Output is correct |
132 |
Correct |
762 ms |
66528 KB |
Output is correct |
133 |
Correct |
796 ms |
63940 KB |
Output is correct |
134 |
Correct |
715 ms |
62088 KB |
Output is correct |
135 |
Correct |
856 ms |
66100 KB |
Output is correct |
136 |
Correct |
819 ms |
67332 KB |
Output is correct |
137 |
Correct |
844 ms |
67376 KB |
Output is correct |
138 |
Correct |
754 ms |
65932 KB |
Output is correct |
139 |
Correct |
817 ms |
65980 KB |
Output is correct |
140 |
Correct |
771 ms |
65956 KB |
Output is correct |
141 |
Correct |
778 ms |
66012 KB |
Output is correct |
142 |
Correct |
767 ms |
66044 KB |
Output is correct |
143 |
Correct |
762 ms |
65984 KB |
Output is correct |
144 |
Correct |
782 ms |
65972 KB |
Output is correct |
145 |
Correct |
763 ms |
65988 KB |
Output is correct |
146 |
Correct |
780 ms |
65980 KB |
Output is correct |
147 |
Correct |
774 ms |
66008 KB |
Output is correct |
148 |
Correct |
764 ms |
65908 KB |
Output is correct |
149 |
Correct |
770 ms |
66000 KB |
Output is correct |
150 |
Correct |
599 ms |
66576 KB |
Output is correct |
151 |
Correct |
596 ms |
66584 KB |
Output is correct |
152 |
Correct |
622 ms |
66500 KB |
Output is correct |
153 |
Correct |
580 ms |
63548 KB |
Output is correct |