/* In the name of GOD */
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define mk make_pair
typedef long long ll;
typedef long double ld;
#define int long long
typedef pair <long long, long long> pii;
const int N = 250012, SegN = (1 << 19);
const long long INF = 1e18 + 31;
pii lz[SegN];
ll slz[SegN];
int32_t t[N], l[N], r[N], c[N], ans[N];
ll k[N], x[N];
vector <pii> v[N];
vector <pii> s[N], e[N];
int LZ[SegN];
int MX[SegN];
void SHIFT (int v) {
if (!LZ[v])
return;
LZ[v << 1] += LZ[v];
LZ[v << 1 | 1] += LZ[v];
MX[v << 1] += LZ[v];
MX[v << 1 | 1] += LZ[v];
LZ[v] = 0;
}
void ADD (int l, int r, int x, int v = 1, int tl = 0, int tr = N - 1) {
if (tl > r || l > tr)
return;
if (l <= tl && tr <= r) {
LZ[v] += x;
MX[v] += x;
} else {
SHIFT(v);
int mid = (tl + tr) >> 1;
ADD (l, r, x, v << 1, tl, mid);
ADD (l, r, x, v << 1 | 1, mid + 1, tr);
MX[v] = max(MX[v << 1], MX[v << 1 | 1]);
}
}
int GET (int x, int v = 1, int tl = 0, int tr = N - 1) {
if (x == -1)
return 0;
if (tl == tr) {
return c[tl];
}
SHIFT(v);
int mid = (tl + tr) >> 1;
if (MX[v << 1] >= x) {
return GET (x, v << 1, tl, mid);
} else {
return GET (x, v << 1 | 1, mid + 1, tr);
}
}
void shift (int v) {
ll x = lz[v].F, y = lz[v].S;
lz[v << 1].F += x;
lz[v << 1].S += x;
lz[v << 1 | 1].F += x;
lz[v << 1 | 1].S += x;
lz[v << 1].S = max(lz[v << 1].S, y);
lz[v << 1 | 1].S = max(lz[v << 1 | 1].S, y);
slz[v << 1] += slz[v];
slz[v << 1 | 1] += slz[v];
lz[v] = mk(0, -INF);
slz[v] = 0;
}
void mx (int l, int r, ll x, int v = 1, int tl = 0, int tr = N - 1) {
if (tl > r || l > tr)
return;
if (l <= tl && tr <= r) {
lz[v].S = max(lz[v].S, x);
} else {
shift(v);
int mid = (tl + tr) >> 1;
mx (l, r, x, v << 1, tl, mid);
mx (l, r, x, v << 1 | 1, mid + 1, tr);
}
}
void add (int l, int r, ll x, int v = 1, int tl = 0, int tr = N - 1) {
// cout << l << ' ' << r << ' ' << x << ' ' << v << ' ' << tl << ' ' << tr << '\n';
if (tl > r || l > tr)
return;
if (l <= tl && tr <= r) {
//cout << "wef\n";
slz[v] += max(0LL, x);
lz[v].S += x;
lz[v].F += x;
//cout << lz[v].F << ' ' << lz[v].S << '\n';
} else {
shift(v);
int mid = (tl + tr) >> 1;
add (l, r, x, v << 1, tl, mid);
add (l, r, x, v << 1 | 1, mid + 1, tr);
}
}
pii get (int i, int v = 1, int tl = 0, int tr = N - 1) {
if (tl == tr)
return mk(slz[v], max(lz[v].F, lz[v].S));
shift(v);
int mid = (tl + tr) >> 1;
if (i <= mid)
return get (i, v << 1, tl, mid);
return get (i, v << 1 | 1, mid + 1, tr);
}
int32_t main () {
ios::sync_with_stdio(false);
cin.tie();
for (int v = 0; v < SegN; v++)
lz[v] = mk(0, -INF);
int n, m, q;
cin >> n >> m >> q;
for (int i = 0; i < q; i++) {
ans[i] = -1;
cin >> t[i];
if (t[i] == 1) {
cin >> l[i] >> r[i] >> c[i] >> k[i];
s[l[i]].push_back(mk(i, k[i]));
e[r[i]].push_back(mk(i, k[i]));
add (l[i], r[i], k[i]);
} else if (t[i] == 2) {
cin >> l[i] >> r[i] >> k[i];
add (l[i], r[i], -k[i]);
mx (l[i], r[i], 0);
} else {
cin >> l[i] >> k[i];
pii p = get (l[i]);
if (k[i] > p.S) {
x[i] = -1;
} else {
x[i] = p.F - p.S + k[i];
}
v[l[i]].push_back(mk(x[i], i));
}
}
// FFFFFFFFFFFFFFFINALY
for (int i = 1; i <= n; i++) {
for (auto [tt, kk] : s[i]) {
ADD (tt, N - 1, kk);
}
for (auto [j, ii] : v[i])
ans[ii] = GET (j);
for (auto [tt, kk] : e[i]) {
ADD (tt, N - 1, -kk);
}
}
for (int i = 0; i < q; i++) {
if (ans[i] >= 0)
cout << ans[i] << '\n';
}
}
Compilation message
foodcourt.cpp: In function 'int32_t main()':
foodcourt.cpp:152:13: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
152 | for (auto [tt, kk] : s[i]) {
| ^
foodcourt.cpp:155:13: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
155 | for (auto [j, ii] : v[i])
| ^
foodcourt.cpp:157:13: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
157 | for (auto [tt, kk] : e[i]) {
| ^
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
17 ms |
26452 KB |
Output is correct |
2 |
Correct |
18 ms |
26508 KB |
Output is correct |
3 |
Correct |
15 ms |
26452 KB |
Output is correct |
4 |
Correct |
16 ms |
26560 KB |
Output is correct |
5 |
Correct |
16 ms |
26452 KB |
Output is correct |
6 |
Correct |
15 ms |
26412 KB |
Output is correct |
7 |
Correct |
19 ms |
26672 KB |
Output is correct |
8 |
Correct |
16 ms |
26580 KB |
Output is correct |
9 |
Correct |
15 ms |
26580 KB |
Output is correct |
10 |
Correct |
16 ms |
26560 KB |
Output is correct |
11 |
Correct |
15 ms |
26560 KB |
Output is correct |
12 |
Correct |
18 ms |
26580 KB |
Output is correct |
13 |
Correct |
15 ms |
26512 KB |
Output is correct |
14 |
Correct |
15 ms |
26580 KB |
Output is correct |
15 |
Correct |
15 ms |
26452 KB |
Output is correct |
16 |
Correct |
15 ms |
26552 KB |
Output is correct |
17 |
Correct |
16 ms |
26452 KB |
Output is correct |
18 |
Correct |
19 ms |
26580 KB |
Output is correct |
19 |
Correct |
18 ms |
26592 KB |
Output is correct |
20 |
Correct |
15 ms |
26552 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
17 ms |
26452 KB |
Output is correct |
2 |
Correct |
18 ms |
26508 KB |
Output is correct |
3 |
Correct |
15 ms |
26452 KB |
Output is correct |
4 |
Correct |
16 ms |
26560 KB |
Output is correct |
5 |
Correct |
16 ms |
26452 KB |
Output is correct |
6 |
Correct |
15 ms |
26412 KB |
Output is correct |
7 |
Correct |
19 ms |
26672 KB |
Output is correct |
8 |
Correct |
16 ms |
26580 KB |
Output is correct |
9 |
Correct |
15 ms |
26580 KB |
Output is correct |
10 |
Correct |
16 ms |
26560 KB |
Output is correct |
11 |
Correct |
15 ms |
26560 KB |
Output is correct |
12 |
Correct |
18 ms |
26580 KB |
Output is correct |
13 |
Correct |
15 ms |
26512 KB |
Output is correct |
14 |
Correct |
15 ms |
26580 KB |
Output is correct |
15 |
Correct |
15 ms |
26452 KB |
Output is correct |
16 |
Correct |
15 ms |
26552 KB |
Output is correct |
17 |
Correct |
16 ms |
26452 KB |
Output is correct |
18 |
Correct |
19 ms |
26580 KB |
Output is correct |
19 |
Correct |
18 ms |
26592 KB |
Output is correct |
20 |
Correct |
15 ms |
26552 KB |
Output is correct |
21 |
Correct |
14 ms |
26464 KB |
Output is correct |
22 |
Correct |
19 ms |
26508 KB |
Output is correct |
23 |
Correct |
20 ms |
26572 KB |
Output is correct |
24 |
Correct |
18 ms |
26568 KB |
Output is correct |
25 |
Correct |
16 ms |
26452 KB |
Output is correct |
26 |
Correct |
15 ms |
26452 KB |
Output is correct |
27 |
Correct |
16 ms |
26572 KB |
Output is correct |
28 |
Correct |
16 ms |
26604 KB |
Output is correct |
29 |
Correct |
16 ms |
26556 KB |
Output is correct |
30 |
Correct |
16 ms |
26476 KB |
Output is correct |
31 |
Correct |
16 ms |
26560 KB |
Output is correct |
32 |
Correct |
16 ms |
26580 KB |
Output is correct |
33 |
Correct |
15 ms |
26452 KB |
Output is correct |
34 |
Correct |
15 ms |
26580 KB |
Output is correct |
35 |
Correct |
15 ms |
26564 KB |
Output is correct |
36 |
Correct |
15 ms |
26604 KB |
Output is correct |
37 |
Correct |
15 ms |
26416 KB |
Output is correct |
38 |
Correct |
16 ms |
26608 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
80 ms |
34784 KB |
Output is correct |
2 |
Correct |
84 ms |
35112 KB |
Output is correct |
3 |
Correct |
79 ms |
34740 KB |
Output is correct |
4 |
Correct |
78 ms |
34636 KB |
Output is correct |
5 |
Correct |
86 ms |
35084 KB |
Output is correct |
6 |
Correct |
83 ms |
35148 KB |
Output is correct |
7 |
Correct |
57 ms |
32524 KB |
Output is correct |
8 |
Correct |
52 ms |
32368 KB |
Output is correct |
9 |
Correct |
87 ms |
33836 KB |
Output is correct |
10 |
Correct |
83 ms |
34688 KB |
Output is correct |
11 |
Correct |
82 ms |
34380 KB |
Output is correct |
12 |
Correct |
94 ms |
34692 KB |
Output is correct |
13 |
Correct |
75 ms |
34212 KB |
Output is correct |
14 |
Correct |
83 ms |
35368 KB |
Output is correct |
15 |
Correct |
99 ms |
35476 KB |
Output is correct |
16 |
Correct |
98 ms |
36068 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
357 ms |
53376 KB |
Output is correct |
2 |
Correct |
290 ms |
48320 KB |
Output is correct |
3 |
Correct |
394 ms |
55620 KB |
Output is correct |
4 |
Correct |
347 ms |
50000 KB |
Output is correct |
5 |
Correct |
311 ms |
49372 KB |
Output is correct |
6 |
Correct |
417 ms |
56944 KB |
Output is correct |
7 |
Correct |
187 ms |
48476 KB |
Output is correct |
8 |
Correct |
194 ms |
48996 KB |
Output is correct |
9 |
Correct |
485 ms |
58564 KB |
Output is correct |
10 |
Correct |
426 ms |
58676 KB |
Output is correct |
11 |
Correct |
388 ms |
50964 KB |
Output is correct |
12 |
Correct |
417 ms |
55456 KB |
Output is correct |
13 |
Correct |
382 ms |
51448 KB |
Output is correct |
14 |
Correct |
401 ms |
55452 KB |
Output is correct |
15 |
Correct |
410 ms |
55464 KB |
Output is correct |
16 |
Correct |
420 ms |
55488 KB |
Output is correct |
17 |
Correct |
389 ms |
55388 KB |
Output is correct |
18 |
Correct |
409 ms |
53336 KB |
Output is correct |
19 |
Correct |
390 ms |
55340 KB |
Output is correct |
20 |
Correct |
411 ms |
53580 KB |
Output is correct |
21 |
Correct |
451 ms |
55408 KB |
Output is correct |
22 |
Correct |
420 ms |
55468 KB |
Output is correct |
23 |
Correct |
421 ms |
55480 KB |
Output is correct |
24 |
Correct |
493 ms |
55392 KB |
Output is correct |
25 |
Correct |
329 ms |
53840 KB |
Output is correct |
26 |
Correct |
317 ms |
55248 KB |
Output is correct |
27 |
Correct |
324 ms |
58348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
17 ms |
26452 KB |
Output is correct |
2 |
Correct |
18 ms |
26508 KB |
Output is correct |
3 |
Correct |
15 ms |
26452 KB |
Output is correct |
4 |
Correct |
16 ms |
26560 KB |
Output is correct |
5 |
Correct |
16 ms |
26452 KB |
Output is correct |
6 |
Correct |
15 ms |
26412 KB |
Output is correct |
7 |
Correct |
19 ms |
26672 KB |
Output is correct |
8 |
Correct |
16 ms |
26580 KB |
Output is correct |
9 |
Correct |
15 ms |
26580 KB |
Output is correct |
10 |
Correct |
16 ms |
26560 KB |
Output is correct |
11 |
Correct |
15 ms |
26560 KB |
Output is correct |
12 |
Correct |
18 ms |
26580 KB |
Output is correct |
13 |
Correct |
15 ms |
26512 KB |
Output is correct |
14 |
Correct |
15 ms |
26580 KB |
Output is correct |
15 |
Correct |
15 ms |
26452 KB |
Output is correct |
16 |
Correct |
15 ms |
26552 KB |
Output is correct |
17 |
Correct |
16 ms |
26452 KB |
Output is correct |
18 |
Correct |
19 ms |
26580 KB |
Output is correct |
19 |
Correct |
18 ms |
26592 KB |
Output is correct |
20 |
Correct |
15 ms |
26552 KB |
Output is correct |
21 |
Correct |
80 ms |
34784 KB |
Output is correct |
22 |
Correct |
84 ms |
35112 KB |
Output is correct |
23 |
Correct |
79 ms |
34740 KB |
Output is correct |
24 |
Correct |
78 ms |
34636 KB |
Output is correct |
25 |
Correct |
86 ms |
35084 KB |
Output is correct |
26 |
Correct |
83 ms |
35148 KB |
Output is correct |
27 |
Correct |
57 ms |
32524 KB |
Output is correct |
28 |
Correct |
52 ms |
32368 KB |
Output is correct |
29 |
Correct |
87 ms |
33836 KB |
Output is correct |
30 |
Correct |
83 ms |
34688 KB |
Output is correct |
31 |
Correct |
82 ms |
34380 KB |
Output is correct |
32 |
Correct |
94 ms |
34692 KB |
Output is correct |
33 |
Correct |
75 ms |
34212 KB |
Output is correct |
34 |
Correct |
83 ms |
35368 KB |
Output is correct |
35 |
Correct |
99 ms |
35476 KB |
Output is correct |
36 |
Correct |
98 ms |
36068 KB |
Output is correct |
37 |
Correct |
81 ms |
33984 KB |
Output is correct |
38 |
Correct |
79 ms |
33404 KB |
Output is correct |
39 |
Correct |
48 ms |
31368 KB |
Output is correct |
40 |
Correct |
58 ms |
32272 KB |
Output is correct |
41 |
Correct |
83 ms |
33484 KB |
Output is correct |
42 |
Correct |
86 ms |
34644 KB |
Output is correct |
43 |
Correct |
113 ms |
34768 KB |
Output is correct |
44 |
Correct |
86 ms |
34052 KB |
Output is correct |
45 |
Correct |
87 ms |
34692 KB |
Output is correct |
46 |
Correct |
87 ms |
34684 KB |
Output is correct |
47 |
Correct |
83 ms |
34012 KB |
Output is correct |
48 |
Correct |
79 ms |
34592 KB |
Output is correct |
49 |
Correct |
68 ms |
32176 KB |
Output is correct |
50 |
Correct |
77 ms |
33564 KB |
Output is correct |
51 |
Correct |
87 ms |
34672 KB |
Output is correct |
52 |
Correct |
97 ms |
34652 KB |
Output is correct |
53 |
Correct |
76 ms |
34132 KB |
Output is correct |
54 |
Correct |
97 ms |
36088 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
81 ms |
34892 KB |
Output is correct |
2 |
Correct |
112 ms |
35392 KB |
Output is correct |
3 |
Correct |
100 ms |
35576 KB |
Output is correct |
4 |
Correct |
67 ms |
33396 KB |
Output is correct |
5 |
Correct |
84 ms |
34736 KB |
Output is correct |
6 |
Correct |
93 ms |
35564 KB |
Output is correct |
7 |
Correct |
68 ms |
32912 KB |
Output is correct |
8 |
Correct |
59 ms |
32688 KB |
Output is correct |
9 |
Correct |
76 ms |
34856 KB |
Output is correct |
10 |
Correct |
57 ms |
33256 KB |
Output is correct |
11 |
Correct |
76 ms |
35232 KB |
Output is correct |
12 |
Correct |
81 ms |
35288 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
17 ms |
26452 KB |
Output is correct |
2 |
Correct |
18 ms |
26508 KB |
Output is correct |
3 |
Correct |
15 ms |
26452 KB |
Output is correct |
4 |
Correct |
16 ms |
26560 KB |
Output is correct |
5 |
Correct |
16 ms |
26452 KB |
Output is correct |
6 |
Correct |
15 ms |
26412 KB |
Output is correct |
7 |
Correct |
19 ms |
26672 KB |
Output is correct |
8 |
Correct |
16 ms |
26580 KB |
Output is correct |
9 |
Correct |
15 ms |
26580 KB |
Output is correct |
10 |
Correct |
16 ms |
26560 KB |
Output is correct |
11 |
Correct |
15 ms |
26560 KB |
Output is correct |
12 |
Correct |
18 ms |
26580 KB |
Output is correct |
13 |
Correct |
15 ms |
26512 KB |
Output is correct |
14 |
Correct |
15 ms |
26580 KB |
Output is correct |
15 |
Correct |
15 ms |
26452 KB |
Output is correct |
16 |
Correct |
15 ms |
26552 KB |
Output is correct |
17 |
Correct |
16 ms |
26452 KB |
Output is correct |
18 |
Correct |
19 ms |
26580 KB |
Output is correct |
19 |
Correct |
18 ms |
26592 KB |
Output is correct |
20 |
Correct |
15 ms |
26552 KB |
Output is correct |
21 |
Correct |
14 ms |
26464 KB |
Output is correct |
22 |
Correct |
19 ms |
26508 KB |
Output is correct |
23 |
Correct |
20 ms |
26572 KB |
Output is correct |
24 |
Correct |
18 ms |
26568 KB |
Output is correct |
25 |
Correct |
16 ms |
26452 KB |
Output is correct |
26 |
Correct |
15 ms |
26452 KB |
Output is correct |
27 |
Correct |
16 ms |
26572 KB |
Output is correct |
28 |
Correct |
16 ms |
26604 KB |
Output is correct |
29 |
Correct |
16 ms |
26556 KB |
Output is correct |
30 |
Correct |
16 ms |
26476 KB |
Output is correct |
31 |
Correct |
16 ms |
26560 KB |
Output is correct |
32 |
Correct |
16 ms |
26580 KB |
Output is correct |
33 |
Correct |
15 ms |
26452 KB |
Output is correct |
34 |
Correct |
15 ms |
26580 KB |
Output is correct |
35 |
Correct |
15 ms |
26564 KB |
Output is correct |
36 |
Correct |
15 ms |
26604 KB |
Output is correct |
37 |
Correct |
15 ms |
26416 KB |
Output is correct |
38 |
Correct |
16 ms |
26608 KB |
Output is correct |
39 |
Correct |
80 ms |
34784 KB |
Output is correct |
40 |
Correct |
84 ms |
35112 KB |
Output is correct |
41 |
Correct |
79 ms |
34740 KB |
Output is correct |
42 |
Correct |
78 ms |
34636 KB |
Output is correct |
43 |
Correct |
86 ms |
35084 KB |
Output is correct |
44 |
Correct |
83 ms |
35148 KB |
Output is correct |
45 |
Correct |
57 ms |
32524 KB |
Output is correct |
46 |
Correct |
52 ms |
32368 KB |
Output is correct |
47 |
Correct |
87 ms |
33836 KB |
Output is correct |
48 |
Correct |
83 ms |
34688 KB |
Output is correct |
49 |
Correct |
82 ms |
34380 KB |
Output is correct |
50 |
Correct |
94 ms |
34692 KB |
Output is correct |
51 |
Correct |
75 ms |
34212 KB |
Output is correct |
52 |
Correct |
83 ms |
35368 KB |
Output is correct |
53 |
Correct |
99 ms |
35476 KB |
Output is correct |
54 |
Correct |
98 ms |
36068 KB |
Output is correct |
55 |
Correct |
81 ms |
33984 KB |
Output is correct |
56 |
Correct |
79 ms |
33404 KB |
Output is correct |
57 |
Correct |
48 ms |
31368 KB |
Output is correct |
58 |
Correct |
58 ms |
32272 KB |
Output is correct |
59 |
Correct |
83 ms |
33484 KB |
Output is correct |
60 |
Correct |
86 ms |
34644 KB |
Output is correct |
61 |
Correct |
113 ms |
34768 KB |
Output is correct |
62 |
Correct |
86 ms |
34052 KB |
Output is correct |
63 |
Correct |
87 ms |
34692 KB |
Output is correct |
64 |
Correct |
87 ms |
34684 KB |
Output is correct |
65 |
Correct |
83 ms |
34012 KB |
Output is correct |
66 |
Correct |
79 ms |
34592 KB |
Output is correct |
67 |
Correct |
68 ms |
32176 KB |
Output is correct |
68 |
Correct |
77 ms |
33564 KB |
Output is correct |
69 |
Correct |
87 ms |
34672 KB |
Output is correct |
70 |
Correct |
97 ms |
34652 KB |
Output is correct |
71 |
Correct |
76 ms |
34132 KB |
Output is correct |
72 |
Correct |
97 ms |
36088 KB |
Output is correct |
73 |
Correct |
81 ms |
34892 KB |
Output is correct |
74 |
Correct |
112 ms |
35392 KB |
Output is correct |
75 |
Correct |
100 ms |
35576 KB |
Output is correct |
76 |
Correct |
67 ms |
33396 KB |
Output is correct |
77 |
Correct |
84 ms |
34736 KB |
Output is correct |
78 |
Correct |
93 ms |
35564 KB |
Output is correct |
79 |
Correct |
68 ms |
32912 KB |
Output is correct |
80 |
Correct |
59 ms |
32688 KB |
Output is correct |
81 |
Correct |
76 ms |
34856 KB |
Output is correct |
82 |
Correct |
57 ms |
33256 KB |
Output is correct |
83 |
Correct |
76 ms |
35232 KB |
Output is correct |
84 |
Correct |
81 ms |
35288 KB |
Output is correct |
85 |
Correct |
82 ms |
33880 KB |
Output is correct |
86 |
Correct |
94 ms |
34684 KB |
Output is correct |
87 |
Correct |
87 ms |
34152 KB |
Output is correct |
88 |
Correct |
109 ms |
35088 KB |
Output is correct |
89 |
Correct |
63 ms |
31584 KB |
Output is correct |
90 |
Correct |
96 ms |
34700 KB |
Output is correct |
91 |
Correct |
78 ms |
33212 KB |
Output is correct |
92 |
Correct |
70 ms |
32900 KB |
Output is correct |
93 |
Correct |
98 ms |
34700 KB |
Output is correct |
94 |
Correct |
99 ms |
34248 KB |
Output is correct |
95 |
Correct |
90 ms |
34380 KB |
Output is correct |
96 |
Correct |
92 ms |
34628 KB |
Output is correct |
97 |
Correct |
89 ms |
34632 KB |
Output is correct |
98 |
Correct |
76 ms |
33416 KB |
Output is correct |
99 |
Correct |
76 ms |
34200 KB |
Output is correct |
100 |
Correct |
66 ms |
33456 KB |
Output is correct |
101 |
Correct |
76 ms |
34632 KB |
Output is correct |
102 |
Correct |
86 ms |
35712 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
17 ms |
26452 KB |
Output is correct |
2 |
Correct |
18 ms |
26508 KB |
Output is correct |
3 |
Correct |
15 ms |
26452 KB |
Output is correct |
4 |
Correct |
16 ms |
26560 KB |
Output is correct |
5 |
Correct |
16 ms |
26452 KB |
Output is correct |
6 |
Correct |
15 ms |
26412 KB |
Output is correct |
7 |
Correct |
19 ms |
26672 KB |
Output is correct |
8 |
Correct |
16 ms |
26580 KB |
Output is correct |
9 |
Correct |
15 ms |
26580 KB |
Output is correct |
10 |
Correct |
16 ms |
26560 KB |
Output is correct |
11 |
Correct |
15 ms |
26560 KB |
Output is correct |
12 |
Correct |
18 ms |
26580 KB |
Output is correct |
13 |
Correct |
15 ms |
26512 KB |
Output is correct |
14 |
Correct |
15 ms |
26580 KB |
Output is correct |
15 |
Correct |
15 ms |
26452 KB |
Output is correct |
16 |
Correct |
15 ms |
26552 KB |
Output is correct |
17 |
Correct |
16 ms |
26452 KB |
Output is correct |
18 |
Correct |
19 ms |
26580 KB |
Output is correct |
19 |
Correct |
18 ms |
26592 KB |
Output is correct |
20 |
Correct |
15 ms |
26552 KB |
Output is correct |
21 |
Correct |
14 ms |
26464 KB |
Output is correct |
22 |
Correct |
19 ms |
26508 KB |
Output is correct |
23 |
Correct |
20 ms |
26572 KB |
Output is correct |
24 |
Correct |
18 ms |
26568 KB |
Output is correct |
25 |
Correct |
16 ms |
26452 KB |
Output is correct |
26 |
Correct |
15 ms |
26452 KB |
Output is correct |
27 |
Correct |
16 ms |
26572 KB |
Output is correct |
28 |
Correct |
16 ms |
26604 KB |
Output is correct |
29 |
Correct |
16 ms |
26556 KB |
Output is correct |
30 |
Correct |
16 ms |
26476 KB |
Output is correct |
31 |
Correct |
16 ms |
26560 KB |
Output is correct |
32 |
Correct |
16 ms |
26580 KB |
Output is correct |
33 |
Correct |
15 ms |
26452 KB |
Output is correct |
34 |
Correct |
15 ms |
26580 KB |
Output is correct |
35 |
Correct |
15 ms |
26564 KB |
Output is correct |
36 |
Correct |
15 ms |
26604 KB |
Output is correct |
37 |
Correct |
15 ms |
26416 KB |
Output is correct |
38 |
Correct |
16 ms |
26608 KB |
Output is correct |
39 |
Correct |
80 ms |
34784 KB |
Output is correct |
40 |
Correct |
84 ms |
35112 KB |
Output is correct |
41 |
Correct |
79 ms |
34740 KB |
Output is correct |
42 |
Correct |
78 ms |
34636 KB |
Output is correct |
43 |
Correct |
86 ms |
35084 KB |
Output is correct |
44 |
Correct |
83 ms |
35148 KB |
Output is correct |
45 |
Correct |
57 ms |
32524 KB |
Output is correct |
46 |
Correct |
52 ms |
32368 KB |
Output is correct |
47 |
Correct |
87 ms |
33836 KB |
Output is correct |
48 |
Correct |
83 ms |
34688 KB |
Output is correct |
49 |
Correct |
82 ms |
34380 KB |
Output is correct |
50 |
Correct |
94 ms |
34692 KB |
Output is correct |
51 |
Correct |
75 ms |
34212 KB |
Output is correct |
52 |
Correct |
83 ms |
35368 KB |
Output is correct |
53 |
Correct |
99 ms |
35476 KB |
Output is correct |
54 |
Correct |
98 ms |
36068 KB |
Output is correct |
55 |
Correct |
357 ms |
53376 KB |
Output is correct |
56 |
Correct |
290 ms |
48320 KB |
Output is correct |
57 |
Correct |
394 ms |
55620 KB |
Output is correct |
58 |
Correct |
347 ms |
50000 KB |
Output is correct |
59 |
Correct |
311 ms |
49372 KB |
Output is correct |
60 |
Correct |
417 ms |
56944 KB |
Output is correct |
61 |
Correct |
187 ms |
48476 KB |
Output is correct |
62 |
Correct |
194 ms |
48996 KB |
Output is correct |
63 |
Correct |
485 ms |
58564 KB |
Output is correct |
64 |
Correct |
426 ms |
58676 KB |
Output is correct |
65 |
Correct |
388 ms |
50964 KB |
Output is correct |
66 |
Correct |
417 ms |
55456 KB |
Output is correct |
67 |
Correct |
382 ms |
51448 KB |
Output is correct |
68 |
Correct |
401 ms |
55452 KB |
Output is correct |
69 |
Correct |
410 ms |
55464 KB |
Output is correct |
70 |
Correct |
420 ms |
55488 KB |
Output is correct |
71 |
Correct |
389 ms |
55388 KB |
Output is correct |
72 |
Correct |
409 ms |
53336 KB |
Output is correct |
73 |
Correct |
390 ms |
55340 KB |
Output is correct |
74 |
Correct |
411 ms |
53580 KB |
Output is correct |
75 |
Correct |
451 ms |
55408 KB |
Output is correct |
76 |
Correct |
420 ms |
55468 KB |
Output is correct |
77 |
Correct |
421 ms |
55480 KB |
Output is correct |
78 |
Correct |
493 ms |
55392 KB |
Output is correct |
79 |
Correct |
329 ms |
53840 KB |
Output is correct |
80 |
Correct |
317 ms |
55248 KB |
Output is correct |
81 |
Correct |
324 ms |
58348 KB |
Output is correct |
82 |
Correct |
81 ms |
33984 KB |
Output is correct |
83 |
Correct |
79 ms |
33404 KB |
Output is correct |
84 |
Correct |
48 ms |
31368 KB |
Output is correct |
85 |
Correct |
58 ms |
32272 KB |
Output is correct |
86 |
Correct |
83 ms |
33484 KB |
Output is correct |
87 |
Correct |
86 ms |
34644 KB |
Output is correct |
88 |
Correct |
113 ms |
34768 KB |
Output is correct |
89 |
Correct |
86 ms |
34052 KB |
Output is correct |
90 |
Correct |
87 ms |
34692 KB |
Output is correct |
91 |
Correct |
87 ms |
34684 KB |
Output is correct |
92 |
Correct |
83 ms |
34012 KB |
Output is correct |
93 |
Correct |
79 ms |
34592 KB |
Output is correct |
94 |
Correct |
68 ms |
32176 KB |
Output is correct |
95 |
Correct |
77 ms |
33564 KB |
Output is correct |
96 |
Correct |
87 ms |
34672 KB |
Output is correct |
97 |
Correct |
97 ms |
34652 KB |
Output is correct |
98 |
Correct |
76 ms |
34132 KB |
Output is correct |
99 |
Correct |
97 ms |
36088 KB |
Output is correct |
100 |
Correct |
81 ms |
34892 KB |
Output is correct |
101 |
Correct |
112 ms |
35392 KB |
Output is correct |
102 |
Correct |
100 ms |
35576 KB |
Output is correct |
103 |
Correct |
67 ms |
33396 KB |
Output is correct |
104 |
Correct |
84 ms |
34736 KB |
Output is correct |
105 |
Correct |
93 ms |
35564 KB |
Output is correct |
106 |
Correct |
68 ms |
32912 KB |
Output is correct |
107 |
Correct |
59 ms |
32688 KB |
Output is correct |
108 |
Correct |
76 ms |
34856 KB |
Output is correct |
109 |
Correct |
57 ms |
33256 KB |
Output is correct |
110 |
Correct |
76 ms |
35232 KB |
Output is correct |
111 |
Correct |
81 ms |
35288 KB |
Output is correct |
112 |
Correct |
82 ms |
33880 KB |
Output is correct |
113 |
Correct |
94 ms |
34684 KB |
Output is correct |
114 |
Correct |
87 ms |
34152 KB |
Output is correct |
115 |
Correct |
109 ms |
35088 KB |
Output is correct |
116 |
Correct |
63 ms |
31584 KB |
Output is correct |
117 |
Correct |
96 ms |
34700 KB |
Output is correct |
118 |
Correct |
78 ms |
33212 KB |
Output is correct |
119 |
Correct |
70 ms |
32900 KB |
Output is correct |
120 |
Correct |
98 ms |
34700 KB |
Output is correct |
121 |
Correct |
99 ms |
34248 KB |
Output is correct |
122 |
Correct |
90 ms |
34380 KB |
Output is correct |
123 |
Correct |
92 ms |
34628 KB |
Output is correct |
124 |
Correct |
89 ms |
34632 KB |
Output is correct |
125 |
Correct |
76 ms |
33416 KB |
Output is correct |
126 |
Correct |
76 ms |
34200 KB |
Output is correct |
127 |
Correct |
66 ms |
33456 KB |
Output is correct |
128 |
Correct |
76 ms |
34632 KB |
Output is correct |
129 |
Correct |
86 ms |
35712 KB |
Output is correct |
130 |
Correct |
467 ms |
55760 KB |
Output is correct |
131 |
Correct |
312 ms |
48304 KB |
Output is correct |
132 |
Correct |
410 ms |
55848 KB |
Output is correct |
133 |
Correct |
522 ms |
55956 KB |
Output is correct |
134 |
Correct |
378 ms |
53328 KB |
Output is correct |
135 |
Correct |
426 ms |
57124 KB |
Output is correct |
136 |
Correct |
488 ms |
58944 KB |
Output is correct |
137 |
Correct |
459 ms |
59064 KB |
Output is correct |
138 |
Correct |
398 ms |
51128 KB |
Output is correct |
139 |
Correct |
465 ms |
55692 KB |
Output is correct |
140 |
Correct |
411 ms |
52380 KB |
Output is correct |
141 |
Correct |
426 ms |
55612 KB |
Output is correct |
142 |
Correct |
431 ms |
55632 KB |
Output is correct |
143 |
Correct |
398 ms |
55628 KB |
Output is correct |
144 |
Correct |
407 ms |
53428 KB |
Output is correct |
145 |
Correct |
409 ms |
55576 KB |
Output is correct |
146 |
Correct |
415 ms |
54408 KB |
Output is correct |
147 |
Correct |
468 ms |
55632 KB |
Output is correct |
148 |
Correct |
416 ms |
55588 KB |
Output is correct |
149 |
Correct |
486 ms |
55600 KB |
Output is correct |
150 |
Correct |
298 ms |
53668 KB |
Output is correct |
151 |
Correct |
339 ms |
55348 KB |
Output is correct |
152 |
Correct |
313 ms |
55456 KB |
Output is correct |
153 |
Correct |
337 ms |
58512 KB |
Output is correct |