// Om Namah Shivaya
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template<typename T> using Tree = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef long long int ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL)
#define pb push_back
#define endl '\n'
#define sz(a) a.size()
#define setbits(x) __builtin_popcountll(x)
#define ff first
#define ss second
#define conts continue
#define ceil2(x, y) ((x + y - 1) / (y))
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define yes cout << "Yes" << endl
#define no cout << "No" << endl
#define rep(i, n) for(int i = 0; i < n; ++i)
#define rep1(i, n) for(int i = 1; i <= n; ++i)
#define rev(i, s, e) for(int i = s; i >= e; --i)
#define trav(i, a) for(auto &i : a)
template<typename T>
void amin(T &a, T b) {
a = min(a, b);
}
template<typename T>
void amax(T &a, T b) {
a = max(a, b);
}
#ifdef LOCAL
#include "debug.h"
#else
#define debug(x) 42
#endif
/*
refs:
https://codeforces.com/blog/entry/88748?#comment-772940
https://oj.uz/submission/741888
*/
const int MOD = 1e9 + 7;
const int N = 1e5 + 5;
const int inf1 = int(1e9) + 5;
const ll inf2 = ll(1e18) + 5;
template<typename T>
struct segtree {
// https://codeforces.com/blog/entry/18051
/*=======================================================*/
struct data {
ll mxsuff, sum, plus_sum;
};
data neutral = {0, 0, 0};
data merge(data &left, data &right) {
data curr;
curr.mxsuff = max(right.mxsuff, right.sum + left.mxsuff);
curr.sum = left.sum + right.sum;
curr.plus_sum = left.plus_sum + right.plus_sum;
return curr;
}
void create(int i, T v) {
}
void modify(int i, T v) {
tr[i].sum = v;
tr[i].mxsuff = max(v, 0ll);
tr[i].plus_sum = max(v, 0ll);
}
/*=======================================================*/
int n;
vector<data> tr;
segtree() {
}
segtree(int siz) {
init(siz);
}
void init(int siz) {
n = siz;
tr.assign(2 * n, neutral);
}
void build(vector<T> &a, int siz) {
rep(i, siz) create(i + n, a[i]);
rev(i, n - 1, 1) tr[i] = merge(tr[i << 1], tr[i << 1 | 1]);
}
void pupd(int i, T v) {
modify(i + n, v);
for (i = (i + n) >> 1; i; i >>= 1) tr[i] = merge(tr[i << 1], tr[i << 1 | 1]);
}
data query(int l, int r) {
data resl = neutral, resr = neutral;
for (l += n, r += n; l <= r; l >>= 1, r >>= 1) {
if (l & 1) resl = merge(resl, tr[l++]);
if (!(r & 1)) resr = merge(tr[r--], resr);
}
return merge(resl, resr);
}
};
void solve(int test_case)
{
ll n, m, q; cin >> n >> m >> q;
vector<ll> group(q + 5);
vector<pll> upds[n + 5], queries[n + 5];
rep1(i, q) {
ll t; cin >> t;
if (t == 1) {
ll l, r, c, k; cin >> l >> r >> c >> k;
group[i] = c;
upds[l].pb({i, k});
upds[r + 1].pb({i, 0});
}
else if (t == 2) {
ll l, r, k; cin >> l >> r >> k;
upds[l].pb({i, -k});
upds[r + 1].pb({i, 0});
}
else {
ll x, y; cin >> x >> y;
queries[x].pb({y, i});
}
}
vector<ll> ans(q + 5, -1);
segtree<ll> st(q + 5);
rep1(i, n) {
for (auto [ind, val] : upds[i]) {
st.pupd(ind, val);
}
for (auto [v, id] : queries[i]) {
auto [mxsuff, sum, plus_sum] = st.query(1, id);
ll curr_guys = mxsuff;
ll tot_guys = plus_sum;
if (v > curr_guys) {
ans[id] = 0;
}
else {
ll want = tot_guys - curr_guys + v;
ll l = 1, r = id;
ll first = -1;
while (l <= r) {
ll mid = (l + r) >> 1;
if (st.query(1, mid).plus_sum >= want) {
first = mid;
r = mid - 1;
}
else {
l = mid + 1;
}
}
if (first == -1) {
exit(101);
}
// assert(first != -1);
ans[id] = group[first];
}
}
}
rep1(i, q) {
if (ans[i] != -1) {
cout << ans[i] << endl;
}
}
}
int main()
{
fastio;
int t = 1;
// cin >> t;
rep1(i, t) {
solve(i);
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
468 KB |
Output is correct |
2 |
Correct |
2 ms |
608 KB |
Output is correct |
3 |
Correct |
2 ms |
468 KB |
Output is correct |
4 |
Correct |
2 ms |
596 KB |
Output is correct |
5 |
Correct |
1 ms |
468 KB |
Output is correct |
6 |
Correct |
1 ms |
468 KB |
Output is correct |
7 |
Correct |
2 ms |
596 KB |
Output is correct |
8 |
Correct |
2 ms |
588 KB |
Output is correct |
9 |
Correct |
2 ms |
584 KB |
Output is correct |
10 |
Correct |
2 ms |
596 KB |
Output is correct |
11 |
Correct |
2 ms |
596 KB |
Output is correct |
12 |
Correct |
2 ms |
596 KB |
Output is correct |
13 |
Correct |
1 ms |
584 KB |
Output is correct |
14 |
Correct |
2 ms |
596 KB |
Output is correct |
15 |
Correct |
1 ms |
592 KB |
Output is correct |
16 |
Correct |
2 ms |
584 KB |
Output is correct |
17 |
Correct |
2 ms |
468 KB |
Output is correct |
18 |
Correct |
2 ms |
596 KB |
Output is correct |
19 |
Correct |
2 ms |
588 KB |
Output is correct |
20 |
Correct |
2 ms |
596 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
468 KB |
Output is correct |
2 |
Correct |
2 ms |
608 KB |
Output is correct |
3 |
Correct |
2 ms |
468 KB |
Output is correct |
4 |
Correct |
2 ms |
596 KB |
Output is correct |
5 |
Correct |
1 ms |
468 KB |
Output is correct |
6 |
Correct |
1 ms |
468 KB |
Output is correct |
7 |
Correct |
2 ms |
596 KB |
Output is correct |
8 |
Correct |
2 ms |
588 KB |
Output is correct |
9 |
Correct |
2 ms |
584 KB |
Output is correct |
10 |
Correct |
2 ms |
596 KB |
Output is correct |
11 |
Correct |
2 ms |
596 KB |
Output is correct |
12 |
Correct |
2 ms |
596 KB |
Output is correct |
13 |
Correct |
1 ms |
584 KB |
Output is correct |
14 |
Correct |
2 ms |
596 KB |
Output is correct |
15 |
Correct |
1 ms |
592 KB |
Output is correct |
16 |
Correct |
2 ms |
584 KB |
Output is correct |
17 |
Correct |
2 ms |
468 KB |
Output is correct |
18 |
Correct |
2 ms |
596 KB |
Output is correct |
19 |
Correct |
2 ms |
588 KB |
Output is correct |
20 |
Correct |
2 ms |
596 KB |
Output is correct |
21 |
Correct |
2 ms |
596 KB |
Output is correct |
22 |
Correct |
2 ms |
596 KB |
Output is correct |
23 |
Correct |
2 ms |
596 KB |
Output is correct |
24 |
Correct |
2 ms |
596 KB |
Output is correct |
25 |
Correct |
2 ms |
456 KB |
Output is correct |
26 |
Correct |
1 ms |
468 KB |
Output is correct |
27 |
Correct |
3 ms |
596 KB |
Output is correct |
28 |
Correct |
3 ms |
596 KB |
Output is correct |
29 |
Correct |
2 ms |
596 KB |
Output is correct |
30 |
Correct |
2 ms |
596 KB |
Output is correct |
31 |
Correct |
2 ms |
636 KB |
Output is correct |
32 |
Correct |
2 ms |
596 KB |
Output is correct |
33 |
Correct |
2 ms |
596 KB |
Output is correct |
34 |
Correct |
2 ms |
596 KB |
Output is correct |
35 |
Correct |
2 ms |
596 KB |
Output is correct |
36 |
Correct |
2 ms |
616 KB |
Output is correct |
37 |
Correct |
2 ms |
448 KB |
Output is correct |
38 |
Correct |
2 ms |
584 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
58 ms |
10256 KB |
Output is correct |
2 |
Correct |
52 ms |
10440 KB |
Output is correct |
3 |
Correct |
43 ms |
10256 KB |
Output is correct |
4 |
Correct |
47 ms |
10236 KB |
Output is correct |
5 |
Correct |
44 ms |
10416 KB |
Output is correct |
6 |
Correct |
48 ms |
10424 KB |
Output is correct |
7 |
Correct |
28 ms |
5728 KB |
Output is correct |
8 |
Correct |
31 ms |
6912 KB |
Output is correct |
9 |
Correct |
49 ms |
11660 KB |
Output is correct |
10 |
Correct |
46 ms |
11628 KB |
Output is correct |
11 |
Correct |
47 ms |
11628 KB |
Output is correct |
12 |
Correct |
46 ms |
11632 KB |
Output is correct |
13 |
Correct |
43 ms |
9576 KB |
Output is correct |
14 |
Correct |
54 ms |
11368 KB |
Output is correct |
15 |
Correct |
45 ms |
10648 KB |
Output is correct |
16 |
Correct |
47 ms |
11728 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
332 ms |
35400 KB |
Output is correct |
2 |
Correct |
251 ms |
33384 KB |
Output is correct |
3 |
Correct |
417 ms |
44936 KB |
Output is correct |
4 |
Correct |
262 ms |
36168 KB |
Output is correct |
5 |
Correct |
250 ms |
33748 KB |
Output is correct |
6 |
Correct |
361 ms |
45380 KB |
Output is correct |
7 |
Correct |
178 ms |
26920 KB |
Output is correct |
8 |
Correct |
170 ms |
27892 KB |
Output is correct |
9 |
Correct |
417 ms |
44140 KB |
Output is correct |
10 |
Correct |
424 ms |
44148 KB |
Output is correct |
11 |
Correct |
390 ms |
45264 KB |
Output is correct |
12 |
Correct |
351 ms |
45244 KB |
Output is correct |
13 |
Correct |
386 ms |
45208 KB |
Output is correct |
14 |
Correct |
362 ms |
45204 KB |
Output is correct |
15 |
Correct |
364 ms |
45128 KB |
Output is correct |
16 |
Correct |
362 ms |
45128 KB |
Output is correct |
17 |
Correct |
356 ms |
45112 KB |
Output is correct |
18 |
Correct |
433 ms |
45244 KB |
Output is correct |
19 |
Correct |
354 ms |
45260 KB |
Output is correct |
20 |
Correct |
344 ms |
45156 KB |
Output is correct |
21 |
Correct |
366 ms |
45224 KB |
Output is correct |
22 |
Correct |
421 ms |
45200 KB |
Output is correct |
23 |
Correct |
373 ms |
45132 KB |
Output is correct |
24 |
Correct |
375 ms |
45128 KB |
Output is correct |
25 |
Correct |
324 ms |
41820 KB |
Output is correct |
26 |
Correct |
309 ms |
45100 KB |
Output is correct |
27 |
Correct |
283 ms |
45772 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
468 KB |
Output is correct |
2 |
Correct |
2 ms |
608 KB |
Output is correct |
3 |
Correct |
2 ms |
468 KB |
Output is correct |
4 |
Correct |
2 ms |
596 KB |
Output is correct |
5 |
Correct |
1 ms |
468 KB |
Output is correct |
6 |
Correct |
1 ms |
468 KB |
Output is correct |
7 |
Correct |
2 ms |
596 KB |
Output is correct |
8 |
Correct |
2 ms |
588 KB |
Output is correct |
9 |
Correct |
2 ms |
584 KB |
Output is correct |
10 |
Correct |
2 ms |
596 KB |
Output is correct |
11 |
Correct |
2 ms |
596 KB |
Output is correct |
12 |
Correct |
2 ms |
596 KB |
Output is correct |
13 |
Correct |
1 ms |
584 KB |
Output is correct |
14 |
Correct |
2 ms |
596 KB |
Output is correct |
15 |
Correct |
1 ms |
592 KB |
Output is correct |
16 |
Correct |
2 ms |
584 KB |
Output is correct |
17 |
Correct |
2 ms |
468 KB |
Output is correct |
18 |
Correct |
2 ms |
596 KB |
Output is correct |
19 |
Correct |
2 ms |
588 KB |
Output is correct |
20 |
Correct |
2 ms |
596 KB |
Output is correct |
21 |
Correct |
58 ms |
10256 KB |
Output is correct |
22 |
Correct |
52 ms |
10440 KB |
Output is correct |
23 |
Correct |
43 ms |
10256 KB |
Output is correct |
24 |
Correct |
47 ms |
10236 KB |
Output is correct |
25 |
Correct |
44 ms |
10416 KB |
Output is correct |
26 |
Correct |
48 ms |
10424 KB |
Output is correct |
27 |
Correct |
28 ms |
5728 KB |
Output is correct |
28 |
Correct |
31 ms |
6912 KB |
Output is correct |
29 |
Correct |
49 ms |
11660 KB |
Output is correct |
30 |
Correct |
46 ms |
11628 KB |
Output is correct |
31 |
Correct |
47 ms |
11628 KB |
Output is correct |
32 |
Correct |
46 ms |
11632 KB |
Output is correct |
33 |
Correct |
43 ms |
9576 KB |
Output is correct |
34 |
Correct |
54 ms |
11368 KB |
Output is correct |
35 |
Correct |
45 ms |
10648 KB |
Output is correct |
36 |
Correct |
47 ms |
11728 KB |
Output is correct |
37 |
Correct |
57 ms |
10220 KB |
Output is correct |
38 |
Correct |
64 ms |
9632 KB |
Output is correct |
39 |
Correct |
36 ms |
5892 KB |
Output is correct |
40 |
Correct |
35 ms |
6412 KB |
Output is correct |
41 |
Correct |
60 ms |
11468 KB |
Output is correct |
42 |
Correct |
57 ms |
11492 KB |
Output is correct |
43 |
Correct |
66 ms |
11536 KB |
Output is correct |
44 |
Correct |
66 ms |
11468 KB |
Output is correct |
45 |
Correct |
61 ms |
11572 KB |
Output is correct |
46 |
Correct |
57 ms |
11456 KB |
Output is correct |
47 |
Correct |
45 ms |
10336 KB |
Output is correct |
48 |
Correct |
56 ms |
11432 KB |
Output is correct |
49 |
Correct |
48 ms |
8208 KB |
Output is correct |
50 |
Correct |
46 ms |
10316 KB |
Output is correct |
51 |
Correct |
68 ms |
11568 KB |
Output is correct |
52 |
Correct |
59 ms |
11592 KB |
Output is correct |
53 |
Correct |
41 ms |
9604 KB |
Output is correct |
54 |
Correct |
59 ms |
11820 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
83 ms |
9296 KB |
Output is correct |
2 |
Correct |
84 ms |
9588 KB |
Output is correct |
3 |
Correct |
87 ms |
11848 KB |
Output is correct |
4 |
Correct |
54 ms |
9208 KB |
Output is correct |
5 |
Correct |
66 ms |
10616 KB |
Output is correct |
6 |
Correct |
82 ms |
11836 KB |
Output is correct |
7 |
Correct |
46 ms |
6704 KB |
Output is correct |
8 |
Correct |
44 ms |
6208 KB |
Output is correct |
9 |
Correct |
64 ms |
11072 KB |
Output is correct |
10 |
Correct |
47 ms |
8756 KB |
Output is correct |
11 |
Correct |
75 ms |
11464 KB |
Output is correct |
12 |
Correct |
81 ms |
11584 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
468 KB |
Output is correct |
2 |
Correct |
2 ms |
608 KB |
Output is correct |
3 |
Correct |
2 ms |
468 KB |
Output is correct |
4 |
Correct |
2 ms |
596 KB |
Output is correct |
5 |
Correct |
1 ms |
468 KB |
Output is correct |
6 |
Correct |
1 ms |
468 KB |
Output is correct |
7 |
Correct |
2 ms |
596 KB |
Output is correct |
8 |
Correct |
2 ms |
588 KB |
Output is correct |
9 |
Correct |
2 ms |
584 KB |
Output is correct |
10 |
Correct |
2 ms |
596 KB |
Output is correct |
11 |
Correct |
2 ms |
596 KB |
Output is correct |
12 |
Correct |
2 ms |
596 KB |
Output is correct |
13 |
Correct |
1 ms |
584 KB |
Output is correct |
14 |
Correct |
2 ms |
596 KB |
Output is correct |
15 |
Correct |
1 ms |
592 KB |
Output is correct |
16 |
Correct |
2 ms |
584 KB |
Output is correct |
17 |
Correct |
2 ms |
468 KB |
Output is correct |
18 |
Correct |
2 ms |
596 KB |
Output is correct |
19 |
Correct |
2 ms |
588 KB |
Output is correct |
20 |
Correct |
2 ms |
596 KB |
Output is correct |
21 |
Correct |
2 ms |
596 KB |
Output is correct |
22 |
Correct |
2 ms |
596 KB |
Output is correct |
23 |
Correct |
2 ms |
596 KB |
Output is correct |
24 |
Correct |
2 ms |
596 KB |
Output is correct |
25 |
Correct |
2 ms |
456 KB |
Output is correct |
26 |
Correct |
1 ms |
468 KB |
Output is correct |
27 |
Correct |
3 ms |
596 KB |
Output is correct |
28 |
Correct |
3 ms |
596 KB |
Output is correct |
29 |
Correct |
2 ms |
596 KB |
Output is correct |
30 |
Correct |
2 ms |
596 KB |
Output is correct |
31 |
Correct |
2 ms |
636 KB |
Output is correct |
32 |
Correct |
2 ms |
596 KB |
Output is correct |
33 |
Correct |
2 ms |
596 KB |
Output is correct |
34 |
Correct |
2 ms |
596 KB |
Output is correct |
35 |
Correct |
2 ms |
596 KB |
Output is correct |
36 |
Correct |
2 ms |
616 KB |
Output is correct |
37 |
Correct |
2 ms |
448 KB |
Output is correct |
38 |
Correct |
2 ms |
584 KB |
Output is correct |
39 |
Correct |
58 ms |
10256 KB |
Output is correct |
40 |
Correct |
52 ms |
10440 KB |
Output is correct |
41 |
Correct |
43 ms |
10256 KB |
Output is correct |
42 |
Correct |
47 ms |
10236 KB |
Output is correct |
43 |
Correct |
44 ms |
10416 KB |
Output is correct |
44 |
Correct |
48 ms |
10424 KB |
Output is correct |
45 |
Correct |
28 ms |
5728 KB |
Output is correct |
46 |
Correct |
31 ms |
6912 KB |
Output is correct |
47 |
Correct |
49 ms |
11660 KB |
Output is correct |
48 |
Correct |
46 ms |
11628 KB |
Output is correct |
49 |
Correct |
47 ms |
11628 KB |
Output is correct |
50 |
Correct |
46 ms |
11632 KB |
Output is correct |
51 |
Correct |
43 ms |
9576 KB |
Output is correct |
52 |
Correct |
54 ms |
11368 KB |
Output is correct |
53 |
Correct |
45 ms |
10648 KB |
Output is correct |
54 |
Correct |
47 ms |
11728 KB |
Output is correct |
55 |
Correct |
57 ms |
10220 KB |
Output is correct |
56 |
Correct |
64 ms |
9632 KB |
Output is correct |
57 |
Correct |
36 ms |
5892 KB |
Output is correct |
58 |
Correct |
35 ms |
6412 KB |
Output is correct |
59 |
Correct |
60 ms |
11468 KB |
Output is correct |
60 |
Correct |
57 ms |
11492 KB |
Output is correct |
61 |
Correct |
66 ms |
11536 KB |
Output is correct |
62 |
Correct |
66 ms |
11468 KB |
Output is correct |
63 |
Correct |
61 ms |
11572 KB |
Output is correct |
64 |
Correct |
57 ms |
11456 KB |
Output is correct |
65 |
Correct |
45 ms |
10336 KB |
Output is correct |
66 |
Correct |
56 ms |
11432 KB |
Output is correct |
67 |
Correct |
48 ms |
8208 KB |
Output is correct |
68 |
Correct |
46 ms |
10316 KB |
Output is correct |
69 |
Correct |
68 ms |
11568 KB |
Output is correct |
70 |
Correct |
59 ms |
11592 KB |
Output is correct |
71 |
Correct |
41 ms |
9604 KB |
Output is correct |
72 |
Correct |
59 ms |
11820 KB |
Output is correct |
73 |
Correct |
83 ms |
9296 KB |
Output is correct |
74 |
Correct |
84 ms |
9588 KB |
Output is correct |
75 |
Correct |
87 ms |
11848 KB |
Output is correct |
76 |
Correct |
54 ms |
9208 KB |
Output is correct |
77 |
Correct |
66 ms |
10616 KB |
Output is correct |
78 |
Correct |
82 ms |
11836 KB |
Output is correct |
79 |
Correct |
46 ms |
6704 KB |
Output is correct |
80 |
Correct |
44 ms |
6208 KB |
Output is correct |
81 |
Correct |
64 ms |
11072 KB |
Output is correct |
82 |
Correct |
47 ms |
8756 KB |
Output is correct |
83 |
Correct |
75 ms |
11464 KB |
Output is correct |
84 |
Correct |
81 ms |
11584 KB |
Output is correct |
85 |
Correct |
67 ms |
10488 KB |
Output is correct |
86 |
Correct |
71 ms |
11884 KB |
Output is correct |
87 |
Correct |
60 ms |
10788 KB |
Output is correct |
88 |
Correct |
75 ms |
12084 KB |
Output is correct |
89 |
Correct |
48 ms |
8576 KB |
Output is correct |
90 |
Correct |
64 ms |
12048 KB |
Output is correct |
91 |
Correct |
52 ms |
9420 KB |
Output is correct |
92 |
Correct |
52 ms |
9032 KB |
Output is correct |
93 |
Correct |
68 ms |
12044 KB |
Output is correct |
94 |
Correct |
69 ms |
12008 KB |
Output is correct |
95 |
Correct |
78 ms |
11468 KB |
Output is correct |
96 |
Correct |
72 ms |
11988 KB |
Output is correct |
97 |
Correct |
71 ms |
11976 KB |
Output is correct |
98 |
Correct |
54 ms |
9820 KB |
Output is correct |
99 |
Correct |
66 ms |
10916 KB |
Output is correct |
100 |
Correct |
58 ms |
9848 KB |
Output is correct |
101 |
Correct |
63 ms |
11996 KB |
Output is correct |
102 |
Correct |
55 ms |
12264 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
468 KB |
Output is correct |
2 |
Correct |
2 ms |
608 KB |
Output is correct |
3 |
Correct |
2 ms |
468 KB |
Output is correct |
4 |
Correct |
2 ms |
596 KB |
Output is correct |
5 |
Correct |
1 ms |
468 KB |
Output is correct |
6 |
Correct |
1 ms |
468 KB |
Output is correct |
7 |
Correct |
2 ms |
596 KB |
Output is correct |
8 |
Correct |
2 ms |
588 KB |
Output is correct |
9 |
Correct |
2 ms |
584 KB |
Output is correct |
10 |
Correct |
2 ms |
596 KB |
Output is correct |
11 |
Correct |
2 ms |
596 KB |
Output is correct |
12 |
Correct |
2 ms |
596 KB |
Output is correct |
13 |
Correct |
1 ms |
584 KB |
Output is correct |
14 |
Correct |
2 ms |
596 KB |
Output is correct |
15 |
Correct |
1 ms |
592 KB |
Output is correct |
16 |
Correct |
2 ms |
584 KB |
Output is correct |
17 |
Correct |
2 ms |
468 KB |
Output is correct |
18 |
Correct |
2 ms |
596 KB |
Output is correct |
19 |
Correct |
2 ms |
588 KB |
Output is correct |
20 |
Correct |
2 ms |
596 KB |
Output is correct |
21 |
Correct |
2 ms |
596 KB |
Output is correct |
22 |
Correct |
2 ms |
596 KB |
Output is correct |
23 |
Correct |
2 ms |
596 KB |
Output is correct |
24 |
Correct |
2 ms |
596 KB |
Output is correct |
25 |
Correct |
2 ms |
456 KB |
Output is correct |
26 |
Correct |
1 ms |
468 KB |
Output is correct |
27 |
Correct |
3 ms |
596 KB |
Output is correct |
28 |
Correct |
3 ms |
596 KB |
Output is correct |
29 |
Correct |
2 ms |
596 KB |
Output is correct |
30 |
Correct |
2 ms |
596 KB |
Output is correct |
31 |
Correct |
2 ms |
636 KB |
Output is correct |
32 |
Correct |
2 ms |
596 KB |
Output is correct |
33 |
Correct |
2 ms |
596 KB |
Output is correct |
34 |
Correct |
2 ms |
596 KB |
Output is correct |
35 |
Correct |
2 ms |
596 KB |
Output is correct |
36 |
Correct |
2 ms |
616 KB |
Output is correct |
37 |
Correct |
2 ms |
448 KB |
Output is correct |
38 |
Correct |
2 ms |
584 KB |
Output is correct |
39 |
Correct |
58 ms |
10256 KB |
Output is correct |
40 |
Correct |
52 ms |
10440 KB |
Output is correct |
41 |
Correct |
43 ms |
10256 KB |
Output is correct |
42 |
Correct |
47 ms |
10236 KB |
Output is correct |
43 |
Correct |
44 ms |
10416 KB |
Output is correct |
44 |
Correct |
48 ms |
10424 KB |
Output is correct |
45 |
Correct |
28 ms |
5728 KB |
Output is correct |
46 |
Correct |
31 ms |
6912 KB |
Output is correct |
47 |
Correct |
49 ms |
11660 KB |
Output is correct |
48 |
Correct |
46 ms |
11628 KB |
Output is correct |
49 |
Correct |
47 ms |
11628 KB |
Output is correct |
50 |
Correct |
46 ms |
11632 KB |
Output is correct |
51 |
Correct |
43 ms |
9576 KB |
Output is correct |
52 |
Correct |
54 ms |
11368 KB |
Output is correct |
53 |
Correct |
45 ms |
10648 KB |
Output is correct |
54 |
Correct |
47 ms |
11728 KB |
Output is correct |
55 |
Correct |
332 ms |
35400 KB |
Output is correct |
56 |
Correct |
251 ms |
33384 KB |
Output is correct |
57 |
Correct |
417 ms |
44936 KB |
Output is correct |
58 |
Correct |
262 ms |
36168 KB |
Output is correct |
59 |
Correct |
250 ms |
33748 KB |
Output is correct |
60 |
Correct |
361 ms |
45380 KB |
Output is correct |
61 |
Correct |
178 ms |
26920 KB |
Output is correct |
62 |
Correct |
170 ms |
27892 KB |
Output is correct |
63 |
Correct |
417 ms |
44140 KB |
Output is correct |
64 |
Correct |
424 ms |
44148 KB |
Output is correct |
65 |
Correct |
390 ms |
45264 KB |
Output is correct |
66 |
Correct |
351 ms |
45244 KB |
Output is correct |
67 |
Correct |
386 ms |
45208 KB |
Output is correct |
68 |
Correct |
362 ms |
45204 KB |
Output is correct |
69 |
Correct |
364 ms |
45128 KB |
Output is correct |
70 |
Correct |
362 ms |
45128 KB |
Output is correct |
71 |
Correct |
356 ms |
45112 KB |
Output is correct |
72 |
Correct |
433 ms |
45244 KB |
Output is correct |
73 |
Correct |
354 ms |
45260 KB |
Output is correct |
74 |
Correct |
344 ms |
45156 KB |
Output is correct |
75 |
Correct |
366 ms |
45224 KB |
Output is correct |
76 |
Correct |
421 ms |
45200 KB |
Output is correct |
77 |
Correct |
373 ms |
45132 KB |
Output is correct |
78 |
Correct |
375 ms |
45128 KB |
Output is correct |
79 |
Correct |
324 ms |
41820 KB |
Output is correct |
80 |
Correct |
309 ms |
45100 KB |
Output is correct |
81 |
Correct |
283 ms |
45772 KB |
Output is correct |
82 |
Correct |
57 ms |
10220 KB |
Output is correct |
83 |
Correct |
64 ms |
9632 KB |
Output is correct |
84 |
Correct |
36 ms |
5892 KB |
Output is correct |
85 |
Correct |
35 ms |
6412 KB |
Output is correct |
86 |
Correct |
60 ms |
11468 KB |
Output is correct |
87 |
Correct |
57 ms |
11492 KB |
Output is correct |
88 |
Correct |
66 ms |
11536 KB |
Output is correct |
89 |
Correct |
66 ms |
11468 KB |
Output is correct |
90 |
Correct |
61 ms |
11572 KB |
Output is correct |
91 |
Correct |
57 ms |
11456 KB |
Output is correct |
92 |
Correct |
45 ms |
10336 KB |
Output is correct |
93 |
Correct |
56 ms |
11432 KB |
Output is correct |
94 |
Correct |
48 ms |
8208 KB |
Output is correct |
95 |
Correct |
46 ms |
10316 KB |
Output is correct |
96 |
Correct |
68 ms |
11568 KB |
Output is correct |
97 |
Correct |
59 ms |
11592 KB |
Output is correct |
98 |
Correct |
41 ms |
9604 KB |
Output is correct |
99 |
Correct |
59 ms |
11820 KB |
Output is correct |
100 |
Correct |
83 ms |
9296 KB |
Output is correct |
101 |
Correct |
84 ms |
9588 KB |
Output is correct |
102 |
Correct |
87 ms |
11848 KB |
Output is correct |
103 |
Correct |
54 ms |
9208 KB |
Output is correct |
104 |
Correct |
66 ms |
10616 KB |
Output is correct |
105 |
Correct |
82 ms |
11836 KB |
Output is correct |
106 |
Correct |
46 ms |
6704 KB |
Output is correct |
107 |
Correct |
44 ms |
6208 KB |
Output is correct |
108 |
Correct |
64 ms |
11072 KB |
Output is correct |
109 |
Correct |
47 ms |
8756 KB |
Output is correct |
110 |
Correct |
75 ms |
11464 KB |
Output is correct |
111 |
Correct |
81 ms |
11584 KB |
Output is correct |
112 |
Correct |
67 ms |
10488 KB |
Output is correct |
113 |
Correct |
71 ms |
11884 KB |
Output is correct |
114 |
Correct |
60 ms |
10788 KB |
Output is correct |
115 |
Correct |
75 ms |
12084 KB |
Output is correct |
116 |
Correct |
48 ms |
8576 KB |
Output is correct |
117 |
Correct |
64 ms |
12048 KB |
Output is correct |
118 |
Correct |
52 ms |
9420 KB |
Output is correct |
119 |
Correct |
52 ms |
9032 KB |
Output is correct |
120 |
Correct |
68 ms |
12044 KB |
Output is correct |
121 |
Correct |
69 ms |
12008 KB |
Output is correct |
122 |
Correct |
78 ms |
11468 KB |
Output is correct |
123 |
Correct |
72 ms |
11988 KB |
Output is correct |
124 |
Correct |
71 ms |
11976 KB |
Output is correct |
125 |
Correct |
54 ms |
9820 KB |
Output is correct |
126 |
Correct |
66 ms |
10916 KB |
Output is correct |
127 |
Correct |
58 ms |
9848 KB |
Output is correct |
128 |
Correct |
63 ms |
11996 KB |
Output is correct |
129 |
Correct |
55 ms |
12264 KB |
Output is correct |
130 |
Correct |
424 ms |
45052 KB |
Output is correct |
131 |
Correct |
279 ms |
33348 KB |
Output is correct |
132 |
Correct |
401 ms |
45392 KB |
Output is correct |
133 |
Correct |
353 ms |
44144 KB |
Output is correct |
134 |
Correct |
332 ms |
40788 KB |
Output is correct |
135 |
Correct |
365 ms |
46148 KB |
Output is correct |
136 |
Correct |
438 ms |
45088 KB |
Output is correct |
137 |
Correct |
467 ms |
45132 KB |
Output is correct |
138 |
Correct |
379 ms |
45996 KB |
Output is correct |
139 |
Correct |
400 ms |
45916 KB |
Output is correct |
140 |
Correct |
386 ms |
45936 KB |
Output is correct |
141 |
Correct |
394 ms |
45936 KB |
Output is correct |
142 |
Correct |
383 ms |
45860 KB |
Output is correct |
143 |
Correct |
397 ms |
45772 KB |
Output is correct |
144 |
Correct |
372 ms |
45868 KB |
Output is correct |
145 |
Correct |
401 ms |
45864 KB |
Output is correct |
146 |
Correct |
389 ms |
45892 KB |
Output is correct |
147 |
Correct |
368 ms |
45800 KB |
Output is correct |
148 |
Correct |
402 ms |
45808 KB |
Output is correct |
149 |
Correct |
384 ms |
45880 KB |
Output is correct |
150 |
Correct |
265 ms |
41408 KB |
Output is correct |
151 |
Correct |
311 ms |
45704 KB |
Output is correct |
152 |
Correct |
306 ms |
45784 KB |
Output is correct |
153 |
Correct |
277 ms |
46720 KB |
Output is correct |