#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx2,fma,bmi,bmi2,popcnt,lzcnt")
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pll pair<long long, long long>
#define pb push_back
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
const ll N = 3e5 + 100;
const ll inf = 1e18;
const ll mod = 1e9 + 7;
const ll blocks = 350;
int n,m,q;
vector<pll>t[N], ask[N];
int g[N], res[N];
bool add[N], ok[N];
struct segment_tree_min{
ll n;
vector<pair<ll,ll>>st;
vector<ll> lz;
void init(int _n){
n = _n;
st.clear(); st.resize(4 * n + 10);
lz.clear(); lz.resize(4 * n + 10, 0);
build(1,1,n);
}
void build(int id, int l, int r){
if(l == r){
st[id] = {0, l};
return;
}
int mid = (l + r) / 2;
build(2 * id, l, mid); build(2 * id + 1, mid + 1, r);
st[id] = min(st[2 * id], st[2 * id + 1]);
}
void down(int id, int l, int r){
st[id].F += lz[id];
if(l != r) lz[2 * id] += lz[id], lz[2 * id + 1] += lz[id];
lz[id] = 0;
}
void update(int id, int l, int r, int left, int right, ll val){
down(id, l, r);
if(l > right || r < left) return;
if(left <= l && r <= right){
lz[id] += val;
down(id, l, r);
return;
}
int mid = (l + r) / 2;
update(2 * id, l, mid, left, right, val);
update(2 * id + 1, mid + 1, r, left, right, val);
st[id] = min(st[2 * id], st[2 * id + 1]);
}
pair<ll,ll> get(int id, int l, int r, int left, int right){
down(id, l, r);
if(l > right || r < left) return {inf, 0};
if(left <= l && r <= right) return st[id];
int mid = (l + r) / 2;
return min(get(2 * id, l, mid, left, right), get(2 * id + 1, mid + 1, r, left, right));
}
void update(ll l, ll r, ll val){update(1,1,n,l,r,val);}
pll get(ll l, ll r){return get(1,1,n,l,r);}
} stmin;
struct segment_tree_sum{
ll n;
vector<ll>st, mx, lz;
void init(int _n){
n = _n;
st.clear(); st.resize(4 * n + 10, 0);
lz.clear(); lz.resize(4 * n + 10, 0);
mx.resize(4 * n + 10);
}
void down(int id, ll l, ll r){
st[id] += lz[id] * (r - l + 1);
mx[id] += lz[id];
if(l != r) lz[2 * id] += lz[id], lz[2 * id + 1] += lz[id];
lz[id] = 0;
}
void update(int id, int l, int r, int left, int right, ll val){
down(id, l, r);
if(l > right || r < left) return;
if(left <= l && r <= right){
lz[id] += val;
down(id, l, r);
return;
}
int mid = (l + r) / 2;
update(2 * id, l, mid, left, right, val);
update(2 * id + 1, mid + 1, r, left, right, val);
st[id] = st[2 * id] + st[2 * id + 1];
mx[id] = max(mx[2 * id], mx[2 * id + 1]);
}
ll get(int id, int l, int r, int left, int right){
down(id, l, r);
if(l > right || r < left) return 0;
if(left <= l && r <= right) return st[id];
int mid = (l + r) / 2;
return get(2 * id, l, mid, left, right) + get(2 * id + 1, mid + 1, r, left, right);
}
int walk(int id, ll l, int r, int pos, ll val){
down(id, l, r);
if(r < pos || mx[id] < val) return -1;
if(l == r) return l;
ll mid = (l + r) / 2;
int res = -1;
res = walk(2 * id, l, mid, pos, val);
if(res == -1) res = walk(2 * id + 1, mid + 1, r, pos, val);
return res;
}
int walk(int pos, ll val){return walk(1,1,n,pos,val);}
void update(int l, int r, ll val){update(1,1,n,l,r,val);}
ll get(int l, int r){return get(1,1,n,l,r);}
} st1, st2;
void to_thic_cau(){
cin >> n >> m >> q;
st1.init(q); st2.init(q); stmin.init(q);
for(int i = 1; i <= q;i++){
int typ; cin >> typ;
if(typ == 1){
int l,r,c; ll k; cin >> l >> r >> c >> k;
g[i] = c; add[i] = 1;
t[l].pb({i, k}); t[r + 1].pb({i, -k});
}
else if(typ == 2){
int l,r; ll k; cin >> l >> r >> k;
t[l].pb({i, -k}); t[r+1].pb({i, k});
}
else{
ok[i] = 1;
ll a,b; cin >> a >> b;
ask[a].pb({b, i});
}
}
for(int i = 1; i <= n;i++){
for(auto x : t[i]){
int j = x.F; ll k = x.S;
stmin.update(j, q, k);
if(add[j]) st1.update(j, q, k);
else st2.update(j, q, -k);
}
for(auto x : ask[i]){
ll v = x.F, j = x.S;
pair<ll,int> cur = min(make_pair(0ll,0ll), stmin.get(1, j));
if(stmin.get(j, j).F < cur.F + v) continue;
if(m == 1){
res[j] = 1;
continue;
}
v += st2.get(j, j) + cur.F;
res[j] = g[st1.walk(cur.S + 1, v)];
}
}
for(int i = 1; i <= q;i++) if(ok[i]) cout << res[i] << " ";
cout << '\n';
}
signed main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
ll tc = 1;
//cin >> tc;
while(tc--) to_thic_cau();
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
14936 KB |
Output is correct |
2 |
Correct |
9 ms |
15196 KB |
Output is correct |
3 |
Correct |
9 ms |
14940 KB |
Output is correct |
4 |
Correct |
9 ms |
15196 KB |
Output is correct |
5 |
Correct |
8 ms |
15124 KB |
Output is correct |
6 |
Correct |
9 ms |
14940 KB |
Output is correct |
7 |
Correct |
14 ms |
15216 KB |
Output is correct |
8 |
Correct |
9 ms |
15196 KB |
Output is correct |
9 |
Correct |
9 ms |
15196 KB |
Output is correct |
10 |
Correct |
10 ms |
15196 KB |
Output is correct |
11 |
Correct |
9 ms |
15196 KB |
Output is correct |
12 |
Correct |
10 ms |
15252 KB |
Output is correct |
13 |
Correct |
8 ms |
14976 KB |
Output is correct |
14 |
Correct |
8 ms |
15192 KB |
Output is correct |
15 |
Correct |
9 ms |
14940 KB |
Output is correct |
16 |
Correct |
12 ms |
15264 KB |
Output is correct |
17 |
Correct |
9 ms |
14940 KB |
Output is correct |
18 |
Correct |
14 ms |
15196 KB |
Output is correct |
19 |
Correct |
10 ms |
14940 KB |
Output is correct |
20 |
Correct |
9 ms |
15236 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
14936 KB |
Output is correct |
2 |
Correct |
9 ms |
15196 KB |
Output is correct |
3 |
Correct |
9 ms |
14940 KB |
Output is correct |
4 |
Correct |
9 ms |
15196 KB |
Output is correct |
5 |
Correct |
8 ms |
15124 KB |
Output is correct |
6 |
Correct |
9 ms |
14940 KB |
Output is correct |
7 |
Correct |
14 ms |
15216 KB |
Output is correct |
8 |
Correct |
9 ms |
15196 KB |
Output is correct |
9 |
Correct |
9 ms |
15196 KB |
Output is correct |
10 |
Correct |
10 ms |
15196 KB |
Output is correct |
11 |
Correct |
9 ms |
15196 KB |
Output is correct |
12 |
Correct |
10 ms |
15252 KB |
Output is correct |
13 |
Correct |
8 ms |
14976 KB |
Output is correct |
14 |
Correct |
8 ms |
15192 KB |
Output is correct |
15 |
Correct |
9 ms |
14940 KB |
Output is correct |
16 |
Correct |
12 ms |
15264 KB |
Output is correct |
17 |
Correct |
9 ms |
14940 KB |
Output is correct |
18 |
Correct |
14 ms |
15196 KB |
Output is correct |
19 |
Correct |
10 ms |
14940 KB |
Output is correct |
20 |
Correct |
9 ms |
15236 KB |
Output is correct |
21 |
Correct |
9 ms |
15196 KB |
Output is correct |
22 |
Correct |
9 ms |
15196 KB |
Output is correct |
23 |
Correct |
15 ms |
15192 KB |
Output is correct |
24 |
Correct |
15 ms |
15020 KB |
Output is correct |
25 |
Correct |
10 ms |
14940 KB |
Output is correct |
26 |
Correct |
12 ms |
15200 KB |
Output is correct |
27 |
Correct |
9 ms |
15196 KB |
Output is correct |
28 |
Correct |
10 ms |
15192 KB |
Output is correct |
29 |
Correct |
10 ms |
15196 KB |
Output is correct |
30 |
Correct |
9 ms |
15196 KB |
Output is correct |
31 |
Correct |
9 ms |
15064 KB |
Output is correct |
32 |
Correct |
10 ms |
15196 KB |
Output is correct |
33 |
Correct |
9 ms |
15032 KB |
Output is correct |
34 |
Correct |
9 ms |
15196 KB |
Output is correct |
35 |
Correct |
13 ms |
15124 KB |
Output is correct |
36 |
Correct |
9 ms |
15196 KB |
Output is correct |
37 |
Correct |
9 ms |
14936 KB |
Output is correct |
38 |
Correct |
9 ms |
15196 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
88 ms |
36164 KB |
Output is correct |
2 |
Correct |
126 ms |
36180 KB |
Output is correct |
3 |
Correct |
96 ms |
36176 KB |
Output is correct |
4 |
Correct |
114 ms |
36176 KB |
Output is correct |
5 |
Correct |
113 ms |
36180 KB |
Output is correct |
6 |
Correct |
98 ms |
36260 KB |
Output is correct |
7 |
Correct |
50 ms |
33996 KB |
Output is correct |
8 |
Correct |
81 ms |
34512 KB |
Output is correct |
9 |
Correct |
94 ms |
36176 KB |
Output is correct |
10 |
Correct |
92 ms |
36172 KB |
Output is correct |
11 |
Correct |
111 ms |
36180 KB |
Output is correct |
12 |
Correct |
106 ms |
36252 KB |
Output is correct |
13 |
Correct |
79 ms |
34164 KB |
Output is correct |
14 |
Correct |
112 ms |
36400 KB |
Output is correct |
15 |
Correct |
111 ms |
36328 KB |
Output is correct |
16 |
Correct |
98 ms |
36516 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
470 ms |
91700 KB |
Output is correct |
2 |
Correct |
391 ms |
76368 KB |
Output is correct |
3 |
Correct |
511 ms |
98540 KB |
Output is correct |
4 |
Correct |
361 ms |
75600 KB |
Output is correct |
5 |
Correct |
393 ms |
76876 KB |
Output is correct |
6 |
Correct |
511 ms |
98900 KB |
Output is correct |
7 |
Correct |
198 ms |
96064 KB |
Output is correct |
8 |
Correct |
236 ms |
95328 KB |
Output is correct |
9 |
Correct |
449 ms |
97716 KB |
Output is correct |
10 |
Correct |
451 ms |
97836 KB |
Output is correct |
11 |
Correct |
577 ms |
98292 KB |
Output is correct |
12 |
Correct |
488 ms |
98860 KB |
Output is correct |
13 |
Correct |
496 ms |
98388 KB |
Output is correct |
14 |
Correct |
516 ms |
99156 KB |
Output is correct |
15 |
Correct |
499 ms |
98896 KB |
Output is correct |
16 |
Correct |
503 ms |
98896 KB |
Output is correct |
17 |
Correct |
547 ms |
99156 KB |
Output is correct |
18 |
Correct |
538 ms |
98624 KB |
Output is correct |
19 |
Correct |
592 ms |
98908 KB |
Output is correct |
20 |
Correct |
540 ms |
98900 KB |
Output is correct |
21 |
Correct |
560 ms |
98892 KB |
Output is correct |
22 |
Correct |
558 ms |
98896 KB |
Output is correct |
23 |
Correct |
568 ms |
98924 KB |
Output is correct |
24 |
Correct |
556 ms |
99032 KB |
Output is correct |
25 |
Correct |
512 ms |
97620 KB |
Output is correct |
26 |
Correct |
485 ms |
99152 KB |
Output is correct |
27 |
Correct |
463 ms |
99156 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
14936 KB |
Output is correct |
2 |
Correct |
9 ms |
15196 KB |
Output is correct |
3 |
Correct |
9 ms |
14940 KB |
Output is correct |
4 |
Correct |
9 ms |
15196 KB |
Output is correct |
5 |
Correct |
8 ms |
15124 KB |
Output is correct |
6 |
Correct |
9 ms |
14940 KB |
Output is correct |
7 |
Correct |
14 ms |
15216 KB |
Output is correct |
8 |
Correct |
9 ms |
15196 KB |
Output is correct |
9 |
Correct |
9 ms |
15196 KB |
Output is correct |
10 |
Correct |
10 ms |
15196 KB |
Output is correct |
11 |
Correct |
9 ms |
15196 KB |
Output is correct |
12 |
Correct |
10 ms |
15252 KB |
Output is correct |
13 |
Correct |
8 ms |
14976 KB |
Output is correct |
14 |
Correct |
8 ms |
15192 KB |
Output is correct |
15 |
Correct |
9 ms |
14940 KB |
Output is correct |
16 |
Correct |
12 ms |
15264 KB |
Output is correct |
17 |
Correct |
9 ms |
14940 KB |
Output is correct |
18 |
Correct |
14 ms |
15196 KB |
Output is correct |
19 |
Correct |
10 ms |
14940 KB |
Output is correct |
20 |
Correct |
9 ms |
15236 KB |
Output is correct |
21 |
Correct |
88 ms |
36164 KB |
Output is correct |
22 |
Correct |
126 ms |
36180 KB |
Output is correct |
23 |
Correct |
96 ms |
36176 KB |
Output is correct |
24 |
Correct |
114 ms |
36176 KB |
Output is correct |
25 |
Correct |
113 ms |
36180 KB |
Output is correct |
26 |
Correct |
98 ms |
36260 KB |
Output is correct |
27 |
Correct |
50 ms |
33996 KB |
Output is correct |
28 |
Correct |
81 ms |
34512 KB |
Output is correct |
29 |
Correct |
94 ms |
36176 KB |
Output is correct |
30 |
Correct |
92 ms |
36172 KB |
Output is correct |
31 |
Correct |
111 ms |
36180 KB |
Output is correct |
32 |
Correct |
106 ms |
36252 KB |
Output is correct |
33 |
Correct |
79 ms |
34164 KB |
Output is correct |
34 |
Correct |
112 ms |
36400 KB |
Output is correct |
35 |
Correct |
111 ms |
36328 KB |
Output is correct |
36 |
Correct |
98 ms |
36516 KB |
Output is correct |
37 |
Correct |
126 ms |
34144 KB |
Output is correct |
38 |
Correct |
108 ms |
31824 KB |
Output is correct |
39 |
Correct |
55 ms |
31760 KB |
Output is correct |
40 |
Correct |
70 ms |
34064 KB |
Output is correct |
41 |
Correct |
140 ms |
36252 KB |
Output is correct |
42 |
Correct |
130 ms |
36456 KB |
Output is correct |
43 |
Correct |
136 ms |
37536 KB |
Output is correct |
44 |
Correct |
133 ms |
37340 KB |
Output is correct |
45 |
Correct |
132 ms |
37568 KB |
Output is correct |
46 |
Correct |
131 ms |
37640 KB |
Output is correct |
47 |
Correct |
75 ms |
36344 KB |
Output is correct |
48 |
Correct |
107 ms |
37560 KB |
Output is correct |
49 |
Correct |
80 ms |
30728 KB |
Output is correct |
50 |
Correct |
103 ms |
33928 KB |
Output is correct |
51 |
Correct |
148 ms |
37592 KB |
Output is correct |
52 |
Correct |
133 ms |
37616 KB |
Output is correct |
53 |
Correct |
104 ms |
32848 KB |
Output is correct |
54 |
Correct |
99 ms |
37716 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
98 ms |
33968 KB |
Output is correct |
2 |
Correct |
108 ms |
37460 KB |
Output is correct |
3 |
Correct |
123 ms |
37976 KB |
Output is correct |
4 |
Correct |
107 ms |
31032 KB |
Output is correct |
5 |
Correct |
91 ms |
34640 KB |
Output is correct |
6 |
Correct |
110 ms |
37804 KB |
Output is correct |
7 |
Correct |
64 ms |
33976 KB |
Output is correct |
8 |
Correct |
76 ms |
32920 KB |
Output is correct |
9 |
Correct |
80 ms |
36996 KB |
Output is correct |
10 |
Correct |
71 ms |
30628 KB |
Output is correct |
11 |
Correct |
94 ms |
37532 KB |
Output is correct |
12 |
Correct |
108 ms |
37460 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
14936 KB |
Output is correct |
2 |
Correct |
9 ms |
15196 KB |
Output is correct |
3 |
Correct |
9 ms |
14940 KB |
Output is correct |
4 |
Correct |
9 ms |
15196 KB |
Output is correct |
5 |
Correct |
8 ms |
15124 KB |
Output is correct |
6 |
Correct |
9 ms |
14940 KB |
Output is correct |
7 |
Correct |
14 ms |
15216 KB |
Output is correct |
8 |
Correct |
9 ms |
15196 KB |
Output is correct |
9 |
Correct |
9 ms |
15196 KB |
Output is correct |
10 |
Correct |
10 ms |
15196 KB |
Output is correct |
11 |
Correct |
9 ms |
15196 KB |
Output is correct |
12 |
Correct |
10 ms |
15252 KB |
Output is correct |
13 |
Correct |
8 ms |
14976 KB |
Output is correct |
14 |
Correct |
8 ms |
15192 KB |
Output is correct |
15 |
Correct |
9 ms |
14940 KB |
Output is correct |
16 |
Correct |
12 ms |
15264 KB |
Output is correct |
17 |
Correct |
9 ms |
14940 KB |
Output is correct |
18 |
Correct |
14 ms |
15196 KB |
Output is correct |
19 |
Correct |
10 ms |
14940 KB |
Output is correct |
20 |
Correct |
9 ms |
15236 KB |
Output is correct |
21 |
Correct |
9 ms |
15196 KB |
Output is correct |
22 |
Correct |
9 ms |
15196 KB |
Output is correct |
23 |
Correct |
15 ms |
15192 KB |
Output is correct |
24 |
Correct |
15 ms |
15020 KB |
Output is correct |
25 |
Correct |
10 ms |
14940 KB |
Output is correct |
26 |
Correct |
12 ms |
15200 KB |
Output is correct |
27 |
Correct |
9 ms |
15196 KB |
Output is correct |
28 |
Correct |
10 ms |
15192 KB |
Output is correct |
29 |
Correct |
10 ms |
15196 KB |
Output is correct |
30 |
Correct |
9 ms |
15196 KB |
Output is correct |
31 |
Correct |
9 ms |
15064 KB |
Output is correct |
32 |
Correct |
10 ms |
15196 KB |
Output is correct |
33 |
Correct |
9 ms |
15032 KB |
Output is correct |
34 |
Correct |
9 ms |
15196 KB |
Output is correct |
35 |
Correct |
13 ms |
15124 KB |
Output is correct |
36 |
Correct |
9 ms |
15196 KB |
Output is correct |
37 |
Correct |
9 ms |
14936 KB |
Output is correct |
38 |
Correct |
9 ms |
15196 KB |
Output is correct |
39 |
Correct |
88 ms |
36164 KB |
Output is correct |
40 |
Correct |
126 ms |
36180 KB |
Output is correct |
41 |
Correct |
96 ms |
36176 KB |
Output is correct |
42 |
Correct |
114 ms |
36176 KB |
Output is correct |
43 |
Correct |
113 ms |
36180 KB |
Output is correct |
44 |
Correct |
98 ms |
36260 KB |
Output is correct |
45 |
Correct |
50 ms |
33996 KB |
Output is correct |
46 |
Correct |
81 ms |
34512 KB |
Output is correct |
47 |
Correct |
94 ms |
36176 KB |
Output is correct |
48 |
Correct |
92 ms |
36172 KB |
Output is correct |
49 |
Correct |
111 ms |
36180 KB |
Output is correct |
50 |
Correct |
106 ms |
36252 KB |
Output is correct |
51 |
Correct |
79 ms |
34164 KB |
Output is correct |
52 |
Correct |
112 ms |
36400 KB |
Output is correct |
53 |
Correct |
111 ms |
36328 KB |
Output is correct |
54 |
Correct |
98 ms |
36516 KB |
Output is correct |
55 |
Correct |
126 ms |
34144 KB |
Output is correct |
56 |
Correct |
108 ms |
31824 KB |
Output is correct |
57 |
Correct |
55 ms |
31760 KB |
Output is correct |
58 |
Correct |
70 ms |
34064 KB |
Output is correct |
59 |
Correct |
140 ms |
36252 KB |
Output is correct |
60 |
Correct |
130 ms |
36456 KB |
Output is correct |
61 |
Correct |
136 ms |
37536 KB |
Output is correct |
62 |
Correct |
133 ms |
37340 KB |
Output is correct |
63 |
Correct |
132 ms |
37568 KB |
Output is correct |
64 |
Correct |
131 ms |
37640 KB |
Output is correct |
65 |
Correct |
75 ms |
36344 KB |
Output is correct |
66 |
Correct |
107 ms |
37560 KB |
Output is correct |
67 |
Correct |
80 ms |
30728 KB |
Output is correct |
68 |
Correct |
103 ms |
33928 KB |
Output is correct |
69 |
Correct |
148 ms |
37592 KB |
Output is correct |
70 |
Correct |
133 ms |
37616 KB |
Output is correct |
71 |
Correct |
104 ms |
32848 KB |
Output is correct |
72 |
Correct |
99 ms |
37716 KB |
Output is correct |
73 |
Correct |
98 ms |
33968 KB |
Output is correct |
74 |
Correct |
108 ms |
37460 KB |
Output is correct |
75 |
Correct |
123 ms |
37976 KB |
Output is correct |
76 |
Correct |
107 ms |
31032 KB |
Output is correct |
77 |
Correct |
91 ms |
34640 KB |
Output is correct |
78 |
Correct |
110 ms |
37804 KB |
Output is correct |
79 |
Correct |
64 ms |
33976 KB |
Output is correct |
80 |
Correct |
76 ms |
32920 KB |
Output is correct |
81 |
Correct |
80 ms |
36996 KB |
Output is correct |
82 |
Correct |
71 ms |
30628 KB |
Output is correct |
83 |
Correct |
94 ms |
37532 KB |
Output is correct |
84 |
Correct |
108 ms |
37460 KB |
Output is correct |
85 |
Correct |
101 ms |
35924 KB |
Output is correct |
86 |
Correct |
116 ms |
37968 KB |
Output is correct |
87 |
Correct |
106 ms |
35152 KB |
Output is correct |
88 |
Correct |
115 ms |
38224 KB |
Output is correct |
89 |
Correct |
96 ms |
30352 KB |
Output is correct |
90 |
Correct |
126 ms |
37952 KB |
Output is correct |
91 |
Correct |
93 ms |
33876 KB |
Output is correct |
92 |
Correct |
91 ms |
32852 KB |
Output is correct |
93 |
Correct |
162 ms |
38076 KB |
Output is correct |
94 |
Correct |
118 ms |
37968 KB |
Output is correct |
95 |
Correct |
133 ms |
37440 KB |
Output is correct |
96 |
Correct |
120 ms |
37968 KB |
Output is correct |
97 |
Correct |
109 ms |
37928 KB |
Output is correct |
98 |
Correct |
97 ms |
34644 KB |
Output is correct |
99 |
Correct |
69 ms |
36920 KB |
Output is correct |
100 |
Correct |
86 ms |
34132 KB |
Output is correct |
101 |
Correct |
114 ms |
38016 KB |
Output is correct |
102 |
Correct |
99 ms |
38144 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
14936 KB |
Output is correct |
2 |
Correct |
9 ms |
15196 KB |
Output is correct |
3 |
Correct |
9 ms |
14940 KB |
Output is correct |
4 |
Correct |
9 ms |
15196 KB |
Output is correct |
5 |
Correct |
8 ms |
15124 KB |
Output is correct |
6 |
Correct |
9 ms |
14940 KB |
Output is correct |
7 |
Correct |
14 ms |
15216 KB |
Output is correct |
8 |
Correct |
9 ms |
15196 KB |
Output is correct |
9 |
Correct |
9 ms |
15196 KB |
Output is correct |
10 |
Correct |
10 ms |
15196 KB |
Output is correct |
11 |
Correct |
9 ms |
15196 KB |
Output is correct |
12 |
Correct |
10 ms |
15252 KB |
Output is correct |
13 |
Correct |
8 ms |
14976 KB |
Output is correct |
14 |
Correct |
8 ms |
15192 KB |
Output is correct |
15 |
Correct |
9 ms |
14940 KB |
Output is correct |
16 |
Correct |
12 ms |
15264 KB |
Output is correct |
17 |
Correct |
9 ms |
14940 KB |
Output is correct |
18 |
Correct |
14 ms |
15196 KB |
Output is correct |
19 |
Correct |
10 ms |
14940 KB |
Output is correct |
20 |
Correct |
9 ms |
15236 KB |
Output is correct |
21 |
Correct |
9 ms |
15196 KB |
Output is correct |
22 |
Correct |
9 ms |
15196 KB |
Output is correct |
23 |
Correct |
15 ms |
15192 KB |
Output is correct |
24 |
Correct |
15 ms |
15020 KB |
Output is correct |
25 |
Correct |
10 ms |
14940 KB |
Output is correct |
26 |
Correct |
12 ms |
15200 KB |
Output is correct |
27 |
Correct |
9 ms |
15196 KB |
Output is correct |
28 |
Correct |
10 ms |
15192 KB |
Output is correct |
29 |
Correct |
10 ms |
15196 KB |
Output is correct |
30 |
Correct |
9 ms |
15196 KB |
Output is correct |
31 |
Correct |
9 ms |
15064 KB |
Output is correct |
32 |
Correct |
10 ms |
15196 KB |
Output is correct |
33 |
Correct |
9 ms |
15032 KB |
Output is correct |
34 |
Correct |
9 ms |
15196 KB |
Output is correct |
35 |
Correct |
13 ms |
15124 KB |
Output is correct |
36 |
Correct |
9 ms |
15196 KB |
Output is correct |
37 |
Correct |
9 ms |
14936 KB |
Output is correct |
38 |
Correct |
9 ms |
15196 KB |
Output is correct |
39 |
Correct |
88 ms |
36164 KB |
Output is correct |
40 |
Correct |
126 ms |
36180 KB |
Output is correct |
41 |
Correct |
96 ms |
36176 KB |
Output is correct |
42 |
Correct |
114 ms |
36176 KB |
Output is correct |
43 |
Correct |
113 ms |
36180 KB |
Output is correct |
44 |
Correct |
98 ms |
36260 KB |
Output is correct |
45 |
Correct |
50 ms |
33996 KB |
Output is correct |
46 |
Correct |
81 ms |
34512 KB |
Output is correct |
47 |
Correct |
94 ms |
36176 KB |
Output is correct |
48 |
Correct |
92 ms |
36172 KB |
Output is correct |
49 |
Correct |
111 ms |
36180 KB |
Output is correct |
50 |
Correct |
106 ms |
36252 KB |
Output is correct |
51 |
Correct |
79 ms |
34164 KB |
Output is correct |
52 |
Correct |
112 ms |
36400 KB |
Output is correct |
53 |
Correct |
111 ms |
36328 KB |
Output is correct |
54 |
Correct |
98 ms |
36516 KB |
Output is correct |
55 |
Correct |
470 ms |
91700 KB |
Output is correct |
56 |
Correct |
391 ms |
76368 KB |
Output is correct |
57 |
Correct |
511 ms |
98540 KB |
Output is correct |
58 |
Correct |
361 ms |
75600 KB |
Output is correct |
59 |
Correct |
393 ms |
76876 KB |
Output is correct |
60 |
Correct |
511 ms |
98900 KB |
Output is correct |
61 |
Correct |
198 ms |
96064 KB |
Output is correct |
62 |
Correct |
236 ms |
95328 KB |
Output is correct |
63 |
Correct |
449 ms |
97716 KB |
Output is correct |
64 |
Correct |
451 ms |
97836 KB |
Output is correct |
65 |
Correct |
577 ms |
98292 KB |
Output is correct |
66 |
Correct |
488 ms |
98860 KB |
Output is correct |
67 |
Correct |
496 ms |
98388 KB |
Output is correct |
68 |
Correct |
516 ms |
99156 KB |
Output is correct |
69 |
Correct |
499 ms |
98896 KB |
Output is correct |
70 |
Correct |
503 ms |
98896 KB |
Output is correct |
71 |
Correct |
547 ms |
99156 KB |
Output is correct |
72 |
Correct |
538 ms |
98624 KB |
Output is correct |
73 |
Correct |
592 ms |
98908 KB |
Output is correct |
74 |
Correct |
540 ms |
98900 KB |
Output is correct |
75 |
Correct |
560 ms |
98892 KB |
Output is correct |
76 |
Correct |
558 ms |
98896 KB |
Output is correct |
77 |
Correct |
568 ms |
98924 KB |
Output is correct |
78 |
Correct |
556 ms |
99032 KB |
Output is correct |
79 |
Correct |
512 ms |
97620 KB |
Output is correct |
80 |
Correct |
485 ms |
99152 KB |
Output is correct |
81 |
Correct |
463 ms |
99156 KB |
Output is correct |
82 |
Correct |
126 ms |
34144 KB |
Output is correct |
83 |
Correct |
108 ms |
31824 KB |
Output is correct |
84 |
Correct |
55 ms |
31760 KB |
Output is correct |
85 |
Correct |
70 ms |
34064 KB |
Output is correct |
86 |
Correct |
140 ms |
36252 KB |
Output is correct |
87 |
Correct |
130 ms |
36456 KB |
Output is correct |
88 |
Correct |
136 ms |
37536 KB |
Output is correct |
89 |
Correct |
133 ms |
37340 KB |
Output is correct |
90 |
Correct |
132 ms |
37568 KB |
Output is correct |
91 |
Correct |
131 ms |
37640 KB |
Output is correct |
92 |
Correct |
75 ms |
36344 KB |
Output is correct |
93 |
Correct |
107 ms |
37560 KB |
Output is correct |
94 |
Correct |
80 ms |
30728 KB |
Output is correct |
95 |
Correct |
103 ms |
33928 KB |
Output is correct |
96 |
Correct |
148 ms |
37592 KB |
Output is correct |
97 |
Correct |
133 ms |
37616 KB |
Output is correct |
98 |
Correct |
104 ms |
32848 KB |
Output is correct |
99 |
Correct |
99 ms |
37716 KB |
Output is correct |
100 |
Correct |
98 ms |
33968 KB |
Output is correct |
101 |
Correct |
108 ms |
37460 KB |
Output is correct |
102 |
Correct |
123 ms |
37976 KB |
Output is correct |
103 |
Correct |
107 ms |
31032 KB |
Output is correct |
104 |
Correct |
91 ms |
34640 KB |
Output is correct |
105 |
Correct |
110 ms |
37804 KB |
Output is correct |
106 |
Correct |
64 ms |
33976 KB |
Output is correct |
107 |
Correct |
76 ms |
32920 KB |
Output is correct |
108 |
Correct |
80 ms |
36996 KB |
Output is correct |
109 |
Correct |
71 ms |
30628 KB |
Output is correct |
110 |
Correct |
94 ms |
37532 KB |
Output is correct |
111 |
Correct |
108 ms |
37460 KB |
Output is correct |
112 |
Correct |
101 ms |
35924 KB |
Output is correct |
113 |
Correct |
116 ms |
37968 KB |
Output is correct |
114 |
Correct |
106 ms |
35152 KB |
Output is correct |
115 |
Correct |
115 ms |
38224 KB |
Output is correct |
116 |
Correct |
96 ms |
30352 KB |
Output is correct |
117 |
Correct |
126 ms |
37952 KB |
Output is correct |
118 |
Correct |
93 ms |
33876 KB |
Output is correct |
119 |
Correct |
91 ms |
32852 KB |
Output is correct |
120 |
Correct |
162 ms |
38076 KB |
Output is correct |
121 |
Correct |
118 ms |
37968 KB |
Output is correct |
122 |
Correct |
133 ms |
37440 KB |
Output is correct |
123 |
Correct |
120 ms |
37968 KB |
Output is correct |
124 |
Correct |
109 ms |
37928 KB |
Output is correct |
125 |
Correct |
97 ms |
34644 KB |
Output is correct |
126 |
Correct |
69 ms |
36920 KB |
Output is correct |
127 |
Correct |
86 ms |
34132 KB |
Output is correct |
128 |
Correct |
114 ms |
38016 KB |
Output is correct |
129 |
Correct |
99 ms |
38144 KB |
Output is correct |
130 |
Correct |
570 ms |
105040 KB |
Output is correct |
131 |
Correct |
419 ms |
80508 KB |
Output is correct |
132 |
Correct |
576 ms |
105044 KB |
Output is correct |
133 |
Correct |
508 ms |
101712 KB |
Output is correct |
134 |
Correct |
515 ms |
91988 KB |
Output is correct |
135 |
Correct |
606 ms |
105812 KB |
Output is correct |
136 |
Correct |
554 ms |
105044 KB |
Output is correct |
137 |
Correct |
548 ms |
104860 KB |
Output is correct |
138 |
Correct |
547 ms |
104996 KB |
Output is correct |
139 |
Correct |
570 ms |
105524 KB |
Output is correct |
140 |
Correct |
504 ms |
105300 KB |
Output is correct |
141 |
Correct |
604 ms |
105552 KB |
Output is correct |
142 |
Correct |
597 ms |
105600 KB |
Output is correct |
143 |
Correct |
587 ms |
105808 KB |
Output is correct |
144 |
Correct |
635 ms |
105296 KB |
Output is correct |
145 |
Correct |
553 ms |
105696 KB |
Output is correct |
146 |
Correct |
567 ms |
105304 KB |
Output is correct |
147 |
Correct |
567 ms |
105556 KB |
Output is correct |
148 |
Correct |
548 ms |
105552 KB |
Output is correct |
149 |
Correct |
574 ms |
105472 KB |
Output is correct |
150 |
Correct |
317 ms |
101100 KB |
Output is correct |
151 |
Correct |
485 ms |
105288 KB |
Output is correct |
152 |
Correct |
518 ms |
105344 KB |
Output is correct |
153 |
Correct |
440 ms |
105804 KB |
Output is correct |