/**
____ ____ ____ ____ ____ ____
||l |||e |||i |||n |||a |||d ||
||__|||__|||__|||__|||__|||__||
|/__\|/__\|/__\|/__\|/__\|/__\|
**/
#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
typedef long long ll;
void speed()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
}
const int maxn = 250010;
const ll inf = 1e18;
struct node
{
ll min_val, min_lf, min_rf;
node(ll _min_val = inf, ll _min_lf = -1, ll _min_rf = -1)
{
min_val = _min_val;
min_lf = _min_lf;
min_rf = _min_rf;
}
};
node merge_nodes(node lf, node rf)
{
if (lf.min_val < rf.min_val)
return lf;
if (rf.min_val < lf.min_val)
return rf;
node cur = lf;
if (lf.min_rf == rf.min_lf - 1)
{
cur.min_rf = rf.min_rf;
}
return cur;
}
struct segment_tree
{
node tree[4 * maxn];
ll lazy[4 * maxn];
void push_lazy(int root, int left, int right)
{
tree[root].min_val += lazy[root];
if (left != right)
{
lazy[root * 2] += lazy[root];
lazy[root * 2 + 1] += lazy[root];
}
lazy[root] = 0;
}
void build(int root, int left, int right)
{
if (left == right)
{
tree[root].min_lf = left;
tree[root].min_rf = right;
tree[root].min_val = 0;
return;
}
int mid = (left + right) / 2;
build(root * 2, left, mid);
build(root * 2 + 1, mid + 1, right);
tree[root] = merge_nodes(tree[root * 2], tree[root * 2 + 1]);
}
void update(int root, int left, int right, int qleft, int qright, ll cur)
{
push_lazy(root, left, right);
if (left > qright || right < qleft)
return;
if (left >= qleft && right <= qright)
{
lazy[root] = cur;
push_lazy(root, left, right);
return;
}
int mid = (left + right) / 2;
update(root * 2, left, mid, qleft, qright, cur);
update(root * 2 + 1, mid + 1, right, qleft, qright, cur);
tree[root] = merge_nodes(tree[root * 2], tree[root * 2 + 1]);
}
node query(int root, int left, int right, int qleft, int qright)
{
push_lazy(root, left, right);
if (left > qright || right < qleft)
return node();
if (left >= qleft && right <= qright)
return tree[root];
int mid = (left + right) / 2;
return merge_nodes(query(root * 2, left, mid, qleft, qright),
query(root * 2 + 1, mid + 1, right, qleft, qright));
}
};
int n, m, q;
void input()
{
cin >> n >> m >> q;
}
struct task
{
int idx;
ll pos;
task(int _idx = 0, ll _pos = 0)
{
idx = _idx;
pos = _pos;
}
};
struct bit
{
ll fen[maxn];
void update(int pos, ll val)
{
for (int i = pos; i < maxn; i += (i & -i))
fen[i] += val;
}
ll query(int pos)
{
ll sum = 0;
for (int i = pos; i > 0; i -= (i & -i))
sum += fen[i];
return sum;
}
void range_update(int l, int r, ll v)
{
update(l, v);
update(r + 1, - v);
}
int find_kth(ll to)
{
int pos = 0;
ll sum = 0;
for (int bit = 20; bit >= 0; bit --)
{
if (pos + (1 << bit) > maxn)
continue;
ll new_sum = sum + fen[pos + (1 << bit)];
if (new_sum < to)
{
pos = pos + (1 << bit);
sum = new_sum;
}
}
return pos + 1;
}
};
vector < task > ask[maxn];
segment_tree line_tree;
bit pass_tree;
int ans[maxn];
pair < int, ll > add[maxn];
vector < int > upd[maxn];
int query_cnt = 0;
void simulate()
{
line_tree.build(1, 1, n);
int t, l, r, c, a; /// careful overflow
ll k, b;
for (int i = 1; i <= q; i ++)
{
cin >> t;
if (t == 1)
{
cin >> l >> r >> c >> k;
line_tree.update(1, 1, n, l, r, k);
add[i] = {c, k};
upd[l].push_back(i);
upd[r + 1].push_back(-i);
}
else
if (t == 2)
{
cin >> l >> r >> k;
line_tree.update(1, 1, n, l, r, -k);
pass_tree.range_update(l, r, k);
node cur;
while(true)
{
cur = line_tree.query(1, 1, n, l, r);
if (cur.min_val >= 0)
break;
pass_tree.range_update(cur.min_lf, cur.min_rf, cur.min_val);
line_tree.update(1, 1, n, cur.min_lf, cur.min_rf, - cur.min_val);
}
}
else
{
cin >> a >> b;
query_cnt ++;
if (line_tree.query(1, 1, n, a, a).min_val < b)
{
ans[query_cnt] = 0;
}
else
{
///cout << "here " << query_cnt << " " << pass_tree.query(a) << " " << line_tree.query(1, 1, n, a, a).min_val << endl;
ask[a].push_back(task(query_cnt, pass_tree.query(a) + b));
}
}
}
}
bit active;
void answer_tasks()
{
for (int i = 1; i <= n; i ++)
{
for (int cur : upd[i])
{
if (cur > 0)
{
active.update(cur, add[cur].second);
}
else
{
active.update(-cur, - add[-cur].second);
}
}
for (task cur : ask[i])
{
ans[cur.idx] = add[active.find_kth(cur.pos)].first;
///cout << cur.idx << " : " << cur.shop << " " << cur.pos << endl;
}
}
for (int i = 1; i <= query_cnt; i ++)
{
cout << ans[i] << endl;
}
}
void solve()
{
input();
simulate();
answer_tasks();
}
int main()
{
speed();
solve();
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
43864 KB |
Output is correct |
2 |
Correct |
10 ms |
43864 KB |
Output is correct |
3 |
Correct |
8 ms |
43864 KB |
Output is correct |
4 |
Correct |
8 ms |
43864 KB |
Output is correct |
5 |
Correct |
7 ms |
43864 KB |
Output is correct |
6 |
Correct |
7 ms |
43864 KB |
Output is correct |
7 |
Correct |
8 ms |
41816 KB |
Output is correct |
8 |
Correct |
9 ms |
43864 KB |
Output is correct |
9 |
Correct |
11 ms |
43864 KB |
Output is correct |
10 |
Correct |
8 ms |
41816 KB |
Output is correct |
11 |
Correct |
8 ms |
41816 KB |
Output is correct |
12 |
Correct |
9 ms |
41816 KB |
Output is correct |
13 |
Correct |
7 ms |
43864 KB |
Output is correct |
14 |
Correct |
8 ms |
43864 KB |
Output is correct |
15 |
Correct |
8 ms |
43864 KB |
Output is correct |
16 |
Correct |
8 ms |
43864 KB |
Output is correct |
17 |
Correct |
8 ms |
41816 KB |
Output is correct |
18 |
Correct |
9 ms |
43864 KB |
Output is correct |
19 |
Correct |
8 ms |
43864 KB |
Output is correct |
20 |
Correct |
8 ms |
41816 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
43864 KB |
Output is correct |
2 |
Correct |
10 ms |
43864 KB |
Output is correct |
3 |
Correct |
8 ms |
43864 KB |
Output is correct |
4 |
Correct |
8 ms |
43864 KB |
Output is correct |
5 |
Correct |
7 ms |
43864 KB |
Output is correct |
6 |
Correct |
7 ms |
43864 KB |
Output is correct |
7 |
Correct |
8 ms |
41816 KB |
Output is correct |
8 |
Correct |
9 ms |
43864 KB |
Output is correct |
9 |
Correct |
11 ms |
43864 KB |
Output is correct |
10 |
Correct |
8 ms |
41816 KB |
Output is correct |
11 |
Correct |
8 ms |
41816 KB |
Output is correct |
12 |
Correct |
9 ms |
41816 KB |
Output is correct |
13 |
Correct |
7 ms |
43864 KB |
Output is correct |
14 |
Correct |
8 ms |
43864 KB |
Output is correct |
15 |
Correct |
8 ms |
43864 KB |
Output is correct |
16 |
Correct |
8 ms |
43864 KB |
Output is correct |
17 |
Correct |
8 ms |
41816 KB |
Output is correct |
18 |
Correct |
9 ms |
43864 KB |
Output is correct |
19 |
Correct |
8 ms |
43864 KB |
Output is correct |
20 |
Correct |
8 ms |
41816 KB |
Output is correct |
21 |
Correct |
9 ms |
43864 KB |
Output is correct |
22 |
Correct |
9 ms |
43864 KB |
Output is correct |
23 |
Correct |
8 ms |
43868 KB |
Output is correct |
24 |
Correct |
8 ms |
43864 KB |
Output is correct |
25 |
Correct |
7 ms |
44120 KB |
Output is correct |
26 |
Correct |
7 ms |
43864 KB |
Output is correct |
27 |
Correct |
8 ms |
41816 KB |
Output is correct |
28 |
Correct |
8 ms |
42016 KB |
Output is correct |
29 |
Correct |
9 ms |
41816 KB |
Output is correct |
30 |
Correct |
9 ms |
43864 KB |
Output is correct |
31 |
Correct |
11 ms |
43864 KB |
Output is correct |
32 |
Correct |
12 ms |
43864 KB |
Output is correct |
33 |
Correct |
8 ms |
43864 KB |
Output is correct |
34 |
Correct |
7 ms |
43864 KB |
Output is correct |
35 |
Correct |
9 ms |
41820 KB |
Output is correct |
36 |
Correct |
8 ms |
43864 KB |
Output is correct |
37 |
Correct |
8 ms |
41816 KB |
Output is correct |
38 |
Correct |
10 ms |
41816 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
120 ms |
49140 KB |
Output is correct |
2 |
Correct |
119 ms |
49488 KB |
Output is correct |
3 |
Correct |
122 ms |
49488 KB |
Output is correct |
4 |
Correct |
114 ms |
48976 KB |
Output is correct |
5 |
Correct |
132 ms |
49376 KB |
Output is correct |
6 |
Correct |
132 ms |
49488 KB |
Output is correct |
7 |
Correct |
22 ms |
46672 KB |
Output is correct |
8 |
Correct |
25 ms |
46432 KB |
Output is correct |
9 |
Correct |
120 ms |
47696 KB |
Output is correct |
10 |
Correct |
122 ms |
49188 KB |
Output is correct |
11 |
Correct |
136 ms |
49272 KB |
Output is correct |
12 |
Correct |
125 ms |
49284 KB |
Output is correct |
13 |
Correct |
79 ms |
47608 KB |
Output is correct |
14 |
Correct |
91 ms |
49488 KB |
Output is correct |
15 |
Correct |
124 ms |
49392 KB |
Output is correct |
16 |
Correct |
106 ms |
48084 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
504 ms |
55264 KB |
Output is correct |
2 |
Correct |
501 ms |
54372 KB |
Output is correct |
3 |
Correct |
497 ms |
55708 KB |
Output is correct |
4 |
Correct |
288 ms |
55120 KB |
Output is correct |
5 |
Correct |
310 ms |
54028 KB |
Output is correct |
6 |
Correct |
375 ms |
56664 KB |
Output is correct |
7 |
Correct |
74 ms |
48324 KB |
Output is correct |
8 |
Correct |
77 ms |
46012 KB |
Output is correct |
9 |
Correct |
340 ms |
57232 KB |
Output is correct |
10 |
Correct |
369 ms |
57596 KB |
Output is correct |
11 |
Correct |
517 ms |
55376 KB |
Output is correct |
12 |
Correct |
426 ms |
55584 KB |
Output is correct |
13 |
Correct |
407 ms |
55088 KB |
Output is correct |
14 |
Correct |
547 ms |
55312 KB |
Output is correct |
15 |
Correct |
644 ms |
55408 KB |
Output is correct |
16 |
Correct |
664 ms |
55500 KB |
Output is correct |
17 |
Correct |
645 ms |
55632 KB |
Output is correct |
18 |
Correct |
613 ms |
55476 KB |
Output is correct |
19 |
Correct |
586 ms |
55784 KB |
Output is correct |
20 |
Correct |
594 ms |
55588 KB |
Output is correct |
21 |
Correct |
658 ms |
55688 KB |
Output is correct |
22 |
Correct |
633 ms |
55808 KB |
Output is correct |
23 |
Correct |
499 ms |
55376 KB |
Output is correct |
24 |
Correct |
633 ms |
55212 KB |
Output is correct |
25 |
Correct |
322 ms |
50924 KB |
Output is correct |
26 |
Correct |
320 ms |
53088 KB |
Output is correct |
27 |
Execution timed out |
1044 ms |
54428 KB |
Time limit exceeded |
28 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
43864 KB |
Output is correct |
2 |
Correct |
10 ms |
43864 KB |
Output is correct |
3 |
Correct |
8 ms |
43864 KB |
Output is correct |
4 |
Correct |
8 ms |
43864 KB |
Output is correct |
5 |
Correct |
7 ms |
43864 KB |
Output is correct |
6 |
Correct |
7 ms |
43864 KB |
Output is correct |
7 |
Correct |
8 ms |
41816 KB |
Output is correct |
8 |
Correct |
9 ms |
43864 KB |
Output is correct |
9 |
Correct |
11 ms |
43864 KB |
Output is correct |
10 |
Correct |
8 ms |
41816 KB |
Output is correct |
11 |
Correct |
8 ms |
41816 KB |
Output is correct |
12 |
Correct |
9 ms |
41816 KB |
Output is correct |
13 |
Correct |
7 ms |
43864 KB |
Output is correct |
14 |
Correct |
8 ms |
43864 KB |
Output is correct |
15 |
Correct |
8 ms |
43864 KB |
Output is correct |
16 |
Correct |
8 ms |
43864 KB |
Output is correct |
17 |
Correct |
8 ms |
41816 KB |
Output is correct |
18 |
Correct |
9 ms |
43864 KB |
Output is correct |
19 |
Correct |
8 ms |
43864 KB |
Output is correct |
20 |
Correct |
8 ms |
41816 KB |
Output is correct |
21 |
Correct |
120 ms |
49140 KB |
Output is correct |
22 |
Correct |
119 ms |
49488 KB |
Output is correct |
23 |
Correct |
122 ms |
49488 KB |
Output is correct |
24 |
Correct |
114 ms |
48976 KB |
Output is correct |
25 |
Correct |
132 ms |
49376 KB |
Output is correct |
26 |
Correct |
132 ms |
49488 KB |
Output is correct |
27 |
Correct |
22 ms |
46672 KB |
Output is correct |
28 |
Correct |
25 ms |
46432 KB |
Output is correct |
29 |
Correct |
120 ms |
47696 KB |
Output is correct |
30 |
Correct |
122 ms |
49188 KB |
Output is correct |
31 |
Correct |
136 ms |
49272 KB |
Output is correct |
32 |
Correct |
125 ms |
49284 KB |
Output is correct |
33 |
Correct |
79 ms |
47608 KB |
Output is correct |
34 |
Correct |
91 ms |
49488 KB |
Output is correct |
35 |
Correct |
124 ms |
49392 KB |
Output is correct |
36 |
Correct |
106 ms |
48084 KB |
Output is correct |
37 |
Correct |
79 ms |
49488 KB |
Output is correct |
38 |
Correct |
72 ms |
49488 KB |
Output is correct |
39 |
Correct |
19 ms |
46480 KB |
Output is correct |
40 |
Correct |
22 ms |
46852 KB |
Output is correct |
41 |
Correct |
92 ms |
45908 KB |
Output is correct |
42 |
Correct |
82 ms |
49460 KB |
Output is correct |
43 |
Correct |
97 ms |
49408 KB |
Output is correct |
44 |
Correct |
91 ms |
49404 KB |
Output is correct |
45 |
Correct |
84 ms |
47960 KB |
Output is correct |
46 |
Correct |
118 ms |
49492 KB |
Output is correct |
47 |
Correct |
36 ms |
48852 KB |
Output is correct |
48 |
Correct |
80 ms |
49232 KB |
Output is correct |
49 |
Correct |
78 ms |
48976 KB |
Output is correct |
50 |
Correct |
121 ms |
47696 KB |
Output is correct |
51 |
Correct |
140 ms |
48028 KB |
Output is correct |
52 |
Correct |
141 ms |
49556 KB |
Output is correct |
53 |
Correct |
83 ms |
47944 KB |
Output is correct |
54 |
Correct |
90 ms |
49724 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
64 ms |
47856 KB |
Output is correct |
2 |
Correct |
60 ms |
47952 KB |
Output is correct |
3 |
Correct |
63 ms |
48204 KB |
Output is correct |
4 |
Correct |
46 ms |
47700 KB |
Output is correct |
5 |
Correct |
66 ms |
47956 KB |
Output is correct |
6 |
Correct |
89 ms |
48208 KB |
Output is correct |
7 |
Correct |
24 ms |
44756 KB |
Output is correct |
8 |
Correct |
23 ms |
44860 KB |
Output is correct |
9 |
Correct |
47 ms |
47184 KB |
Output is correct |
10 |
Correct |
46 ms |
46928 KB |
Output is correct |
11 |
Correct |
57 ms |
47184 KB |
Output is correct |
12 |
Correct |
64 ms |
47228 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
43864 KB |
Output is correct |
2 |
Correct |
10 ms |
43864 KB |
Output is correct |
3 |
Correct |
8 ms |
43864 KB |
Output is correct |
4 |
Correct |
8 ms |
43864 KB |
Output is correct |
5 |
Correct |
7 ms |
43864 KB |
Output is correct |
6 |
Correct |
7 ms |
43864 KB |
Output is correct |
7 |
Correct |
8 ms |
41816 KB |
Output is correct |
8 |
Correct |
9 ms |
43864 KB |
Output is correct |
9 |
Correct |
11 ms |
43864 KB |
Output is correct |
10 |
Correct |
8 ms |
41816 KB |
Output is correct |
11 |
Correct |
8 ms |
41816 KB |
Output is correct |
12 |
Correct |
9 ms |
41816 KB |
Output is correct |
13 |
Correct |
7 ms |
43864 KB |
Output is correct |
14 |
Correct |
8 ms |
43864 KB |
Output is correct |
15 |
Correct |
8 ms |
43864 KB |
Output is correct |
16 |
Correct |
8 ms |
43864 KB |
Output is correct |
17 |
Correct |
8 ms |
41816 KB |
Output is correct |
18 |
Correct |
9 ms |
43864 KB |
Output is correct |
19 |
Correct |
8 ms |
43864 KB |
Output is correct |
20 |
Correct |
8 ms |
41816 KB |
Output is correct |
21 |
Correct |
9 ms |
43864 KB |
Output is correct |
22 |
Correct |
9 ms |
43864 KB |
Output is correct |
23 |
Correct |
8 ms |
43868 KB |
Output is correct |
24 |
Correct |
8 ms |
43864 KB |
Output is correct |
25 |
Correct |
7 ms |
44120 KB |
Output is correct |
26 |
Correct |
7 ms |
43864 KB |
Output is correct |
27 |
Correct |
8 ms |
41816 KB |
Output is correct |
28 |
Correct |
8 ms |
42016 KB |
Output is correct |
29 |
Correct |
9 ms |
41816 KB |
Output is correct |
30 |
Correct |
9 ms |
43864 KB |
Output is correct |
31 |
Correct |
11 ms |
43864 KB |
Output is correct |
32 |
Correct |
12 ms |
43864 KB |
Output is correct |
33 |
Correct |
8 ms |
43864 KB |
Output is correct |
34 |
Correct |
7 ms |
43864 KB |
Output is correct |
35 |
Correct |
9 ms |
41820 KB |
Output is correct |
36 |
Correct |
8 ms |
43864 KB |
Output is correct |
37 |
Correct |
8 ms |
41816 KB |
Output is correct |
38 |
Correct |
10 ms |
41816 KB |
Output is correct |
39 |
Correct |
120 ms |
49140 KB |
Output is correct |
40 |
Correct |
119 ms |
49488 KB |
Output is correct |
41 |
Correct |
122 ms |
49488 KB |
Output is correct |
42 |
Correct |
114 ms |
48976 KB |
Output is correct |
43 |
Correct |
132 ms |
49376 KB |
Output is correct |
44 |
Correct |
132 ms |
49488 KB |
Output is correct |
45 |
Correct |
22 ms |
46672 KB |
Output is correct |
46 |
Correct |
25 ms |
46432 KB |
Output is correct |
47 |
Correct |
120 ms |
47696 KB |
Output is correct |
48 |
Correct |
122 ms |
49188 KB |
Output is correct |
49 |
Correct |
136 ms |
49272 KB |
Output is correct |
50 |
Correct |
125 ms |
49284 KB |
Output is correct |
51 |
Correct |
79 ms |
47608 KB |
Output is correct |
52 |
Correct |
91 ms |
49488 KB |
Output is correct |
53 |
Correct |
124 ms |
49392 KB |
Output is correct |
54 |
Correct |
106 ms |
48084 KB |
Output is correct |
55 |
Correct |
79 ms |
49488 KB |
Output is correct |
56 |
Correct |
72 ms |
49488 KB |
Output is correct |
57 |
Correct |
19 ms |
46480 KB |
Output is correct |
58 |
Correct |
22 ms |
46852 KB |
Output is correct |
59 |
Correct |
92 ms |
45908 KB |
Output is correct |
60 |
Correct |
82 ms |
49460 KB |
Output is correct |
61 |
Correct |
97 ms |
49408 KB |
Output is correct |
62 |
Correct |
91 ms |
49404 KB |
Output is correct |
63 |
Correct |
84 ms |
47960 KB |
Output is correct |
64 |
Correct |
118 ms |
49492 KB |
Output is correct |
65 |
Correct |
36 ms |
48852 KB |
Output is correct |
66 |
Correct |
80 ms |
49232 KB |
Output is correct |
67 |
Correct |
78 ms |
48976 KB |
Output is correct |
68 |
Correct |
121 ms |
47696 KB |
Output is correct |
69 |
Correct |
140 ms |
48028 KB |
Output is correct |
70 |
Correct |
141 ms |
49556 KB |
Output is correct |
71 |
Correct |
83 ms |
47944 KB |
Output is correct |
72 |
Correct |
90 ms |
49724 KB |
Output is correct |
73 |
Correct |
64 ms |
47856 KB |
Output is correct |
74 |
Correct |
60 ms |
47952 KB |
Output is correct |
75 |
Correct |
63 ms |
48204 KB |
Output is correct |
76 |
Correct |
46 ms |
47700 KB |
Output is correct |
77 |
Correct |
66 ms |
47956 KB |
Output is correct |
78 |
Correct |
89 ms |
48208 KB |
Output is correct |
79 |
Correct |
24 ms |
44756 KB |
Output is correct |
80 |
Correct |
23 ms |
44860 KB |
Output is correct |
81 |
Correct |
47 ms |
47184 KB |
Output is correct |
82 |
Correct |
46 ms |
46928 KB |
Output is correct |
83 |
Correct |
57 ms |
47184 KB |
Output is correct |
84 |
Correct |
64 ms |
47228 KB |
Output is correct |
85 |
Correct |
117 ms |
49496 KB |
Output is correct |
86 |
Correct |
112 ms |
49744 KB |
Output is correct |
87 |
Correct |
64 ms |
47952 KB |
Output is correct |
88 |
Correct |
77 ms |
49744 KB |
Output is correct |
89 |
Correct |
104 ms |
45572 KB |
Output is correct |
90 |
Correct |
77 ms |
49488 KB |
Output is correct |
91 |
Correct |
106 ms |
49232 KB |
Output is correct |
92 |
Correct |
94 ms |
47440 KB |
Output is correct |
93 |
Correct |
105 ms |
49488 KB |
Output is correct |
94 |
Correct |
84 ms |
48088 KB |
Output is correct |
95 |
Correct |
94 ms |
49488 KB |
Output is correct |
96 |
Correct |
86 ms |
49488 KB |
Output is correct |
97 |
Correct |
144 ms |
49440 KB |
Output is correct |
98 |
Correct |
138 ms |
49232 KB |
Output is correct |
99 |
Correct |
36 ms |
46936 KB |
Output is correct |
100 |
Correct |
74 ms |
48976 KB |
Output is correct |
101 |
Correct |
85 ms |
49024 KB |
Output is correct |
102 |
Execution timed out |
1043 ms |
49672 KB |
Time limit exceeded |
103 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
43864 KB |
Output is correct |
2 |
Correct |
10 ms |
43864 KB |
Output is correct |
3 |
Correct |
8 ms |
43864 KB |
Output is correct |
4 |
Correct |
8 ms |
43864 KB |
Output is correct |
5 |
Correct |
7 ms |
43864 KB |
Output is correct |
6 |
Correct |
7 ms |
43864 KB |
Output is correct |
7 |
Correct |
8 ms |
41816 KB |
Output is correct |
8 |
Correct |
9 ms |
43864 KB |
Output is correct |
9 |
Correct |
11 ms |
43864 KB |
Output is correct |
10 |
Correct |
8 ms |
41816 KB |
Output is correct |
11 |
Correct |
8 ms |
41816 KB |
Output is correct |
12 |
Correct |
9 ms |
41816 KB |
Output is correct |
13 |
Correct |
7 ms |
43864 KB |
Output is correct |
14 |
Correct |
8 ms |
43864 KB |
Output is correct |
15 |
Correct |
8 ms |
43864 KB |
Output is correct |
16 |
Correct |
8 ms |
43864 KB |
Output is correct |
17 |
Correct |
8 ms |
41816 KB |
Output is correct |
18 |
Correct |
9 ms |
43864 KB |
Output is correct |
19 |
Correct |
8 ms |
43864 KB |
Output is correct |
20 |
Correct |
8 ms |
41816 KB |
Output is correct |
21 |
Correct |
9 ms |
43864 KB |
Output is correct |
22 |
Correct |
9 ms |
43864 KB |
Output is correct |
23 |
Correct |
8 ms |
43868 KB |
Output is correct |
24 |
Correct |
8 ms |
43864 KB |
Output is correct |
25 |
Correct |
7 ms |
44120 KB |
Output is correct |
26 |
Correct |
7 ms |
43864 KB |
Output is correct |
27 |
Correct |
8 ms |
41816 KB |
Output is correct |
28 |
Correct |
8 ms |
42016 KB |
Output is correct |
29 |
Correct |
9 ms |
41816 KB |
Output is correct |
30 |
Correct |
9 ms |
43864 KB |
Output is correct |
31 |
Correct |
11 ms |
43864 KB |
Output is correct |
32 |
Correct |
12 ms |
43864 KB |
Output is correct |
33 |
Correct |
8 ms |
43864 KB |
Output is correct |
34 |
Correct |
7 ms |
43864 KB |
Output is correct |
35 |
Correct |
9 ms |
41820 KB |
Output is correct |
36 |
Correct |
8 ms |
43864 KB |
Output is correct |
37 |
Correct |
8 ms |
41816 KB |
Output is correct |
38 |
Correct |
10 ms |
41816 KB |
Output is correct |
39 |
Correct |
120 ms |
49140 KB |
Output is correct |
40 |
Correct |
119 ms |
49488 KB |
Output is correct |
41 |
Correct |
122 ms |
49488 KB |
Output is correct |
42 |
Correct |
114 ms |
48976 KB |
Output is correct |
43 |
Correct |
132 ms |
49376 KB |
Output is correct |
44 |
Correct |
132 ms |
49488 KB |
Output is correct |
45 |
Correct |
22 ms |
46672 KB |
Output is correct |
46 |
Correct |
25 ms |
46432 KB |
Output is correct |
47 |
Correct |
120 ms |
47696 KB |
Output is correct |
48 |
Correct |
122 ms |
49188 KB |
Output is correct |
49 |
Correct |
136 ms |
49272 KB |
Output is correct |
50 |
Correct |
125 ms |
49284 KB |
Output is correct |
51 |
Correct |
79 ms |
47608 KB |
Output is correct |
52 |
Correct |
91 ms |
49488 KB |
Output is correct |
53 |
Correct |
124 ms |
49392 KB |
Output is correct |
54 |
Correct |
106 ms |
48084 KB |
Output is correct |
55 |
Correct |
504 ms |
55264 KB |
Output is correct |
56 |
Correct |
501 ms |
54372 KB |
Output is correct |
57 |
Correct |
497 ms |
55708 KB |
Output is correct |
58 |
Correct |
288 ms |
55120 KB |
Output is correct |
59 |
Correct |
310 ms |
54028 KB |
Output is correct |
60 |
Correct |
375 ms |
56664 KB |
Output is correct |
61 |
Correct |
74 ms |
48324 KB |
Output is correct |
62 |
Correct |
77 ms |
46012 KB |
Output is correct |
63 |
Correct |
340 ms |
57232 KB |
Output is correct |
64 |
Correct |
369 ms |
57596 KB |
Output is correct |
65 |
Correct |
517 ms |
55376 KB |
Output is correct |
66 |
Correct |
426 ms |
55584 KB |
Output is correct |
67 |
Correct |
407 ms |
55088 KB |
Output is correct |
68 |
Correct |
547 ms |
55312 KB |
Output is correct |
69 |
Correct |
644 ms |
55408 KB |
Output is correct |
70 |
Correct |
664 ms |
55500 KB |
Output is correct |
71 |
Correct |
645 ms |
55632 KB |
Output is correct |
72 |
Correct |
613 ms |
55476 KB |
Output is correct |
73 |
Correct |
586 ms |
55784 KB |
Output is correct |
74 |
Correct |
594 ms |
55588 KB |
Output is correct |
75 |
Correct |
658 ms |
55688 KB |
Output is correct |
76 |
Correct |
633 ms |
55808 KB |
Output is correct |
77 |
Correct |
499 ms |
55376 KB |
Output is correct |
78 |
Correct |
633 ms |
55212 KB |
Output is correct |
79 |
Correct |
322 ms |
50924 KB |
Output is correct |
80 |
Correct |
320 ms |
53088 KB |
Output is correct |
81 |
Execution timed out |
1044 ms |
54428 KB |
Time limit exceeded |
82 |
Halted |
0 ms |
0 KB |
- |