//https://oj.uz/problem/view/JOI21_foodcourt
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fi first
#define se second
#define pb push_back
#define int long long
int const nmax = 250007;
int ans[nmax];
int n, m, q;
vector <int> v[nmax];
vector<pair <int, int>> f[nmax];
int C[nmax], K[nmax];
ll s[nmax * 4], cnt[nmax * 4], lazy[nmax * 4];
ll tmp, val;
bool vs[nmax];
void downs(int node)
{
if(lazy[node] == 0) return;
s[node << 1] += lazy[node];
s[node << 1 | 1] += lazy[node];
lazy[node << 1] += lazy[node];
lazy[node << 1 | 1] += lazy[node];
lazy[node] = 0;
}
void updates(int node, int l, int r, int x)
{
if(l >= x)
{
s[node] += K[x];
lazy[node] += K[x];
return;
}
int mid = (l + r) >> 1;
downs(node);
if(x <= mid) updates(node << 1, l, mid, x);
updates(node << 1 | 1, mid + 1, r, x);
s[node] = min(s[node << 1], s[node << 1 | 1]);
}
void updatecnt(int node, int l, int r, int x)
{
if(l == r)
{
cnt[node] += K[x];
return;
}
int mid = (l + r) >> 1;
if(x <= mid) updatecnt(node << 1, l, mid, x);
else updatecnt(node << 1 | 1, mid + 1, r, x);
cnt[node] = cnt[node << 1] + cnt[node << 1 | 1];
}
void gets(int node, int l, int r, int x)
{
if(l == r)
{
tmp = s[node];
return;
}
int mid = (l + r) >> 1;
downs(node);
if(x <= mid) gets(node << 1, l, mid, x);
else
{
val = min(val, s[node << 1]);
gets(node << 1 | 1, mid + 1, r, x);
}
}
void climb(int node, int l, int r, int x, int y)
{
int mid = (l + r) >> 1;
if(r <= x)
{
if(cnt[node] + y <= tmp)
{
tmp -= cnt[node];
return;
}
if(l == r)
{
val = l;
return;
}
if(cnt[node << 1 | 1] + y <= tmp)
{
tmp -= cnt[node << 1 | 1];
climb(node << 1, l, mid, x, y);
}
else climb(node << 1 | 1, mid + 1, r, x, y);
return;
}
if(x <= mid) climb(node << 1, l, mid, x, y);
else
{
climb(node << 1 | 1, mid + 1, r, x, y);
if(!val) climb(node << 1, l, mid, x, y);
}
}
void deal(int x)
{
updates(1, 1, q, x);
if(C[x]) updatecnt(1, 1, q, x);
K[x] = -K[x];
}
int getans(int x, int y)
{
tmp = val = 0;
gets(1, 1, q, x);
if(tmp - val < y) return 0;
tmp -= val;
val = 0;
climb(1, 1, q, x, y);
return C[val];
}
signed main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
cin >> n >> m >> q;
for(int i = 1; i <= q; ++i)
{
int type, x, y;
cin >> type >> x >> y;
if(type == 1)
{
cin >> C[i] >> K[i];
v[x].pb(i); v[y + 1].pb(i);
}
if(type == 2)
{
cin >> K[i]; K[i] = -K[i];
v[x].pb(i); v[y + 1].pb(i);
}
if(type == 3)
{
f[x].pb({i, y});
vs[i] = true;
}
}
for(int i = 1; i <= n; ++i)
{
for(int j: v[i]) deal(j);
for(auto z: f[i])
ans[z.fi] = getans(z.fi, z.se);
}
for(int i = 1; i <= q; ++i)
if(vs[i])
cout << ans[i] << '\n';
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
12244 KB |
Output is correct |
2 |
Correct |
8 ms |
12244 KB |
Output is correct |
3 |
Correct |
8 ms |
12240 KB |
Output is correct |
4 |
Correct |
8 ms |
12372 KB |
Output is correct |
5 |
Correct |
7 ms |
12344 KB |
Output is correct |
6 |
Correct |
8 ms |
12244 KB |
Output is correct |
7 |
Correct |
9 ms |
12288 KB |
Output is correct |
8 |
Correct |
9 ms |
12376 KB |
Output is correct |
9 |
Correct |
8 ms |
12244 KB |
Output is correct |
10 |
Correct |
11 ms |
12272 KB |
Output is correct |
11 |
Correct |
9 ms |
12244 KB |
Output is correct |
12 |
Correct |
9 ms |
12372 KB |
Output is correct |
13 |
Correct |
8 ms |
12220 KB |
Output is correct |
14 |
Correct |
8 ms |
12244 KB |
Output is correct |
15 |
Correct |
8 ms |
12244 KB |
Output is correct |
16 |
Correct |
8 ms |
12244 KB |
Output is correct |
17 |
Correct |
8 ms |
12244 KB |
Output is correct |
18 |
Correct |
8 ms |
12372 KB |
Output is correct |
19 |
Correct |
9 ms |
12244 KB |
Output is correct |
20 |
Correct |
9 ms |
12372 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
12244 KB |
Output is correct |
2 |
Correct |
8 ms |
12244 KB |
Output is correct |
3 |
Correct |
8 ms |
12240 KB |
Output is correct |
4 |
Correct |
8 ms |
12372 KB |
Output is correct |
5 |
Correct |
7 ms |
12344 KB |
Output is correct |
6 |
Correct |
8 ms |
12244 KB |
Output is correct |
7 |
Correct |
9 ms |
12288 KB |
Output is correct |
8 |
Correct |
9 ms |
12376 KB |
Output is correct |
9 |
Correct |
8 ms |
12244 KB |
Output is correct |
10 |
Correct |
11 ms |
12272 KB |
Output is correct |
11 |
Correct |
9 ms |
12244 KB |
Output is correct |
12 |
Correct |
9 ms |
12372 KB |
Output is correct |
13 |
Correct |
8 ms |
12220 KB |
Output is correct |
14 |
Correct |
8 ms |
12244 KB |
Output is correct |
15 |
Correct |
8 ms |
12244 KB |
Output is correct |
16 |
Correct |
8 ms |
12244 KB |
Output is correct |
17 |
Correct |
8 ms |
12244 KB |
Output is correct |
18 |
Correct |
8 ms |
12372 KB |
Output is correct |
19 |
Correct |
9 ms |
12244 KB |
Output is correct |
20 |
Correct |
9 ms |
12372 KB |
Output is correct |
21 |
Correct |
9 ms |
12376 KB |
Output is correct |
22 |
Correct |
9 ms |
12348 KB |
Output is correct |
23 |
Correct |
10 ms |
12352 KB |
Output is correct |
24 |
Correct |
8 ms |
12372 KB |
Output is correct |
25 |
Correct |
9 ms |
12244 KB |
Output is correct |
26 |
Correct |
8 ms |
12344 KB |
Output is correct |
27 |
Correct |
9 ms |
12344 KB |
Output is correct |
28 |
Correct |
8 ms |
12372 KB |
Output is correct |
29 |
Correct |
9 ms |
12348 KB |
Output is correct |
30 |
Correct |
8 ms |
12372 KB |
Output is correct |
31 |
Correct |
8 ms |
12344 KB |
Output is correct |
32 |
Correct |
8 ms |
12292 KB |
Output is correct |
33 |
Correct |
8 ms |
12244 KB |
Output is correct |
34 |
Correct |
10 ms |
12316 KB |
Output is correct |
35 |
Correct |
8 ms |
12352 KB |
Output is correct |
36 |
Correct |
8 ms |
12372 KB |
Output is correct |
37 |
Correct |
8 ms |
12244 KB |
Output is correct |
38 |
Correct |
10 ms |
12276 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
79 ms |
20200 KB |
Output is correct |
2 |
Correct |
93 ms |
20304 KB |
Output is correct |
3 |
Correct |
67 ms |
20256 KB |
Output is correct |
4 |
Correct |
81 ms |
20184 KB |
Output is correct |
5 |
Correct |
70 ms |
20244 KB |
Output is correct |
6 |
Correct |
75 ms |
20284 KB |
Output is correct |
7 |
Correct |
34 ms |
18836 KB |
Output is correct |
8 |
Correct |
35 ms |
18664 KB |
Output is correct |
9 |
Correct |
68 ms |
19812 KB |
Output is correct |
10 |
Correct |
71 ms |
20244 KB |
Output is correct |
11 |
Correct |
70 ms |
20092 KB |
Output is correct |
12 |
Correct |
107 ms |
20308 KB |
Output is correct |
13 |
Correct |
65 ms |
19536 KB |
Output is correct |
14 |
Correct |
69 ms |
20156 KB |
Output is correct |
15 |
Correct |
84 ms |
20044 KB |
Output is correct |
16 |
Correct |
91 ms |
20324 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
369 ms |
43652 KB |
Output is correct |
2 |
Correct |
319 ms |
39780 KB |
Output is correct |
3 |
Correct |
391 ms |
45560 KB |
Output is correct |
4 |
Correct |
334 ms |
40136 KB |
Output is correct |
5 |
Correct |
311 ms |
39964 KB |
Output is correct |
6 |
Correct |
429 ms |
45644 KB |
Output is correct |
7 |
Correct |
134 ms |
38896 KB |
Output is correct |
8 |
Correct |
150 ms |
39024 KB |
Output is correct |
9 |
Correct |
413 ms |
45484 KB |
Output is correct |
10 |
Correct |
418 ms |
45568 KB |
Output is correct |
11 |
Correct |
385 ms |
42376 KB |
Output is correct |
12 |
Correct |
439 ms |
45556 KB |
Output is correct |
13 |
Correct |
398 ms |
42832 KB |
Output is correct |
14 |
Correct |
418 ms |
45456 KB |
Output is correct |
15 |
Correct |
456 ms |
45380 KB |
Output is correct |
16 |
Correct |
421 ms |
45304 KB |
Output is correct |
17 |
Correct |
447 ms |
45472 KB |
Output is correct |
18 |
Correct |
419 ms |
43948 KB |
Output is correct |
19 |
Correct |
434 ms |
45428 KB |
Output is correct |
20 |
Correct |
429 ms |
44108 KB |
Output is correct |
21 |
Correct |
453 ms |
45364 KB |
Output is correct |
22 |
Correct |
448 ms |
45400 KB |
Output is correct |
23 |
Correct |
419 ms |
45268 KB |
Output is correct |
24 |
Correct |
421 ms |
45264 KB |
Output is correct |
25 |
Correct |
345 ms |
42876 KB |
Output is correct |
26 |
Correct |
344 ms |
43352 KB |
Output is correct |
27 |
Correct |
322 ms |
43512 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
12244 KB |
Output is correct |
2 |
Correct |
8 ms |
12244 KB |
Output is correct |
3 |
Correct |
8 ms |
12240 KB |
Output is correct |
4 |
Correct |
8 ms |
12372 KB |
Output is correct |
5 |
Correct |
7 ms |
12344 KB |
Output is correct |
6 |
Correct |
8 ms |
12244 KB |
Output is correct |
7 |
Correct |
9 ms |
12288 KB |
Output is correct |
8 |
Correct |
9 ms |
12376 KB |
Output is correct |
9 |
Correct |
8 ms |
12244 KB |
Output is correct |
10 |
Correct |
11 ms |
12272 KB |
Output is correct |
11 |
Correct |
9 ms |
12244 KB |
Output is correct |
12 |
Correct |
9 ms |
12372 KB |
Output is correct |
13 |
Correct |
8 ms |
12220 KB |
Output is correct |
14 |
Correct |
8 ms |
12244 KB |
Output is correct |
15 |
Correct |
8 ms |
12244 KB |
Output is correct |
16 |
Correct |
8 ms |
12244 KB |
Output is correct |
17 |
Correct |
8 ms |
12244 KB |
Output is correct |
18 |
Correct |
8 ms |
12372 KB |
Output is correct |
19 |
Correct |
9 ms |
12244 KB |
Output is correct |
20 |
Correct |
9 ms |
12372 KB |
Output is correct |
21 |
Correct |
79 ms |
20200 KB |
Output is correct |
22 |
Correct |
93 ms |
20304 KB |
Output is correct |
23 |
Correct |
67 ms |
20256 KB |
Output is correct |
24 |
Correct |
81 ms |
20184 KB |
Output is correct |
25 |
Correct |
70 ms |
20244 KB |
Output is correct |
26 |
Correct |
75 ms |
20284 KB |
Output is correct |
27 |
Correct |
34 ms |
18836 KB |
Output is correct |
28 |
Correct |
35 ms |
18664 KB |
Output is correct |
29 |
Correct |
68 ms |
19812 KB |
Output is correct |
30 |
Correct |
71 ms |
20244 KB |
Output is correct |
31 |
Correct |
70 ms |
20092 KB |
Output is correct |
32 |
Correct |
107 ms |
20308 KB |
Output is correct |
33 |
Correct |
65 ms |
19536 KB |
Output is correct |
34 |
Correct |
69 ms |
20156 KB |
Output is correct |
35 |
Correct |
84 ms |
20044 KB |
Output is correct |
36 |
Correct |
91 ms |
20324 KB |
Output is correct |
37 |
Correct |
81 ms |
19600 KB |
Output is correct |
38 |
Correct |
61 ms |
19276 KB |
Output is correct |
39 |
Correct |
36 ms |
18068 KB |
Output is correct |
40 |
Correct |
35 ms |
18372 KB |
Output is correct |
41 |
Correct |
70 ms |
19400 KB |
Output is correct |
42 |
Correct |
75 ms |
20172 KB |
Output is correct |
43 |
Correct |
92 ms |
20132 KB |
Output is correct |
44 |
Correct |
72 ms |
19768 KB |
Output is correct |
45 |
Correct |
72 ms |
20112 KB |
Output is correct |
46 |
Correct |
73 ms |
20084 KB |
Output is correct |
47 |
Correct |
42 ms |
18980 KB |
Output is correct |
48 |
Correct |
67 ms |
19632 KB |
Output is correct |
49 |
Correct |
53 ms |
18764 KB |
Output is correct |
50 |
Correct |
65 ms |
19388 KB |
Output is correct |
51 |
Correct |
79 ms |
20164 KB |
Output is correct |
52 |
Correct |
73 ms |
20120 KB |
Output is correct |
53 |
Correct |
61 ms |
19240 KB |
Output is correct |
54 |
Correct |
76 ms |
20336 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
68 ms |
20180 KB |
Output is correct |
2 |
Correct |
88 ms |
20672 KB |
Output is correct |
3 |
Correct |
79 ms |
20828 KB |
Output is correct |
4 |
Correct |
56 ms |
19148 KB |
Output is correct |
5 |
Correct |
72 ms |
20084 KB |
Output is correct |
6 |
Correct |
81 ms |
20760 KB |
Output is correct |
7 |
Correct |
38 ms |
19044 KB |
Output is correct |
8 |
Correct |
38 ms |
18860 KB |
Output is correct |
9 |
Correct |
53 ms |
19880 KB |
Output is correct |
10 |
Correct |
51 ms |
18700 KB |
Output is correct |
11 |
Correct |
69 ms |
20080 KB |
Output is correct |
12 |
Correct |
68 ms |
20128 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
12244 KB |
Output is correct |
2 |
Correct |
8 ms |
12244 KB |
Output is correct |
3 |
Correct |
8 ms |
12240 KB |
Output is correct |
4 |
Correct |
8 ms |
12372 KB |
Output is correct |
5 |
Correct |
7 ms |
12344 KB |
Output is correct |
6 |
Correct |
8 ms |
12244 KB |
Output is correct |
7 |
Correct |
9 ms |
12288 KB |
Output is correct |
8 |
Correct |
9 ms |
12376 KB |
Output is correct |
9 |
Correct |
8 ms |
12244 KB |
Output is correct |
10 |
Correct |
11 ms |
12272 KB |
Output is correct |
11 |
Correct |
9 ms |
12244 KB |
Output is correct |
12 |
Correct |
9 ms |
12372 KB |
Output is correct |
13 |
Correct |
8 ms |
12220 KB |
Output is correct |
14 |
Correct |
8 ms |
12244 KB |
Output is correct |
15 |
Correct |
8 ms |
12244 KB |
Output is correct |
16 |
Correct |
8 ms |
12244 KB |
Output is correct |
17 |
Correct |
8 ms |
12244 KB |
Output is correct |
18 |
Correct |
8 ms |
12372 KB |
Output is correct |
19 |
Correct |
9 ms |
12244 KB |
Output is correct |
20 |
Correct |
9 ms |
12372 KB |
Output is correct |
21 |
Correct |
9 ms |
12376 KB |
Output is correct |
22 |
Correct |
9 ms |
12348 KB |
Output is correct |
23 |
Correct |
10 ms |
12352 KB |
Output is correct |
24 |
Correct |
8 ms |
12372 KB |
Output is correct |
25 |
Correct |
9 ms |
12244 KB |
Output is correct |
26 |
Correct |
8 ms |
12344 KB |
Output is correct |
27 |
Correct |
9 ms |
12344 KB |
Output is correct |
28 |
Correct |
8 ms |
12372 KB |
Output is correct |
29 |
Correct |
9 ms |
12348 KB |
Output is correct |
30 |
Correct |
8 ms |
12372 KB |
Output is correct |
31 |
Correct |
8 ms |
12344 KB |
Output is correct |
32 |
Correct |
8 ms |
12292 KB |
Output is correct |
33 |
Correct |
8 ms |
12244 KB |
Output is correct |
34 |
Correct |
10 ms |
12316 KB |
Output is correct |
35 |
Correct |
8 ms |
12352 KB |
Output is correct |
36 |
Correct |
8 ms |
12372 KB |
Output is correct |
37 |
Correct |
8 ms |
12244 KB |
Output is correct |
38 |
Correct |
10 ms |
12276 KB |
Output is correct |
39 |
Correct |
79 ms |
20200 KB |
Output is correct |
40 |
Correct |
93 ms |
20304 KB |
Output is correct |
41 |
Correct |
67 ms |
20256 KB |
Output is correct |
42 |
Correct |
81 ms |
20184 KB |
Output is correct |
43 |
Correct |
70 ms |
20244 KB |
Output is correct |
44 |
Correct |
75 ms |
20284 KB |
Output is correct |
45 |
Correct |
34 ms |
18836 KB |
Output is correct |
46 |
Correct |
35 ms |
18664 KB |
Output is correct |
47 |
Correct |
68 ms |
19812 KB |
Output is correct |
48 |
Correct |
71 ms |
20244 KB |
Output is correct |
49 |
Correct |
70 ms |
20092 KB |
Output is correct |
50 |
Correct |
107 ms |
20308 KB |
Output is correct |
51 |
Correct |
65 ms |
19536 KB |
Output is correct |
52 |
Correct |
69 ms |
20156 KB |
Output is correct |
53 |
Correct |
84 ms |
20044 KB |
Output is correct |
54 |
Correct |
91 ms |
20324 KB |
Output is correct |
55 |
Correct |
81 ms |
19600 KB |
Output is correct |
56 |
Correct |
61 ms |
19276 KB |
Output is correct |
57 |
Correct |
36 ms |
18068 KB |
Output is correct |
58 |
Correct |
35 ms |
18372 KB |
Output is correct |
59 |
Correct |
70 ms |
19400 KB |
Output is correct |
60 |
Correct |
75 ms |
20172 KB |
Output is correct |
61 |
Correct |
92 ms |
20132 KB |
Output is correct |
62 |
Correct |
72 ms |
19768 KB |
Output is correct |
63 |
Correct |
72 ms |
20112 KB |
Output is correct |
64 |
Correct |
73 ms |
20084 KB |
Output is correct |
65 |
Correct |
42 ms |
18980 KB |
Output is correct |
66 |
Correct |
67 ms |
19632 KB |
Output is correct |
67 |
Correct |
53 ms |
18764 KB |
Output is correct |
68 |
Correct |
65 ms |
19388 KB |
Output is correct |
69 |
Correct |
79 ms |
20164 KB |
Output is correct |
70 |
Correct |
73 ms |
20120 KB |
Output is correct |
71 |
Correct |
61 ms |
19240 KB |
Output is correct |
72 |
Correct |
76 ms |
20336 KB |
Output is correct |
73 |
Correct |
68 ms |
20180 KB |
Output is correct |
74 |
Correct |
88 ms |
20672 KB |
Output is correct |
75 |
Correct |
79 ms |
20828 KB |
Output is correct |
76 |
Correct |
56 ms |
19148 KB |
Output is correct |
77 |
Correct |
72 ms |
20084 KB |
Output is correct |
78 |
Correct |
81 ms |
20760 KB |
Output is correct |
79 |
Correct |
38 ms |
19044 KB |
Output is correct |
80 |
Correct |
38 ms |
18860 KB |
Output is correct |
81 |
Correct |
53 ms |
19880 KB |
Output is correct |
82 |
Correct |
51 ms |
18700 KB |
Output is correct |
83 |
Correct |
69 ms |
20080 KB |
Output is correct |
84 |
Correct |
68 ms |
20128 KB |
Output is correct |
85 |
Correct |
73 ms |
20064 KB |
Output is correct |
86 |
Correct |
93 ms |
20724 KB |
Output is correct |
87 |
Correct |
72 ms |
20044 KB |
Output is correct |
88 |
Correct |
91 ms |
20732 KB |
Output is correct |
89 |
Correct |
52 ms |
18224 KB |
Output is correct |
90 |
Correct |
77 ms |
20648 KB |
Output is correct |
91 |
Correct |
62 ms |
19572 KB |
Output is correct |
92 |
Correct |
57 ms |
19364 KB |
Output is correct |
93 |
Correct |
74 ms |
20700 KB |
Output is correct |
94 |
Correct |
77 ms |
20452 KB |
Output is correct |
95 |
Correct |
75 ms |
20556 KB |
Output is correct |
96 |
Correct |
77 ms |
20624 KB |
Output is correct |
97 |
Correct |
78 ms |
20620 KB |
Output is correct |
98 |
Correct |
65 ms |
19812 KB |
Output is correct |
99 |
Correct |
46 ms |
19500 KB |
Output is correct |
100 |
Correct |
60 ms |
19248 KB |
Output is correct |
101 |
Correct |
65 ms |
20144 KB |
Output is correct |
102 |
Correct |
68 ms |
20300 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
12244 KB |
Output is correct |
2 |
Correct |
8 ms |
12244 KB |
Output is correct |
3 |
Correct |
8 ms |
12240 KB |
Output is correct |
4 |
Correct |
8 ms |
12372 KB |
Output is correct |
5 |
Correct |
7 ms |
12344 KB |
Output is correct |
6 |
Correct |
8 ms |
12244 KB |
Output is correct |
7 |
Correct |
9 ms |
12288 KB |
Output is correct |
8 |
Correct |
9 ms |
12376 KB |
Output is correct |
9 |
Correct |
8 ms |
12244 KB |
Output is correct |
10 |
Correct |
11 ms |
12272 KB |
Output is correct |
11 |
Correct |
9 ms |
12244 KB |
Output is correct |
12 |
Correct |
9 ms |
12372 KB |
Output is correct |
13 |
Correct |
8 ms |
12220 KB |
Output is correct |
14 |
Correct |
8 ms |
12244 KB |
Output is correct |
15 |
Correct |
8 ms |
12244 KB |
Output is correct |
16 |
Correct |
8 ms |
12244 KB |
Output is correct |
17 |
Correct |
8 ms |
12244 KB |
Output is correct |
18 |
Correct |
8 ms |
12372 KB |
Output is correct |
19 |
Correct |
9 ms |
12244 KB |
Output is correct |
20 |
Correct |
9 ms |
12372 KB |
Output is correct |
21 |
Correct |
9 ms |
12376 KB |
Output is correct |
22 |
Correct |
9 ms |
12348 KB |
Output is correct |
23 |
Correct |
10 ms |
12352 KB |
Output is correct |
24 |
Correct |
8 ms |
12372 KB |
Output is correct |
25 |
Correct |
9 ms |
12244 KB |
Output is correct |
26 |
Correct |
8 ms |
12344 KB |
Output is correct |
27 |
Correct |
9 ms |
12344 KB |
Output is correct |
28 |
Correct |
8 ms |
12372 KB |
Output is correct |
29 |
Correct |
9 ms |
12348 KB |
Output is correct |
30 |
Correct |
8 ms |
12372 KB |
Output is correct |
31 |
Correct |
8 ms |
12344 KB |
Output is correct |
32 |
Correct |
8 ms |
12292 KB |
Output is correct |
33 |
Correct |
8 ms |
12244 KB |
Output is correct |
34 |
Correct |
10 ms |
12316 KB |
Output is correct |
35 |
Correct |
8 ms |
12352 KB |
Output is correct |
36 |
Correct |
8 ms |
12372 KB |
Output is correct |
37 |
Correct |
8 ms |
12244 KB |
Output is correct |
38 |
Correct |
10 ms |
12276 KB |
Output is correct |
39 |
Correct |
79 ms |
20200 KB |
Output is correct |
40 |
Correct |
93 ms |
20304 KB |
Output is correct |
41 |
Correct |
67 ms |
20256 KB |
Output is correct |
42 |
Correct |
81 ms |
20184 KB |
Output is correct |
43 |
Correct |
70 ms |
20244 KB |
Output is correct |
44 |
Correct |
75 ms |
20284 KB |
Output is correct |
45 |
Correct |
34 ms |
18836 KB |
Output is correct |
46 |
Correct |
35 ms |
18664 KB |
Output is correct |
47 |
Correct |
68 ms |
19812 KB |
Output is correct |
48 |
Correct |
71 ms |
20244 KB |
Output is correct |
49 |
Correct |
70 ms |
20092 KB |
Output is correct |
50 |
Correct |
107 ms |
20308 KB |
Output is correct |
51 |
Correct |
65 ms |
19536 KB |
Output is correct |
52 |
Correct |
69 ms |
20156 KB |
Output is correct |
53 |
Correct |
84 ms |
20044 KB |
Output is correct |
54 |
Correct |
91 ms |
20324 KB |
Output is correct |
55 |
Correct |
369 ms |
43652 KB |
Output is correct |
56 |
Correct |
319 ms |
39780 KB |
Output is correct |
57 |
Correct |
391 ms |
45560 KB |
Output is correct |
58 |
Correct |
334 ms |
40136 KB |
Output is correct |
59 |
Correct |
311 ms |
39964 KB |
Output is correct |
60 |
Correct |
429 ms |
45644 KB |
Output is correct |
61 |
Correct |
134 ms |
38896 KB |
Output is correct |
62 |
Correct |
150 ms |
39024 KB |
Output is correct |
63 |
Correct |
413 ms |
45484 KB |
Output is correct |
64 |
Correct |
418 ms |
45568 KB |
Output is correct |
65 |
Correct |
385 ms |
42376 KB |
Output is correct |
66 |
Correct |
439 ms |
45556 KB |
Output is correct |
67 |
Correct |
398 ms |
42832 KB |
Output is correct |
68 |
Correct |
418 ms |
45456 KB |
Output is correct |
69 |
Correct |
456 ms |
45380 KB |
Output is correct |
70 |
Correct |
421 ms |
45304 KB |
Output is correct |
71 |
Correct |
447 ms |
45472 KB |
Output is correct |
72 |
Correct |
419 ms |
43948 KB |
Output is correct |
73 |
Correct |
434 ms |
45428 KB |
Output is correct |
74 |
Correct |
429 ms |
44108 KB |
Output is correct |
75 |
Correct |
453 ms |
45364 KB |
Output is correct |
76 |
Correct |
448 ms |
45400 KB |
Output is correct |
77 |
Correct |
419 ms |
45268 KB |
Output is correct |
78 |
Correct |
421 ms |
45264 KB |
Output is correct |
79 |
Correct |
345 ms |
42876 KB |
Output is correct |
80 |
Correct |
344 ms |
43352 KB |
Output is correct |
81 |
Correct |
322 ms |
43512 KB |
Output is correct |
82 |
Correct |
81 ms |
19600 KB |
Output is correct |
83 |
Correct |
61 ms |
19276 KB |
Output is correct |
84 |
Correct |
36 ms |
18068 KB |
Output is correct |
85 |
Correct |
35 ms |
18372 KB |
Output is correct |
86 |
Correct |
70 ms |
19400 KB |
Output is correct |
87 |
Correct |
75 ms |
20172 KB |
Output is correct |
88 |
Correct |
92 ms |
20132 KB |
Output is correct |
89 |
Correct |
72 ms |
19768 KB |
Output is correct |
90 |
Correct |
72 ms |
20112 KB |
Output is correct |
91 |
Correct |
73 ms |
20084 KB |
Output is correct |
92 |
Correct |
42 ms |
18980 KB |
Output is correct |
93 |
Correct |
67 ms |
19632 KB |
Output is correct |
94 |
Correct |
53 ms |
18764 KB |
Output is correct |
95 |
Correct |
65 ms |
19388 KB |
Output is correct |
96 |
Correct |
79 ms |
20164 KB |
Output is correct |
97 |
Correct |
73 ms |
20120 KB |
Output is correct |
98 |
Correct |
61 ms |
19240 KB |
Output is correct |
99 |
Correct |
76 ms |
20336 KB |
Output is correct |
100 |
Correct |
68 ms |
20180 KB |
Output is correct |
101 |
Correct |
88 ms |
20672 KB |
Output is correct |
102 |
Correct |
79 ms |
20828 KB |
Output is correct |
103 |
Correct |
56 ms |
19148 KB |
Output is correct |
104 |
Correct |
72 ms |
20084 KB |
Output is correct |
105 |
Correct |
81 ms |
20760 KB |
Output is correct |
106 |
Correct |
38 ms |
19044 KB |
Output is correct |
107 |
Correct |
38 ms |
18860 KB |
Output is correct |
108 |
Correct |
53 ms |
19880 KB |
Output is correct |
109 |
Correct |
51 ms |
18700 KB |
Output is correct |
110 |
Correct |
69 ms |
20080 KB |
Output is correct |
111 |
Correct |
68 ms |
20128 KB |
Output is correct |
112 |
Correct |
73 ms |
20064 KB |
Output is correct |
113 |
Correct |
93 ms |
20724 KB |
Output is correct |
114 |
Correct |
72 ms |
20044 KB |
Output is correct |
115 |
Correct |
91 ms |
20732 KB |
Output is correct |
116 |
Correct |
52 ms |
18224 KB |
Output is correct |
117 |
Correct |
77 ms |
20648 KB |
Output is correct |
118 |
Correct |
62 ms |
19572 KB |
Output is correct |
119 |
Correct |
57 ms |
19364 KB |
Output is correct |
120 |
Correct |
74 ms |
20700 KB |
Output is correct |
121 |
Correct |
77 ms |
20452 KB |
Output is correct |
122 |
Correct |
75 ms |
20556 KB |
Output is correct |
123 |
Correct |
77 ms |
20624 KB |
Output is correct |
124 |
Correct |
78 ms |
20620 KB |
Output is correct |
125 |
Correct |
65 ms |
19812 KB |
Output is correct |
126 |
Correct |
46 ms |
19500 KB |
Output is correct |
127 |
Correct |
60 ms |
19248 KB |
Output is correct |
128 |
Correct |
65 ms |
20144 KB |
Output is correct |
129 |
Correct |
68 ms |
20300 KB |
Output is correct |
130 |
Correct |
399 ms |
46068 KB |
Output is correct |
131 |
Correct |
269 ms |
40132 KB |
Output is correct |
132 |
Correct |
413 ms |
46088 KB |
Output is correct |
133 |
Correct |
410 ms |
45332 KB |
Output is correct |
134 |
Correct |
366 ms |
43276 KB |
Output is correct |
135 |
Correct |
479 ms |
46420 KB |
Output is correct |
136 |
Correct |
425 ms |
46576 KB |
Output is correct |
137 |
Correct |
455 ms |
46520 KB |
Output is correct |
138 |
Correct |
404 ms |
43004 KB |
Output is correct |
139 |
Correct |
461 ms |
46088 KB |
Output is correct |
140 |
Correct |
470 ms |
43668 KB |
Output is correct |
141 |
Correct |
405 ms |
45920 KB |
Output is correct |
142 |
Correct |
416 ms |
45944 KB |
Output is correct |
143 |
Correct |
402 ms |
46024 KB |
Output is correct |
144 |
Correct |
441 ms |
44516 KB |
Output is correct |
145 |
Correct |
482 ms |
45980 KB |
Output is correct |
146 |
Correct |
424 ms |
45040 KB |
Output is correct |
147 |
Correct |
426 ms |
45992 KB |
Output is correct |
148 |
Correct |
416 ms |
45984 KB |
Output is correct |
149 |
Correct |
449 ms |
46056 KB |
Output is correct |
150 |
Correct |
190 ms |
41488 KB |
Output is correct |
151 |
Correct |
353 ms |
43948 KB |
Output is correct |
152 |
Correct |
426 ms |
43960 KB |
Output is correct |
153 |
Correct |
379 ms |
44280 KB |
Output is correct |