/*
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx2,fma,bmi,bmi2,sse4.2,popcnt,lzcnt")
*/
#include <bits/stdc++.h>
#define taskname ""
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define int long long
#define ll long long
#define ld long double
#define pb push_back
#define ff first
#define ss second
#define pii pair<int, int>
#define pll pair<ll, ll>
#define vi vector<int>
#define vii vector<pii>
using namespace std;
const int mxN = 250000 + 5;
const int mod = 1e9 + 7;
const ll oo = 1e18;
struct node {
ll sum_plus, sum_minus, idx;
pll pref_min;
node() {
sum_plus = sum_minus = idx = 0;
pref_min = {0, mod};
}
node operator + (const node &o) {
node res;
res.sum_plus = sum_plus + o.sum_plus;
res.sum_minus = sum_minus + o.sum_minus;
res.pref_min = min(pref_min, {sum_plus - sum_minus + o.pref_min.ff, o.pref_min.ss});
return res;
}
} segtree[4 * mxN];
int n, m, q, ans[mxN];
vector<vector<ll>> query;
vi query_time[mxN], all_query;
vii actual_query[mxN];
void update(int l, int r, int idx, int pos, int val) {
if(l == r) {
if(val > 0) {
if(query[pos][0] == 1) segtree[idx].sum_plus = query[pos][2];
else if(query[pos][0] == 2) segtree[idx].sum_minus = query[pos][1];
segtree[idx].pref_min = {min(segtree[idx].sum_plus, -segtree[idx].sum_minus), pos};
segtree[idx].idx = pos;
}
else {
segtree[idx] = node();
}
return;
}
int mid = (l + r) >> 1;
if(pos <= mid) update(l, mid, idx << 1, pos, val);
else update(mid + 1, r, idx << 1 | 1, pos, val);
segtree[idx] = segtree[idx << 1] + segtree[idx << 1 | 1];
}
node get(int l, int r, int idx, int u, int v) {
if(v < u) return node();
if(u <= l && r <= v) {
return segtree[idx];
}
int mid = (l + r) >> 1;
if(v <= mid) return get(l, mid, idx << 1, u, v);
else if(mid + 1 <= u) return get(mid + 1, r, idx << 1 | 1, u, v);
else return get(l, mid, idx << 1, u, v) + get(mid + 1, r, idx << 1 | 1, u, v);
}
int huutuannguvailon(int cur_l, int cur_r, ll k) {
int l = 1, r = q, idx = 1;
while(l < r) {
int mid = (l + r) >> 1;
if(k > segtree[idx << 1].sum_plus) {
k -= segtree[idx << 1].sum_plus;
idx = idx << 1 | 1, l = mid + 1;
}
else {
idx <<= 1, r = mid;
}
}
return query[l][1];
}
void solve() {
cin >> n >> m >> q;
query.pb({});
for(int i = 1; i <= q; ++i) {
int type; cin >> type;
vector<ll> tmp = {type};
if(type == 1) {
int l, r; cin >> l >> r;
query_time[l].emplace_back(i);
query_time[r + 1].emplace_back(-i);
ll k, c; cin >> c >> k;
tmp.emplace_back(c);
tmp.emplace_back(k);
}
else if(type == 2) {
int l, r; cin >> l >> r;
query_time[l].emplace_back(i);
query_time[r + 1].emplace_back(-i);
ll k; cin >> k; tmp.emplace_back(k);
}
else {
all_query.emplace_back(i);
ll cur, k; cin >> cur >> k;
actual_query[cur].emplace_back(i, k);
}
query.pb(tmp);
}
for(int i = 1; i <= n; ++i) {
for(int &val : query_time[i]) {
if(val > 0) update(1, q, 1, val, 1);
else update(1, q, 1, -val, -1);
}
int cope = segtree[1].pref_min.ss;
if(cope == mod) {
for(auto &[idx, k] : actual_query[i])
ans[idx] = 0;
continue;
}
for(auto &[idx, k] : actual_query[i]) {
auto cur = get(1, q, 1, 1, idx);
cope = cur.pref_min.ss;
if(cope == mod || cope == idx) {
ans[idx] = 0;
continue;
}
auto cur1 = get(1, q, 1, cope, idx);
if(query[cope][0] == 2)
cur1.sum_minus -= query[cope][1];
ll actual_k = k + cur1.sum_minus;
if(actual_k > cur1.sum_plus) {
ans[idx] = 0;
continue;
}
ans[idx] = huutuannguvailon(cope, idx, actual_k + cur.sum_plus - cur1.sum_plus);
}
}
for(int &idx : all_query) cout << ans[idx] << endl;
}
signed main() {
#ifndef CDuongg
if(fopen(taskname".inp", "r"))
assert(freopen(taskname".inp", "r", stdin)), assert(freopen(taskname".out", "w", stdout));
#else
freopen("bai3.inp", "r", stdin);
freopen("bai3.out", "w", stdout);
auto start = chrono::high_resolution_clock::now();
#endif
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int t = 1; //cin >> t;
while(t--) solve();
#ifdef CDuongg
auto end = chrono::high_resolution_clock::now();
// cout << "\n"; for(int i = 1; i <= 100; ++i) cout << '=';
// cout << "\nExecution time: " << chrono::duration_cast<chrono::milliseconds> (end - start).count() << "[ms]" << endl;
#endif
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
21 ms |
51252 KB |
Output is correct |
2 |
Correct |
20 ms |
51412 KB |
Output is correct |
3 |
Correct |
20 ms |
51284 KB |
Output is correct |
4 |
Correct |
21 ms |
51388 KB |
Output is correct |
5 |
Correct |
21 ms |
51380 KB |
Output is correct |
6 |
Correct |
21 ms |
51320 KB |
Output is correct |
7 |
Correct |
25 ms |
51364 KB |
Output is correct |
8 |
Correct |
21 ms |
51376 KB |
Output is correct |
9 |
Correct |
22 ms |
51412 KB |
Output is correct |
10 |
Correct |
22 ms |
51412 KB |
Output is correct |
11 |
Correct |
21 ms |
51412 KB |
Output is correct |
12 |
Correct |
21 ms |
51412 KB |
Output is correct |
13 |
Correct |
21 ms |
51284 KB |
Output is correct |
14 |
Correct |
22 ms |
51372 KB |
Output is correct |
15 |
Correct |
20 ms |
51256 KB |
Output is correct |
16 |
Correct |
22 ms |
51408 KB |
Output is correct |
17 |
Correct |
21 ms |
51340 KB |
Output is correct |
18 |
Correct |
22 ms |
51412 KB |
Output is correct |
19 |
Correct |
22 ms |
51284 KB |
Output is correct |
20 |
Correct |
23 ms |
51404 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
21 ms |
51252 KB |
Output is correct |
2 |
Correct |
20 ms |
51412 KB |
Output is correct |
3 |
Correct |
20 ms |
51284 KB |
Output is correct |
4 |
Correct |
21 ms |
51388 KB |
Output is correct |
5 |
Correct |
21 ms |
51380 KB |
Output is correct |
6 |
Correct |
21 ms |
51320 KB |
Output is correct |
7 |
Correct |
25 ms |
51364 KB |
Output is correct |
8 |
Correct |
21 ms |
51376 KB |
Output is correct |
9 |
Correct |
22 ms |
51412 KB |
Output is correct |
10 |
Correct |
22 ms |
51412 KB |
Output is correct |
11 |
Correct |
21 ms |
51412 KB |
Output is correct |
12 |
Correct |
21 ms |
51412 KB |
Output is correct |
13 |
Correct |
21 ms |
51284 KB |
Output is correct |
14 |
Correct |
22 ms |
51372 KB |
Output is correct |
15 |
Correct |
20 ms |
51256 KB |
Output is correct |
16 |
Correct |
22 ms |
51408 KB |
Output is correct |
17 |
Correct |
21 ms |
51340 KB |
Output is correct |
18 |
Correct |
22 ms |
51412 KB |
Output is correct |
19 |
Correct |
22 ms |
51284 KB |
Output is correct |
20 |
Correct |
23 ms |
51404 KB |
Output is correct |
21 |
Correct |
21 ms |
51304 KB |
Output is correct |
22 |
Correct |
20 ms |
51348 KB |
Output is correct |
23 |
Correct |
21 ms |
51412 KB |
Output is correct |
24 |
Correct |
21 ms |
51368 KB |
Output is correct |
25 |
Correct |
21 ms |
51352 KB |
Output is correct |
26 |
Correct |
21 ms |
51348 KB |
Output is correct |
27 |
Correct |
22 ms |
51360 KB |
Output is correct |
28 |
Correct |
21 ms |
51432 KB |
Output is correct |
29 |
Correct |
21 ms |
51384 KB |
Output is correct |
30 |
Correct |
22 ms |
51348 KB |
Output is correct |
31 |
Correct |
22 ms |
51412 KB |
Output is correct |
32 |
Correct |
23 ms |
51376 KB |
Output is correct |
33 |
Correct |
21 ms |
51412 KB |
Output is correct |
34 |
Correct |
22 ms |
51364 KB |
Output is correct |
35 |
Correct |
21 ms |
51372 KB |
Output is correct |
36 |
Correct |
22 ms |
51412 KB |
Output is correct |
37 |
Correct |
26 ms |
51300 KB |
Output is correct |
38 |
Correct |
22 ms |
51356 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
95 ms |
57692 KB |
Output is correct |
2 |
Correct |
93 ms |
57732 KB |
Output is correct |
3 |
Correct |
101 ms |
57832 KB |
Output is correct |
4 |
Correct |
96 ms |
57740 KB |
Output is correct |
5 |
Correct |
93 ms |
57724 KB |
Output is correct |
6 |
Correct |
93 ms |
57712 KB |
Output is correct |
7 |
Correct |
66 ms |
56704 KB |
Output is correct |
8 |
Correct |
67 ms |
56720 KB |
Output is correct |
9 |
Correct |
98 ms |
57796 KB |
Output is correct |
10 |
Correct |
96 ms |
57712 KB |
Output is correct |
11 |
Correct |
94 ms |
57696 KB |
Output is correct |
12 |
Correct |
95 ms |
57672 KB |
Output is correct |
13 |
Correct |
87 ms |
56936 KB |
Output is correct |
14 |
Correct |
113 ms |
57756 KB |
Output is correct |
15 |
Correct |
87 ms |
57216 KB |
Output is correct |
16 |
Correct |
99 ms |
57664 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
449 ms |
76504 KB |
Output is correct |
2 |
Correct |
355 ms |
72044 KB |
Output is correct |
3 |
Correct |
528 ms |
78628 KB |
Output is correct |
4 |
Correct |
328 ms |
71952 KB |
Output is correct |
5 |
Correct |
331 ms |
71912 KB |
Output is correct |
6 |
Correct |
459 ms |
78316 KB |
Output is correct |
7 |
Correct |
253 ms |
75092 KB |
Output is correct |
8 |
Correct |
266 ms |
74136 KB |
Output is correct |
9 |
Correct |
528 ms |
78920 KB |
Output is correct |
10 |
Correct |
503 ms |
78876 KB |
Output is correct |
11 |
Correct |
468 ms |
78372 KB |
Output is correct |
12 |
Correct |
477 ms |
78316 KB |
Output is correct |
13 |
Correct |
454 ms |
78248 KB |
Output is correct |
14 |
Correct |
472 ms |
78456 KB |
Output is correct |
15 |
Correct |
492 ms |
78316 KB |
Output is correct |
16 |
Correct |
473 ms |
78316 KB |
Output is correct |
17 |
Correct |
493 ms |
78472 KB |
Output is correct |
18 |
Correct |
485 ms |
78320 KB |
Output is correct |
19 |
Correct |
478 ms |
78392 KB |
Output is correct |
20 |
Correct |
486 ms |
78264 KB |
Output is correct |
21 |
Correct |
488 ms |
78256 KB |
Output is correct |
22 |
Correct |
486 ms |
78360 KB |
Output is correct |
23 |
Correct |
505 ms |
78376 KB |
Output is correct |
24 |
Correct |
491 ms |
78276 KB |
Output is correct |
25 |
Correct |
418 ms |
76080 KB |
Output is correct |
26 |
Correct |
423 ms |
76396 KB |
Output is correct |
27 |
Correct |
343 ms |
76676 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
21 ms |
51252 KB |
Output is correct |
2 |
Correct |
20 ms |
51412 KB |
Output is correct |
3 |
Correct |
20 ms |
51284 KB |
Output is correct |
4 |
Correct |
21 ms |
51388 KB |
Output is correct |
5 |
Correct |
21 ms |
51380 KB |
Output is correct |
6 |
Correct |
21 ms |
51320 KB |
Output is correct |
7 |
Correct |
25 ms |
51364 KB |
Output is correct |
8 |
Correct |
21 ms |
51376 KB |
Output is correct |
9 |
Correct |
22 ms |
51412 KB |
Output is correct |
10 |
Correct |
22 ms |
51412 KB |
Output is correct |
11 |
Correct |
21 ms |
51412 KB |
Output is correct |
12 |
Correct |
21 ms |
51412 KB |
Output is correct |
13 |
Correct |
21 ms |
51284 KB |
Output is correct |
14 |
Correct |
22 ms |
51372 KB |
Output is correct |
15 |
Correct |
20 ms |
51256 KB |
Output is correct |
16 |
Correct |
22 ms |
51408 KB |
Output is correct |
17 |
Correct |
21 ms |
51340 KB |
Output is correct |
18 |
Correct |
22 ms |
51412 KB |
Output is correct |
19 |
Correct |
22 ms |
51284 KB |
Output is correct |
20 |
Correct |
23 ms |
51404 KB |
Output is correct |
21 |
Correct |
95 ms |
57692 KB |
Output is correct |
22 |
Correct |
93 ms |
57732 KB |
Output is correct |
23 |
Correct |
101 ms |
57832 KB |
Output is correct |
24 |
Correct |
96 ms |
57740 KB |
Output is correct |
25 |
Correct |
93 ms |
57724 KB |
Output is correct |
26 |
Correct |
93 ms |
57712 KB |
Output is correct |
27 |
Correct |
66 ms |
56704 KB |
Output is correct |
28 |
Correct |
67 ms |
56720 KB |
Output is correct |
29 |
Correct |
98 ms |
57796 KB |
Output is correct |
30 |
Correct |
96 ms |
57712 KB |
Output is correct |
31 |
Correct |
94 ms |
57696 KB |
Output is correct |
32 |
Correct |
95 ms |
57672 KB |
Output is correct |
33 |
Correct |
87 ms |
56936 KB |
Output is correct |
34 |
Correct |
113 ms |
57756 KB |
Output is correct |
35 |
Correct |
87 ms |
57216 KB |
Output is correct |
36 |
Correct |
99 ms |
57664 KB |
Output is correct |
37 |
Correct |
104 ms |
57200 KB |
Output is correct |
38 |
Correct |
83 ms |
56448 KB |
Output is correct |
39 |
Correct |
59 ms |
55680 KB |
Output is correct |
40 |
Correct |
65 ms |
56608 KB |
Output is correct |
41 |
Correct |
97 ms |
57772 KB |
Output is correct |
42 |
Correct |
107 ms |
57728 KB |
Output is correct |
43 |
Correct |
110 ms |
57676 KB |
Output is correct |
44 |
Correct |
101 ms |
57664 KB |
Output is correct |
45 |
Correct |
120 ms |
57744 KB |
Output is correct |
46 |
Correct |
116 ms |
57672 KB |
Output is correct |
47 |
Correct |
80 ms |
56900 KB |
Output is correct |
48 |
Correct |
97 ms |
57212 KB |
Output is correct |
49 |
Correct |
74 ms |
55776 KB |
Output is correct |
50 |
Correct |
87 ms |
56884 KB |
Output is correct |
51 |
Correct |
106 ms |
57720 KB |
Output is correct |
52 |
Correct |
131 ms |
57732 KB |
Output is correct |
53 |
Correct |
74 ms |
56224 KB |
Output is correct |
54 |
Correct |
90 ms |
57604 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
106 ms |
58300 KB |
Output is correct |
2 |
Correct |
142 ms |
58940 KB |
Output is correct |
3 |
Correct |
122 ms |
59212 KB |
Output is correct |
4 |
Correct |
89 ms |
56824 KB |
Output is correct |
5 |
Correct |
104 ms |
58088 KB |
Output is correct |
6 |
Correct |
117 ms |
59204 KB |
Output is correct |
7 |
Correct |
79 ms |
56808 KB |
Output is correct |
8 |
Correct |
79 ms |
56424 KB |
Output is correct |
9 |
Correct |
95 ms |
58248 KB |
Output is correct |
10 |
Correct |
80 ms |
56164 KB |
Output is correct |
11 |
Correct |
106 ms |
58504 KB |
Output is correct |
12 |
Correct |
108 ms |
58476 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
21 ms |
51252 KB |
Output is correct |
2 |
Correct |
20 ms |
51412 KB |
Output is correct |
3 |
Correct |
20 ms |
51284 KB |
Output is correct |
4 |
Correct |
21 ms |
51388 KB |
Output is correct |
5 |
Correct |
21 ms |
51380 KB |
Output is correct |
6 |
Correct |
21 ms |
51320 KB |
Output is correct |
7 |
Correct |
25 ms |
51364 KB |
Output is correct |
8 |
Correct |
21 ms |
51376 KB |
Output is correct |
9 |
Correct |
22 ms |
51412 KB |
Output is correct |
10 |
Correct |
22 ms |
51412 KB |
Output is correct |
11 |
Correct |
21 ms |
51412 KB |
Output is correct |
12 |
Correct |
21 ms |
51412 KB |
Output is correct |
13 |
Correct |
21 ms |
51284 KB |
Output is correct |
14 |
Correct |
22 ms |
51372 KB |
Output is correct |
15 |
Correct |
20 ms |
51256 KB |
Output is correct |
16 |
Correct |
22 ms |
51408 KB |
Output is correct |
17 |
Correct |
21 ms |
51340 KB |
Output is correct |
18 |
Correct |
22 ms |
51412 KB |
Output is correct |
19 |
Correct |
22 ms |
51284 KB |
Output is correct |
20 |
Correct |
23 ms |
51404 KB |
Output is correct |
21 |
Correct |
21 ms |
51304 KB |
Output is correct |
22 |
Correct |
20 ms |
51348 KB |
Output is correct |
23 |
Correct |
21 ms |
51412 KB |
Output is correct |
24 |
Correct |
21 ms |
51368 KB |
Output is correct |
25 |
Correct |
21 ms |
51352 KB |
Output is correct |
26 |
Correct |
21 ms |
51348 KB |
Output is correct |
27 |
Correct |
22 ms |
51360 KB |
Output is correct |
28 |
Correct |
21 ms |
51432 KB |
Output is correct |
29 |
Correct |
21 ms |
51384 KB |
Output is correct |
30 |
Correct |
22 ms |
51348 KB |
Output is correct |
31 |
Correct |
22 ms |
51412 KB |
Output is correct |
32 |
Correct |
23 ms |
51376 KB |
Output is correct |
33 |
Correct |
21 ms |
51412 KB |
Output is correct |
34 |
Correct |
22 ms |
51364 KB |
Output is correct |
35 |
Correct |
21 ms |
51372 KB |
Output is correct |
36 |
Correct |
22 ms |
51412 KB |
Output is correct |
37 |
Correct |
26 ms |
51300 KB |
Output is correct |
38 |
Correct |
22 ms |
51356 KB |
Output is correct |
39 |
Correct |
95 ms |
57692 KB |
Output is correct |
40 |
Correct |
93 ms |
57732 KB |
Output is correct |
41 |
Correct |
101 ms |
57832 KB |
Output is correct |
42 |
Correct |
96 ms |
57740 KB |
Output is correct |
43 |
Correct |
93 ms |
57724 KB |
Output is correct |
44 |
Correct |
93 ms |
57712 KB |
Output is correct |
45 |
Correct |
66 ms |
56704 KB |
Output is correct |
46 |
Correct |
67 ms |
56720 KB |
Output is correct |
47 |
Correct |
98 ms |
57796 KB |
Output is correct |
48 |
Correct |
96 ms |
57712 KB |
Output is correct |
49 |
Correct |
94 ms |
57696 KB |
Output is correct |
50 |
Correct |
95 ms |
57672 KB |
Output is correct |
51 |
Correct |
87 ms |
56936 KB |
Output is correct |
52 |
Correct |
113 ms |
57756 KB |
Output is correct |
53 |
Correct |
87 ms |
57216 KB |
Output is correct |
54 |
Correct |
99 ms |
57664 KB |
Output is correct |
55 |
Correct |
104 ms |
57200 KB |
Output is correct |
56 |
Correct |
83 ms |
56448 KB |
Output is correct |
57 |
Correct |
59 ms |
55680 KB |
Output is correct |
58 |
Correct |
65 ms |
56608 KB |
Output is correct |
59 |
Correct |
97 ms |
57772 KB |
Output is correct |
60 |
Correct |
107 ms |
57728 KB |
Output is correct |
61 |
Correct |
110 ms |
57676 KB |
Output is correct |
62 |
Correct |
101 ms |
57664 KB |
Output is correct |
63 |
Correct |
120 ms |
57744 KB |
Output is correct |
64 |
Correct |
116 ms |
57672 KB |
Output is correct |
65 |
Correct |
80 ms |
56900 KB |
Output is correct |
66 |
Correct |
97 ms |
57212 KB |
Output is correct |
67 |
Correct |
74 ms |
55776 KB |
Output is correct |
68 |
Correct |
87 ms |
56884 KB |
Output is correct |
69 |
Correct |
106 ms |
57720 KB |
Output is correct |
70 |
Correct |
131 ms |
57732 KB |
Output is correct |
71 |
Correct |
74 ms |
56224 KB |
Output is correct |
72 |
Correct |
90 ms |
57604 KB |
Output is correct |
73 |
Correct |
106 ms |
58300 KB |
Output is correct |
74 |
Correct |
142 ms |
58940 KB |
Output is correct |
75 |
Correct |
122 ms |
59212 KB |
Output is correct |
76 |
Correct |
89 ms |
56824 KB |
Output is correct |
77 |
Correct |
104 ms |
58088 KB |
Output is correct |
78 |
Correct |
117 ms |
59204 KB |
Output is correct |
79 |
Correct |
79 ms |
56808 KB |
Output is correct |
80 |
Correct |
79 ms |
56424 KB |
Output is correct |
81 |
Correct |
95 ms |
58248 KB |
Output is correct |
82 |
Correct |
80 ms |
56164 KB |
Output is correct |
83 |
Correct |
106 ms |
58504 KB |
Output is correct |
84 |
Correct |
108 ms |
58476 KB |
Output is correct |
85 |
Correct |
114 ms |
58132 KB |
Output is correct |
86 |
Correct |
117 ms |
59004 KB |
Output is correct |
87 |
Correct |
92 ms |
57984 KB |
Output is correct |
88 |
Correct |
121 ms |
58936 KB |
Output is correct |
89 |
Correct |
75 ms |
56336 KB |
Output is correct |
90 |
Correct |
114 ms |
59020 KB |
Output is correct |
91 |
Correct |
91 ms |
57376 KB |
Output is correct |
92 |
Correct |
112 ms |
57024 KB |
Output is correct |
93 |
Correct |
111 ms |
58948 KB |
Output is correct |
94 |
Correct |
104 ms |
59072 KB |
Output is correct |
95 |
Correct |
108 ms |
58676 KB |
Output is correct |
96 |
Correct |
111 ms |
58880 KB |
Output is correct |
97 |
Correct |
106 ms |
58844 KB |
Output is correct |
98 |
Correct |
92 ms |
57636 KB |
Output is correct |
99 |
Correct |
86 ms |
58000 KB |
Output is correct |
100 |
Correct |
88 ms |
57016 KB |
Output is correct |
101 |
Correct |
101 ms |
58268 KB |
Output is correct |
102 |
Correct |
88 ms |
58624 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
21 ms |
51252 KB |
Output is correct |
2 |
Correct |
20 ms |
51412 KB |
Output is correct |
3 |
Correct |
20 ms |
51284 KB |
Output is correct |
4 |
Correct |
21 ms |
51388 KB |
Output is correct |
5 |
Correct |
21 ms |
51380 KB |
Output is correct |
6 |
Correct |
21 ms |
51320 KB |
Output is correct |
7 |
Correct |
25 ms |
51364 KB |
Output is correct |
8 |
Correct |
21 ms |
51376 KB |
Output is correct |
9 |
Correct |
22 ms |
51412 KB |
Output is correct |
10 |
Correct |
22 ms |
51412 KB |
Output is correct |
11 |
Correct |
21 ms |
51412 KB |
Output is correct |
12 |
Correct |
21 ms |
51412 KB |
Output is correct |
13 |
Correct |
21 ms |
51284 KB |
Output is correct |
14 |
Correct |
22 ms |
51372 KB |
Output is correct |
15 |
Correct |
20 ms |
51256 KB |
Output is correct |
16 |
Correct |
22 ms |
51408 KB |
Output is correct |
17 |
Correct |
21 ms |
51340 KB |
Output is correct |
18 |
Correct |
22 ms |
51412 KB |
Output is correct |
19 |
Correct |
22 ms |
51284 KB |
Output is correct |
20 |
Correct |
23 ms |
51404 KB |
Output is correct |
21 |
Correct |
21 ms |
51304 KB |
Output is correct |
22 |
Correct |
20 ms |
51348 KB |
Output is correct |
23 |
Correct |
21 ms |
51412 KB |
Output is correct |
24 |
Correct |
21 ms |
51368 KB |
Output is correct |
25 |
Correct |
21 ms |
51352 KB |
Output is correct |
26 |
Correct |
21 ms |
51348 KB |
Output is correct |
27 |
Correct |
22 ms |
51360 KB |
Output is correct |
28 |
Correct |
21 ms |
51432 KB |
Output is correct |
29 |
Correct |
21 ms |
51384 KB |
Output is correct |
30 |
Correct |
22 ms |
51348 KB |
Output is correct |
31 |
Correct |
22 ms |
51412 KB |
Output is correct |
32 |
Correct |
23 ms |
51376 KB |
Output is correct |
33 |
Correct |
21 ms |
51412 KB |
Output is correct |
34 |
Correct |
22 ms |
51364 KB |
Output is correct |
35 |
Correct |
21 ms |
51372 KB |
Output is correct |
36 |
Correct |
22 ms |
51412 KB |
Output is correct |
37 |
Correct |
26 ms |
51300 KB |
Output is correct |
38 |
Correct |
22 ms |
51356 KB |
Output is correct |
39 |
Correct |
95 ms |
57692 KB |
Output is correct |
40 |
Correct |
93 ms |
57732 KB |
Output is correct |
41 |
Correct |
101 ms |
57832 KB |
Output is correct |
42 |
Correct |
96 ms |
57740 KB |
Output is correct |
43 |
Correct |
93 ms |
57724 KB |
Output is correct |
44 |
Correct |
93 ms |
57712 KB |
Output is correct |
45 |
Correct |
66 ms |
56704 KB |
Output is correct |
46 |
Correct |
67 ms |
56720 KB |
Output is correct |
47 |
Correct |
98 ms |
57796 KB |
Output is correct |
48 |
Correct |
96 ms |
57712 KB |
Output is correct |
49 |
Correct |
94 ms |
57696 KB |
Output is correct |
50 |
Correct |
95 ms |
57672 KB |
Output is correct |
51 |
Correct |
87 ms |
56936 KB |
Output is correct |
52 |
Correct |
113 ms |
57756 KB |
Output is correct |
53 |
Correct |
87 ms |
57216 KB |
Output is correct |
54 |
Correct |
99 ms |
57664 KB |
Output is correct |
55 |
Correct |
449 ms |
76504 KB |
Output is correct |
56 |
Correct |
355 ms |
72044 KB |
Output is correct |
57 |
Correct |
528 ms |
78628 KB |
Output is correct |
58 |
Correct |
328 ms |
71952 KB |
Output is correct |
59 |
Correct |
331 ms |
71912 KB |
Output is correct |
60 |
Correct |
459 ms |
78316 KB |
Output is correct |
61 |
Correct |
253 ms |
75092 KB |
Output is correct |
62 |
Correct |
266 ms |
74136 KB |
Output is correct |
63 |
Correct |
528 ms |
78920 KB |
Output is correct |
64 |
Correct |
503 ms |
78876 KB |
Output is correct |
65 |
Correct |
468 ms |
78372 KB |
Output is correct |
66 |
Correct |
477 ms |
78316 KB |
Output is correct |
67 |
Correct |
454 ms |
78248 KB |
Output is correct |
68 |
Correct |
472 ms |
78456 KB |
Output is correct |
69 |
Correct |
492 ms |
78316 KB |
Output is correct |
70 |
Correct |
473 ms |
78316 KB |
Output is correct |
71 |
Correct |
493 ms |
78472 KB |
Output is correct |
72 |
Correct |
485 ms |
78320 KB |
Output is correct |
73 |
Correct |
478 ms |
78392 KB |
Output is correct |
74 |
Correct |
486 ms |
78264 KB |
Output is correct |
75 |
Correct |
488 ms |
78256 KB |
Output is correct |
76 |
Correct |
486 ms |
78360 KB |
Output is correct |
77 |
Correct |
505 ms |
78376 KB |
Output is correct |
78 |
Correct |
491 ms |
78276 KB |
Output is correct |
79 |
Correct |
418 ms |
76080 KB |
Output is correct |
80 |
Correct |
423 ms |
76396 KB |
Output is correct |
81 |
Correct |
343 ms |
76676 KB |
Output is correct |
82 |
Correct |
104 ms |
57200 KB |
Output is correct |
83 |
Correct |
83 ms |
56448 KB |
Output is correct |
84 |
Correct |
59 ms |
55680 KB |
Output is correct |
85 |
Correct |
65 ms |
56608 KB |
Output is correct |
86 |
Correct |
97 ms |
57772 KB |
Output is correct |
87 |
Correct |
107 ms |
57728 KB |
Output is correct |
88 |
Correct |
110 ms |
57676 KB |
Output is correct |
89 |
Correct |
101 ms |
57664 KB |
Output is correct |
90 |
Correct |
120 ms |
57744 KB |
Output is correct |
91 |
Correct |
116 ms |
57672 KB |
Output is correct |
92 |
Correct |
80 ms |
56900 KB |
Output is correct |
93 |
Correct |
97 ms |
57212 KB |
Output is correct |
94 |
Correct |
74 ms |
55776 KB |
Output is correct |
95 |
Correct |
87 ms |
56884 KB |
Output is correct |
96 |
Correct |
106 ms |
57720 KB |
Output is correct |
97 |
Correct |
131 ms |
57732 KB |
Output is correct |
98 |
Correct |
74 ms |
56224 KB |
Output is correct |
99 |
Correct |
90 ms |
57604 KB |
Output is correct |
100 |
Correct |
106 ms |
58300 KB |
Output is correct |
101 |
Correct |
142 ms |
58940 KB |
Output is correct |
102 |
Correct |
122 ms |
59212 KB |
Output is correct |
103 |
Correct |
89 ms |
56824 KB |
Output is correct |
104 |
Correct |
104 ms |
58088 KB |
Output is correct |
105 |
Correct |
117 ms |
59204 KB |
Output is correct |
106 |
Correct |
79 ms |
56808 KB |
Output is correct |
107 |
Correct |
79 ms |
56424 KB |
Output is correct |
108 |
Correct |
95 ms |
58248 KB |
Output is correct |
109 |
Correct |
80 ms |
56164 KB |
Output is correct |
110 |
Correct |
106 ms |
58504 KB |
Output is correct |
111 |
Correct |
108 ms |
58476 KB |
Output is correct |
112 |
Correct |
114 ms |
58132 KB |
Output is correct |
113 |
Correct |
117 ms |
59004 KB |
Output is correct |
114 |
Correct |
92 ms |
57984 KB |
Output is correct |
115 |
Correct |
121 ms |
58936 KB |
Output is correct |
116 |
Correct |
75 ms |
56336 KB |
Output is correct |
117 |
Correct |
114 ms |
59020 KB |
Output is correct |
118 |
Correct |
91 ms |
57376 KB |
Output is correct |
119 |
Correct |
112 ms |
57024 KB |
Output is correct |
120 |
Correct |
111 ms |
58948 KB |
Output is correct |
121 |
Correct |
104 ms |
59072 KB |
Output is correct |
122 |
Correct |
108 ms |
58676 KB |
Output is correct |
123 |
Correct |
111 ms |
58880 KB |
Output is correct |
124 |
Correct |
106 ms |
58844 KB |
Output is correct |
125 |
Correct |
92 ms |
57636 KB |
Output is correct |
126 |
Correct |
86 ms |
58000 KB |
Output is correct |
127 |
Correct |
88 ms |
57016 KB |
Output is correct |
128 |
Correct |
101 ms |
58268 KB |
Output is correct |
129 |
Correct |
88 ms |
58624 KB |
Output is correct |
130 |
Correct |
499 ms |
78612 KB |
Output is correct |
131 |
Correct |
361 ms |
71780 KB |
Output is correct |
132 |
Correct |
508 ms |
78632 KB |
Output is correct |
133 |
Correct |
457 ms |
77124 KB |
Output is correct |
134 |
Correct |
396 ms |
74816 KB |
Output is correct |
135 |
Correct |
478 ms |
78284 KB |
Output is correct |
136 |
Correct |
509 ms |
79008 KB |
Output is correct |
137 |
Correct |
525 ms |
79176 KB |
Output is correct |
138 |
Correct |
454 ms |
78208 KB |
Output is correct |
139 |
Correct |
470 ms |
78308 KB |
Output is correct |
140 |
Correct |
465 ms |
78280 KB |
Output is correct |
141 |
Correct |
474 ms |
78304 KB |
Output is correct |
142 |
Correct |
499 ms |
78348 KB |
Output is correct |
143 |
Correct |
503 ms |
78220 KB |
Output is correct |
144 |
Correct |
475 ms |
78092 KB |
Output is correct |
145 |
Correct |
524 ms |
78060 KB |
Output is correct |
146 |
Correct |
484 ms |
78060 KB |
Output is correct |
147 |
Correct |
472 ms |
78056 KB |
Output is correct |
148 |
Correct |
518 ms |
78008 KB |
Output is correct |
149 |
Correct |
520 ms |
78000 KB |
Output is correct |
150 |
Correct |
301 ms |
75096 KB |
Output is correct |
151 |
Correct |
466 ms |
76168 KB |
Output is correct |
152 |
Correct |
428 ms |
76184 KB |
Output is correct |
153 |
Correct |
360 ms |
76268 KB |
Output is correct |