/*
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
*/
#include <bits/stdc++.h>
#define int long long
using namespace std;
#define all(x) x.begin(), x.end()
#define len(x) ll(x.size())
#define eb emplace_back
#define PI acos(-1.0)
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define MIN(v) *min_element(all(v))
#define MAX(v) *max_element(all(v))
#define BIT(x, i) (1 & ((x) >> (i)))
#define MASK(x) (1LL << (x))
#define task "tnc"
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
typedef long long ll;
typedef long double ld;
const ll INF = 1e18;
const int maxn = 1e6 + 5;
const int mod = 1e9 + 7;
const int mo = 998244353;
using pi = pair<ll, ll>;
using vi = vector<ll>;
using pii = pair<pair<ll, ll>, ll>;
mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
int n, m, q;
vector<pair<int, int>> d[maxn];
int pref[maxn];
vector<pair<int, int>> G[maxn];
struct seg
{
pair<int, int> st[maxn * 4];
int lazy[maxn * 4];
int st1[maxn * 4];
void push(int id)
{
st[id * 2].fi += lazy[id];
st[id * 2 + 1].fi += lazy[id];
lazy[id * 2] += lazy[id];
lazy[id * 2 + 1] += lazy[id];
lazy[id] = 0;
}
void build(int id, int l, int r)
{
st1[id] = 0;
if (l == r)
{
st[id].se = l;
return;
}
int mid = (l + r) / 2;
build(id * 2, l, mid);
build(id * 2 + 1, mid + 1, r);
st[id] = min(st[id * 2], st[id * 2 + 1]);
}
void update(int id, int l, int r, int u, int v, int val)
{
if (r < u || v < l)
{
return;
}
if (u <= l && r <= v)
{
st[id].fi += val;
lazy[id] += val;
return;
}
int mid = (l + r) / 2;
push(id);
update(id * 2, l, mid, u, v, val);
update(id * 2 + 1, mid + 1, r, u, v, val);
st[id] = min(st[id * 2], st[id * 2 + 1]);
}
pair<int, int> get(int id, int l, int r, int u, int v)
{
if (r < u || v < l)
{
return {INF, 0};
}
if (u <= l && r <= v)
{
return st[id];
}
int mid = (l + r) / 2;
push(id);
return min(get(id * 2, l, mid, u, v), get(id * 2 + 1, mid + 1, r, u, v));
}
void push1(int id)
{
st1[id * 2] += lazy[id];
st1[id * 2 + 1] += lazy[id];
lazy[id * 2] += lazy[id];
lazy[id * 2 + 1] += lazy[id];
lazy[id] = 0;
}
void upd(int id, int l, int r, int u, int v, int val)
{
if (r < u || v < l)
{
return;
}
if (u <= l && r <= v)
{
st1[id] += val;
lazy[id] += val;
return;
}
int mid = (l + r) / 2;
push1(id);
upd(id * 2, l, mid, u, v, val);
upd(id * 2 + 1, mid + 1, r, u, v, val);
st1[id] = max(st1[id * 2], st1[id * 2 + 1]);
}
int getval(int id, int l, int r, int u)
{
if (l == r)
{
return st1[id];
}
int mid = (l + r) / 2;
push1(id);
if (u <= mid)
{
return getval(id * 2, l, mid, u);
}
else
return getval(id * 2 + 1, mid + 1, r, u);
}
int get1(int id, int l, int r, int u, int val, int p)
{
if (r < u || val > st1[id] - p)
{
return -1;
}
int mid = (l + r) / 2;
if (l == r)
{
return l;
}
push1(id);
int x = get1(id * 2, l, mid, u, val, p);
if (x != -1)
{
return x;
}
return get1(id * 2 + 1, mid + 1, r, u, val, p);
}
} A, B;
int bit[maxn];
void upd(int id, int val)
{
for (id; id <= q; id += id & (-id))
{
bit[id] += val;
}
}
int get(int id)
{
int res = 0;
for (id; id >= 1; id -= id & (-id))
{
res += bit[id];
}
return res;
}
vector<pair<int, int>> era[maxn];
int pref1[maxn];
int que[maxn];
int ans[maxn];
signed main()
{
cin.tie(0), cout.tie(0)->sync_with_stdio(0);
cin >> n >> m >> q;
for (int i = 1; i <= q; i++)
{
int t;
cin >> t;
if (t == 1)
{
int l, r, c, k;
cin >> l >> r >> c >> k;
que[i] = c;
d[l].pb({i, k});
d[r + 1].pb({i, -k});
}
else if (t == 2)
{
int l, r, k;
cin >> l >> r >> k;
era[l].pb({i, k});
era[r + 1].pb({i, -k});
}
else if (t == 3)
{
int a, b;
cin >> a >> b;
G[a].pb({i, b});
}
ans[i] = -1;
}
A.build(1, 0, q);
B.build(1, 0, q);
for (int i = 1; i <= n; i++)
{
for (auto v : d[i])
{
A.update(1, 0, q, v.fi, q, v.se);
B.upd(1, 0, q, v.fi, q, v.se);
}
for (auto v : era[i])
{
A.update(1, 0, q, v.fi, q, -v.se);
upd(v.fi, v.se);
}
for (auto v : G[i])
{
pair<int, int> s = A.get(1, 0, q, 0, v.fi);
int k = B.getval(1, 0, q, s.se);
int num_era = get(v.fi) - get(s.se);
int d = B.get1(1, 0, q, s.se, num_era + v.se, k);
if (d >= v.fi)
{
ans[v.fi] = 0;
}
else
{
ans[v.fi] = que[d];
}
}
}
for (int i = 1; i <= q; i++)
{
if (ans[i] == -1)
continue;
cout << ans[i] << "\n";
}
}
Compilation message
foodcourt.cpp: In function 'void upd(long long int, long long int)':
foodcourt.cpp:162:10: warning: statement has no effect [-Wunused-value]
162 | for (id; id <= q; id += id & (-id))
| ^~
foodcourt.cpp: In function 'long long int get(long long int)':
foodcourt.cpp:170:10: warning: statement has no effect [-Wunused-value]
170 | for (id; id >= 1; id -= id & (-id))
| ^~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
84 ms |
196336 KB |
Output is correct |
2 |
Correct |
85 ms |
196300 KB |
Output is correct |
3 |
Correct |
83 ms |
196292 KB |
Output is correct |
4 |
Correct |
86 ms |
196272 KB |
Output is correct |
5 |
Correct |
82 ms |
196304 KB |
Output is correct |
6 |
Correct |
82 ms |
196280 KB |
Output is correct |
7 |
Correct |
89 ms |
196288 KB |
Output is correct |
8 |
Correct |
85 ms |
196376 KB |
Output is correct |
9 |
Correct |
89 ms |
196476 KB |
Output is correct |
10 |
Correct |
86 ms |
196332 KB |
Output is correct |
11 |
Correct |
86 ms |
196288 KB |
Output is correct |
12 |
Correct |
86 ms |
196296 KB |
Output is correct |
13 |
Correct |
82 ms |
196300 KB |
Output is correct |
14 |
Correct |
85 ms |
196324 KB |
Output is correct |
15 |
Correct |
85 ms |
196256 KB |
Output is correct |
16 |
Correct |
83 ms |
196272 KB |
Output is correct |
17 |
Correct |
84 ms |
196288 KB |
Output is correct |
18 |
Correct |
85 ms |
196380 KB |
Output is correct |
19 |
Correct |
84 ms |
196240 KB |
Output is correct |
20 |
Correct |
89 ms |
196432 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
84 ms |
196336 KB |
Output is correct |
2 |
Correct |
85 ms |
196300 KB |
Output is correct |
3 |
Correct |
83 ms |
196292 KB |
Output is correct |
4 |
Correct |
86 ms |
196272 KB |
Output is correct |
5 |
Correct |
82 ms |
196304 KB |
Output is correct |
6 |
Correct |
82 ms |
196280 KB |
Output is correct |
7 |
Correct |
89 ms |
196288 KB |
Output is correct |
8 |
Correct |
85 ms |
196376 KB |
Output is correct |
9 |
Correct |
89 ms |
196476 KB |
Output is correct |
10 |
Correct |
86 ms |
196332 KB |
Output is correct |
11 |
Correct |
86 ms |
196288 KB |
Output is correct |
12 |
Correct |
86 ms |
196296 KB |
Output is correct |
13 |
Correct |
82 ms |
196300 KB |
Output is correct |
14 |
Correct |
85 ms |
196324 KB |
Output is correct |
15 |
Correct |
85 ms |
196256 KB |
Output is correct |
16 |
Correct |
83 ms |
196272 KB |
Output is correct |
17 |
Correct |
84 ms |
196288 KB |
Output is correct |
18 |
Correct |
85 ms |
196380 KB |
Output is correct |
19 |
Correct |
84 ms |
196240 KB |
Output is correct |
20 |
Correct |
89 ms |
196432 KB |
Output is correct |
21 |
Correct |
84 ms |
196280 KB |
Output is correct |
22 |
Correct |
82 ms |
196344 KB |
Output is correct |
23 |
Correct |
87 ms |
196320 KB |
Output is correct |
24 |
Correct |
85 ms |
196380 KB |
Output is correct |
25 |
Correct |
84 ms |
196416 KB |
Output is correct |
26 |
Correct |
84 ms |
196324 KB |
Output is correct |
27 |
Correct |
85 ms |
196364 KB |
Output is correct |
28 |
Correct |
83 ms |
196336 KB |
Output is correct |
29 |
Correct |
84 ms |
196356 KB |
Output is correct |
30 |
Correct |
84 ms |
196384 KB |
Output is correct |
31 |
Correct |
84 ms |
196392 KB |
Output is correct |
32 |
Correct |
85 ms |
196340 KB |
Output is correct |
33 |
Correct |
83 ms |
196360 KB |
Output is correct |
34 |
Correct |
83 ms |
196300 KB |
Output is correct |
35 |
Correct |
83 ms |
196296 KB |
Output is correct |
36 |
Correct |
87 ms |
196348 KB |
Output is correct |
37 |
Correct |
82 ms |
196248 KB |
Output is correct |
38 |
Correct |
85 ms |
196276 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
146 ms |
205272 KB |
Output is correct |
2 |
Correct |
163 ms |
205268 KB |
Output is correct |
3 |
Correct |
171 ms |
205248 KB |
Output is correct |
4 |
Correct |
154 ms |
205256 KB |
Output is correct |
5 |
Correct |
154 ms |
205328 KB |
Output is correct |
6 |
Correct |
161 ms |
205460 KB |
Output is correct |
7 |
Correct |
116 ms |
203808 KB |
Output is correct |
8 |
Correct |
118 ms |
204000 KB |
Output is correct |
9 |
Correct |
153 ms |
204996 KB |
Output is correct |
10 |
Correct |
170 ms |
205388 KB |
Output is correct |
11 |
Correct |
153 ms |
205232 KB |
Output is correct |
12 |
Correct |
152 ms |
205360 KB |
Output is correct |
13 |
Correct |
145 ms |
204660 KB |
Output is correct |
14 |
Correct |
160 ms |
205180 KB |
Output is correct |
15 |
Correct |
156 ms |
205200 KB |
Output is correct |
16 |
Correct |
157 ms |
205344 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
472 ms |
229292 KB |
Output is correct |
2 |
Correct |
375 ms |
225932 KB |
Output is correct |
3 |
Correct |
515 ms |
230600 KB |
Output is correct |
4 |
Correct |
396 ms |
226096 KB |
Output is correct |
5 |
Correct |
379 ms |
226256 KB |
Output is correct |
6 |
Correct |
512 ms |
231024 KB |
Output is correct |
7 |
Correct |
224 ms |
225648 KB |
Output is correct |
8 |
Correct |
242 ms |
225968 KB |
Output is correct |
9 |
Correct |
488 ms |
229304 KB |
Output is correct |
10 |
Correct |
492 ms |
229316 KB |
Output is correct |
11 |
Correct |
463 ms |
227128 KB |
Output is correct |
12 |
Correct |
494 ms |
231168 KB |
Output is correct |
13 |
Correct |
480 ms |
227444 KB |
Output is correct |
14 |
Correct |
515 ms |
230940 KB |
Output is correct |
15 |
Correct |
523 ms |
231004 KB |
Output is correct |
16 |
Correct |
518 ms |
230824 KB |
Output is correct |
17 |
Correct |
518 ms |
231000 KB |
Output is correct |
18 |
Correct |
489 ms |
229064 KB |
Output is correct |
19 |
Correct |
500 ms |
230860 KB |
Output is correct |
20 |
Correct |
505 ms |
229392 KB |
Output is correct |
21 |
Correct |
509 ms |
230920 KB |
Output is correct |
22 |
Correct |
513 ms |
230816 KB |
Output is correct |
23 |
Correct |
514 ms |
230932 KB |
Output is correct |
24 |
Correct |
525 ms |
230860 KB |
Output is correct |
25 |
Correct |
426 ms |
229828 KB |
Output is correct |
26 |
Correct |
426 ms |
230216 KB |
Output is correct |
27 |
Correct |
404 ms |
230024 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
84 ms |
196336 KB |
Output is correct |
2 |
Correct |
85 ms |
196300 KB |
Output is correct |
3 |
Correct |
83 ms |
196292 KB |
Output is correct |
4 |
Correct |
86 ms |
196272 KB |
Output is correct |
5 |
Correct |
82 ms |
196304 KB |
Output is correct |
6 |
Correct |
82 ms |
196280 KB |
Output is correct |
7 |
Correct |
89 ms |
196288 KB |
Output is correct |
8 |
Correct |
85 ms |
196376 KB |
Output is correct |
9 |
Correct |
89 ms |
196476 KB |
Output is correct |
10 |
Correct |
86 ms |
196332 KB |
Output is correct |
11 |
Correct |
86 ms |
196288 KB |
Output is correct |
12 |
Correct |
86 ms |
196296 KB |
Output is correct |
13 |
Correct |
82 ms |
196300 KB |
Output is correct |
14 |
Correct |
85 ms |
196324 KB |
Output is correct |
15 |
Correct |
85 ms |
196256 KB |
Output is correct |
16 |
Correct |
83 ms |
196272 KB |
Output is correct |
17 |
Correct |
84 ms |
196288 KB |
Output is correct |
18 |
Correct |
85 ms |
196380 KB |
Output is correct |
19 |
Correct |
84 ms |
196240 KB |
Output is correct |
20 |
Correct |
89 ms |
196432 KB |
Output is correct |
21 |
Correct |
146 ms |
205272 KB |
Output is correct |
22 |
Correct |
163 ms |
205268 KB |
Output is correct |
23 |
Correct |
171 ms |
205248 KB |
Output is correct |
24 |
Correct |
154 ms |
205256 KB |
Output is correct |
25 |
Correct |
154 ms |
205328 KB |
Output is correct |
26 |
Correct |
161 ms |
205460 KB |
Output is correct |
27 |
Correct |
116 ms |
203808 KB |
Output is correct |
28 |
Correct |
118 ms |
204000 KB |
Output is correct |
29 |
Correct |
153 ms |
204996 KB |
Output is correct |
30 |
Correct |
170 ms |
205388 KB |
Output is correct |
31 |
Correct |
153 ms |
205232 KB |
Output is correct |
32 |
Correct |
152 ms |
205360 KB |
Output is correct |
33 |
Correct |
145 ms |
204660 KB |
Output is correct |
34 |
Correct |
160 ms |
205180 KB |
Output is correct |
35 |
Correct |
156 ms |
205200 KB |
Output is correct |
36 |
Correct |
157 ms |
205344 KB |
Output is correct |
37 |
Correct |
148 ms |
204748 KB |
Output is correct |
38 |
Correct |
144 ms |
204236 KB |
Output is correct |
39 |
Correct |
111 ms |
203544 KB |
Output is correct |
40 |
Correct |
118 ms |
203816 KB |
Output is correct |
41 |
Correct |
149 ms |
204304 KB |
Output is correct |
42 |
Correct |
155 ms |
205268 KB |
Output is correct |
43 |
Correct |
158 ms |
205224 KB |
Output is correct |
44 |
Correct |
162 ms |
204828 KB |
Output is correct |
45 |
Correct |
159 ms |
205256 KB |
Output is correct |
46 |
Correct |
160 ms |
205188 KB |
Output is correct |
47 |
Correct |
118 ms |
204176 KB |
Output is correct |
48 |
Correct |
140 ms |
205092 KB |
Output is correct |
49 |
Correct |
126 ms |
203920 KB |
Output is correct |
50 |
Correct |
136 ms |
204608 KB |
Output is correct |
51 |
Correct |
160 ms |
205424 KB |
Output is correct |
52 |
Correct |
196 ms |
205396 KB |
Output is correct |
53 |
Correct |
143 ms |
204284 KB |
Output is correct |
54 |
Correct |
152 ms |
205260 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
141 ms |
204124 KB |
Output is correct |
2 |
Correct |
152 ms |
204400 KB |
Output is correct |
3 |
Correct |
175 ms |
204496 KB |
Output is correct |
4 |
Correct |
142 ms |
203312 KB |
Output is correct |
5 |
Correct |
162 ms |
204008 KB |
Output is correct |
6 |
Correct |
159 ms |
204412 KB |
Output is correct |
7 |
Correct |
120 ms |
203228 KB |
Output is correct |
8 |
Correct |
129 ms |
203088 KB |
Output is correct |
9 |
Correct |
130 ms |
203724 KB |
Output is correct |
10 |
Correct |
133 ms |
203228 KB |
Output is correct |
11 |
Correct |
162 ms |
204152 KB |
Output is correct |
12 |
Correct |
162 ms |
204244 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
84 ms |
196336 KB |
Output is correct |
2 |
Correct |
85 ms |
196300 KB |
Output is correct |
3 |
Correct |
83 ms |
196292 KB |
Output is correct |
4 |
Correct |
86 ms |
196272 KB |
Output is correct |
5 |
Correct |
82 ms |
196304 KB |
Output is correct |
6 |
Correct |
82 ms |
196280 KB |
Output is correct |
7 |
Correct |
89 ms |
196288 KB |
Output is correct |
8 |
Correct |
85 ms |
196376 KB |
Output is correct |
9 |
Correct |
89 ms |
196476 KB |
Output is correct |
10 |
Correct |
86 ms |
196332 KB |
Output is correct |
11 |
Correct |
86 ms |
196288 KB |
Output is correct |
12 |
Correct |
86 ms |
196296 KB |
Output is correct |
13 |
Correct |
82 ms |
196300 KB |
Output is correct |
14 |
Correct |
85 ms |
196324 KB |
Output is correct |
15 |
Correct |
85 ms |
196256 KB |
Output is correct |
16 |
Correct |
83 ms |
196272 KB |
Output is correct |
17 |
Correct |
84 ms |
196288 KB |
Output is correct |
18 |
Correct |
85 ms |
196380 KB |
Output is correct |
19 |
Correct |
84 ms |
196240 KB |
Output is correct |
20 |
Correct |
89 ms |
196432 KB |
Output is correct |
21 |
Correct |
84 ms |
196280 KB |
Output is correct |
22 |
Correct |
82 ms |
196344 KB |
Output is correct |
23 |
Correct |
87 ms |
196320 KB |
Output is correct |
24 |
Correct |
85 ms |
196380 KB |
Output is correct |
25 |
Correct |
84 ms |
196416 KB |
Output is correct |
26 |
Correct |
84 ms |
196324 KB |
Output is correct |
27 |
Correct |
85 ms |
196364 KB |
Output is correct |
28 |
Correct |
83 ms |
196336 KB |
Output is correct |
29 |
Correct |
84 ms |
196356 KB |
Output is correct |
30 |
Correct |
84 ms |
196384 KB |
Output is correct |
31 |
Correct |
84 ms |
196392 KB |
Output is correct |
32 |
Correct |
85 ms |
196340 KB |
Output is correct |
33 |
Correct |
83 ms |
196360 KB |
Output is correct |
34 |
Correct |
83 ms |
196300 KB |
Output is correct |
35 |
Correct |
83 ms |
196296 KB |
Output is correct |
36 |
Correct |
87 ms |
196348 KB |
Output is correct |
37 |
Correct |
82 ms |
196248 KB |
Output is correct |
38 |
Correct |
85 ms |
196276 KB |
Output is correct |
39 |
Correct |
146 ms |
205272 KB |
Output is correct |
40 |
Correct |
163 ms |
205268 KB |
Output is correct |
41 |
Correct |
171 ms |
205248 KB |
Output is correct |
42 |
Correct |
154 ms |
205256 KB |
Output is correct |
43 |
Correct |
154 ms |
205328 KB |
Output is correct |
44 |
Correct |
161 ms |
205460 KB |
Output is correct |
45 |
Correct |
116 ms |
203808 KB |
Output is correct |
46 |
Correct |
118 ms |
204000 KB |
Output is correct |
47 |
Correct |
153 ms |
204996 KB |
Output is correct |
48 |
Correct |
170 ms |
205388 KB |
Output is correct |
49 |
Correct |
153 ms |
205232 KB |
Output is correct |
50 |
Correct |
152 ms |
205360 KB |
Output is correct |
51 |
Correct |
145 ms |
204660 KB |
Output is correct |
52 |
Correct |
160 ms |
205180 KB |
Output is correct |
53 |
Correct |
156 ms |
205200 KB |
Output is correct |
54 |
Correct |
157 ms |
205344 KB |
Output is correct |
55 |
Correct |
148 ms |
204748 KB |
Output is correct |
56 |
Correct |
144 ms |
204236 KB |
Output is correct |
57 |
Correct |
111 ms |
203544 KB |
Output is correct |
58 |
Correct |
118 ms |
203816 KB |
Output is correct |
59 |
Correct |
149 ms |
204304 KB |
Output is correct |
60 |
Correct |
155 ms |
205268 KB |
Output is correct |
61 |
Correct |
158 ms |
205224 KB |
Output is correct |
62 |
Correct |
162 ms |
204828 KB |
Output is correct |
63 |
Correct |
159 ms |
205256 KB |
Output is correct |
64 |
Correct |
160 ms |
205188 KB |
Output is correct |
65 |
Correct |
118 ms |
204176 KB |
Output is correct |
66 |
Correct |
140 ms |
205092 KB |
Output is correct |
67 |
Correct |
126 ms |
203920 KB |
Output is correct |
68 |
Correct |
136 ms |
204608 KB |
Output is correct |
69 |
Correct |
160 ms |
205424 KB |
Output is correct |
70 |
Correct |
196 ms |
205396 KB |
Output is correct |
71 |
Correct |
143 ms |
204284 KB |
Output is correct |
72 |
Correct |
152 ms |
205260 KB |
Output is correct |
73 |
Correct |
141 ms |
204124 KB |
Output is correct |
74 |
Correct |
152 ms |
204400 KB |
Output is correct |
75 |
Correct |
175 ms |
204496 KB |
Output is correct |
76 |
Correct |
142 ms |
203312 KB |
Output is correct |
77 |
Correct |
162 ms |
204008 KB |
Output is correct |
78 |
Correct |
159 ms |
204412 KB |
Output is correct |
79 |
Correct |
120 ms |
203228 KB |
Output is correct |
80 |
Correct |
129 ms |
203088 KB |
Output is correct |
81 |
Correct |
130 ms |
203724 KB |
Output is correct |
82 |
Correct |
133 ms |
203228 KB |
Output is correct |
83 |
Correct |
162 ms |
204152 KB |
Output is correct |
84 |
Correct |
162 ms |
204244 KB |
Output is correct |
85 |
Correct |
173 ms |
204812 KB |
Output is correct |
86 |
Correct |
174 ms |
205252 KB |
Output is correct |
87 |
Correct |
160 ms |
204748 KB |
Output is correct |
88 |
Correct |
188 ms |
205404 KB |
Output is correct |
89 |
Correct |
145 ms |
203116 KB |
Output is correct |
90 |
Correct |
164 ms |
205380 KB |
Output is correct |
91 |
Correct |
165 ms |
204504 KB |
Output is correct |
92 |
Correct |
145 ms |
204352 KB |
Output is correct |
93 |
Correct |
168 ms |
205380 KB |
Output is correct |
94 |
Correct |
157 ms |
204884 KB |
Output is correct |
95 |
Correct |
154 ms |
205216 KB |
Output is correct |
96 |
Correct |
169 ms |
205400 KB |
Output is correct |
97 |
Correct |
163 ms |
205320 KB |
Output is correct |
98 |
Correct |
151 ms |
204688 KB |
Output is correct |
99 |
Correct |
128 ms |
204276 KB |
Output is correct |
100 |
Correct |
148 ms |
204488 KB |
Output is correct |
101 |
Correct |
149 ms |
205300 KB |
Output is correct |
102 |
Correct |
151 ms |
205080 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
84 ms |
196336 KB |
Output is correct |
2 |
Correct |
85 ms |
196300 KB |
Output is correct |
3 |
Correct |
83 ms |
196292 KB |
Output is correct |
4 |
Correct |
86 ms |
196272 KB |
Output is correct |
5 |
Correct |
82 ms |
196304 KB |
Output is correct |
6 |
Correct |
82 ms |
196280 KB |
Output is correct |
7 |
Correct |
89 ms |
196288 KB |
Output is correct |
8 |
Correct |
85 ms |
196376 KB |
Output is correct |
9 |
Correct |
89 ms |
196476 KB |
Output is correct |
10 |
Correct |
86 ms |
196332 KB |
Output is correct |
11 |
Correct |
86 ms |
196288 KB |
Output is correct |
12 |
Correct |
86 ms |
196296 KB |
Output is correct |
13 |
Correct |
82 ms |
196300 KB |
Output is correct |
14 |
Correct |
85 ms |
196324 KB |
Output is correct |
15 |
Correct |
85 ms |
196256 KB |
Output is correct |
16 |
Correct |
83 ms |
196272 KB |
Output is correct |
17 |
Correct |
84 ms |
196288 KB |
Output is correct |
18 |
Correct |
85 ms |
196380 KB |
Output is correct |
19 |
Correct |
84 ms |
196240 KB |
Output is correct |
20 |
Correct |
89 ms |
196432 KB |
Output is correct |
21 |
Correct |
84 ms |
196280 KB |
Output is correct |
22 |
Correct |
82 ms |
196344 KB |
Output is correct |
23 |
Correct |
87 ms |
196320 KB |
Output is correct |
24 |
Correct |
85 ms |
196380 KB |
Output is correct |
25 |
Correct |
84 ms |
196416 KB |
Output is correct |
26 |
Correct |
84 ms |
196324 KB |
Output is correct |
27 |
Correct |
85 ms |
196364 KB |
Output is correct |
28 |
Correct |
83 ms |
196336 KB |
Output is correct |
29 |
Correct |
84 ms |
196356 KB |
Output is correct |
30 |
Correct |
84 ms |
196384 KB |
Output is correct |
31 |
Correct |
84 ms |
196392 KB |
Output is correct |
32 |
Correct |
85 ms |
196340 KB |
Output is correct |
33 |
Correct |
83 ms |
196360 KB |
Output is correct |
34 |
Correct |
83 ms |
196300 KB |
Output is correct |
35 |
Correct |
83 ms |
196296 KB |
Output is correct |
36 |
Correct |
87 ms |
196348 KB |
Output is correct |
37 |
Correct |
82 ms |
196248 KB |
Output is correct |
38 |
Correct |
85 ms |
196276 KB |
Output is correct |
39 |
Correct |
146 ms |
205272 KB |
Output is correct |
40 |
Correct |
163 ms |
205268 KB |
Output is correct |
41 |
Correct |
171 ms |
205248 KB |
Output is correct |
42 |
Correct |
154 ms |
205256 KB |
Output is correct |
43 |
Correct |
154 ms |
205328 KB |
Output is correct |
44 |
Correct |
161 ms |
205460 KB |
Output is correct |
45 |
Correct |
116 ms |
203808 KB |
Output is correct |
46 |
Correct |
118 ms |
204000 KB |
Output is correct |
47 |
Correct |
153 ms |
204996 KB |
Output is correct |
48 |
Correct |
170 ms |
205388 KB |
Output is correct |
49 |
Correct |
153 ms |
205232 KB |
Output is correct |
50 |
Correct |
152 ms |
205360 KB |
Output is correct |
51 |
Correct |
145 ms |
204660 KB |
Output is correct |
52 |
Correct |
160 ms |
205180 KB |
Output is correct |
53 |
Correct |
156 ms |
205200 KB |
Output is correct |
54 |
Correct |
157 ms |
205344 KB |
Output is correct |
55 |
Correct |
472 ms |
229292 KB |
Output is correct |
56 |
Correct |
375 ms |
225932 KB |
Output is correct |
57 |
Correct |
515 ms |
230600 KB |
Output is correct |
58 |
Correct |
396 ms |
226096 KB |
Output is correct |
59 |
Correct |
379 ms |
226256 KB |
Output is correct |
60 |
Correct |
512 ms |
231024 KB |
Output is correct |
61 |
Correct |
224 ms |
225648 KB |
Output is correct |
62 |
Correct |
242 ms |
225968 KB |
Output is correct |
63 |
Correct |
488 ms |
229304 KB |
Output is correct |
64 |
Correct |
492 ms |
229316 KB |
Output is correct |
65 |
Correct |
463 ms |
227128 KB |
Output is correct |
66 |
Correct |
494 ms |
231168 KB |
Output is correct |
67 |
Correct |
480 ms |
227444 KB |
Output is correct |
68 |
Correct |
515 ms |
230940 KB |
Output is correct |
69 |
Correct |
523 ms |
231004 KB |
Output is correct |
70 |
Correct |
518 ms |
230824 KB |
Output is correct |
71 |
Correct |
518 ms |
231000 KB |
Output is correct |
72 |
Correct |
489 ms |
229064 KB |
Output is correct |
73 |
Correct |
500 ms |
230860 KB |
Output is correct |
74 |
Correct |
505 ms |
229392 KB |
Output is correct |
75 |
Correct |
509 ms |
230920 KB |
Output is correct |
76 |
Correct |
513 ms |
230816 KB |
Output is correct |
77 |
Correct |
514 ms |
230932 KB |
Output is correct |
78 |
Correct |
525 ms |
230860 KB |
Output is correct |
79 |
Correct |
426 ms |
229828 KB |
Output is correct |
80 |
Correct |
426 ms |
230216 KB |
Output is correct |
81 |
Correct |
404 ms |
230024 KB |
Output is correct |
82 |
Correct |
148 ms |
204748 KB |
Output is correct |
83 |
Correct |
144 ms |
204236 KB |
Output is correct |
84 |
Correct |
111 ms |
203544 KB |
Output is correct |
85 |
Correct |
118 ms |
203816 KB |
Output is correct |
86 |
Correct |
149 ms |
204304 KB |
Output is correct |
87 |
Correct |
155 ms |
205268 KB |
Output is correct |
88 |
Correct |
158 ms |
205224 KB |
Output is correct |
89 |
Correct |
162 ms |
204828 KB |
Output is correct |
90 |
Correct |
159 ms |
205256 KB |
Output is correct |
91 |
Correct |
160 ms |
205188 KB |
Output is correct |
92 |
Correct |
118 ms |
204176 KB |
Output is correct |
93 |
Correct |
140 ms |
205092 KB |
Output is correct |
94 |
Correct |
126 ms |
203920 KB |
Output is correct |
95 |
Correct |
136 ms |
204608 KB |
Output is correct |
96 |
Correct |
160 ms |
205424 KB |
Output is correct |
97 |
Correct |
196 ms |
205396 KB |
Output is correct |
98 |
Correct |
143 ms |
204284 KB |
Output is correct |
99 |
Correct |
152 ms |
205260 KB |
Output is correct |
100 |
Correct |
141 ms |
204124 KB |
Output is correct |
101 |
Correct |
152 ms |
204400 KB |
Output is correct |
102 |
Correct |
175 ms |
204496 KB |
Output is correct |
103 |
Correct |
142 ms |
203312 KB |
Output is correct |
104 |
Correct |
162 ms |
204008 KB |
Output is correct |
105 |
Correct |
159 ms |
204412 KB |
Output is correct |
106 |
Correct |
120 ms |
203228 KB |
Output is correct |
107 |
Correct |
129 ms |
203088 KB |
Output is correct |
108 |
Correct |
130 ms |
203724 KB |
Output is correct |
109 |
Correct |
133 ms |
203228 KB |
Output is correct |
110 |
Correct |
162 ms |
204152 KB |
Output is correct |
111 |
Correct |
162 ms |
204244 KB |
Output is correct |
112 |
Correct |
173 ms |
204812 KB |
Output is correct |
113 |
Correct |
174 ms |
205252 KB |
Output is correct |
114 |
Correct |
160 ms |
204748 KB |
Output is correct |
115 |
Correct |
188 ms |
205404 KB |
Output is correct |
116 |
Correct |
145 ms |
203116 KB |
Output is correct |
117 |
Correct |
164 ms |
205380 KB |
Output is correct |
118 |
Correct |
165 ms |
204504 KB |
Output is correct |
119 |
Correct |
145 ms |
204352 KB |
Output is correct |
120 |
Correct |
168 ms |
205380 KB |
Output is correct |
121 |
Correct |
157 ms |
204884 KB |
Output is correct |
122 |
Correct |
154 ms |
205216 KB |
Output is correct |
123 |
Correct |
169 ms |
205400 KB |
Output is correct |
124 |
Correct |
163 ms |
205320 KB |
Output is correct |
125 |
Correct |
151 ms |
204688 KB |
Output is correct |
126 |
Correct |
128 ms |
204276 KB |
Output is correct |
127 |
Correct |
148 ms |
204488 KB |
Output is correct |
128 |
Correct |
149 ms |
205300 KB |
Output is correct |
129 |
Correct |
151 ms |
205080 KB |
Output is correct |
130 |
Correct |
527 ms |
230892 KB |
Output is correct |
131 |
Correct |
415 ms |
225924 KB |
Output is correct |
132 |
Correct |
508 ms |
230856 KB |
Output is correct |
133 |
Correct |
501 ms |
230216 KB |
Output is correct |
134 |
Correct |
438 ms |
228424 KB |
Output is correct |
135 |
Correct |
520 ms |
231036 KB |
Output is correct |
136 |
Correct |
483 ms |
229580 KB |
Output is correct |
137 |
Correct |
485 ms |
229608 KB |
Output is correct |
138 |
Correct |
477 ms |
227172 KB |
Output is correct |
139 |
Correct |
506 ms |
231012 KB |
Output is correct |
140 |
Correct |
489 ms |
228420 KB |
Output is correct |
141 |
Correct |
513 ms |
231196 KB |
Output is correct |
142 |
Correct |
528 ms |
231056 KB |
Output is correct |
143 |
Correct |
558 ms |
231052 KB |
Output is correct |
144 |
Correct |
492 ms |
229068 KB |
Output is correct |
145 |
Correct |
568 ms |
231048 KB |
Output is correct |
146 |
Correct |
559 ms |
230016 KB |
Output is correct |
147 |
Correct |
586 ms |
230924 KB |
Output is correct |
148 |
Correct |
553 ms |
230984 KB |
Output is correct |
149 |
Correct |
557 ms |
230932 KB |
Output is correct |
150 |
Correct |
294 ms |
226700 KB |
Output is correct |
151 |
Correct |
465 ms |
230332 KB |
Output is correct |
152 |
Correct |
450 ms |
230368 KB |
Output is correct |
153 |
Correct |
418 ms |
229928 KB |
Output is correct |