#define NDEBUG
#ifdef NDEBUG
#define dbg(TXT) (void)0;
#define dbgv(VAR) (void)0;
#define dbgfor if constexpr (false) for
#else
#define _GLIBCXX_DEBUG
#define dbg(TXT) cerr << TXT << "\n";
#define dbgv(VAR) cerr << #VAR << " = " << VAR <<", line "<< __LINE__ << '\n';
#define dbgfor for
#endif
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll,ll>;
#define e0 first
#define e1 second
constexpr ll INFTY = 2e18;
struct segtree
{
vector<ll> toadd;
vector<ll> currfloor;
segtree(ll n)
{
toadd.assign(4*n,0);
currfloor.assign(4*n,0);
}
void add(ll val, ll base, ll baseforced, ll lseg, ll rseg, ll l, ll r, ll node)
{
currfloor[node] = max(currfloor[node],baseforced);
if (rseg<l || r<lseg) return;
if (lseg<=l && r<=rseg)
{
toadd[node]+=val;
currfloor[node] = max(currfloor[node],base);
currfloor[node]+=val;
return;
}
ll mid = (l+r)/2;
add(val, base-toadd[node], currfloor[node]-toadd[node], lseg, rseg, l,mid,node*2);
add(val, base-toadd[node], currfloor[node]-toadd[node], lseg, rseg, mid+1,r,node*2+1);
currfloor[node]=-INFTY;
}
ll get(ll x, ll l, ll r, ll node)
{
if (x<l || r<x) return 0;
if (l==r)
{
return currfloor[node];
}
ll mid = (l+r)/2;
return max(toadd[node]+(get(x, l,mid,node*2)+get(x, mid+1,r,node*2+1)),currfloor[node]);
}
};
struct segtree2
{
vector<ll> rsum;
segtree2(ll n)
{
rsum.assign(4*n,0);
}
void update(ll x, ll val, ll l, ll r, ll node)
{
if (x<l || r<x) return;
if (l==r)
{
assert(l==x);
rsum[node]=val;
return;
}
ll mid = (l+r)/2;
update(x, val, l,mid,node*2);
update(x, val, mid+1,r,node*2+1);
rsum[node]=rsum[node*2]+rsum[node*2+1];
}
ll preflb(ll val, ll l, ll r, ll node)
{
if (rsum[node]<val) return -1;
if (l==r)
{
return l;
}
ll mid = (l+r)/2;
ll lnode = preflb(val, l,mid,node*2);
if (lnode!=-1) return lnode;
return preflb(val-rsum[node*2], mid+1,r,node*2+1);
}
};
int main()
{
ll N,M,Q;
cin >> N >> M >> Q;
segtree stree(N);
segtree totsize(N);
vector<vector<pll>> tofind(N+1,vector<pll>{});
vector<vector<pll>> tostart(N+1,vector<pll>{});
vector<vector<ll>> toend(N+1,vector<ll>{});
vector<ll> q_group(Q,-1);
vector<ll> ans(Q,-1);
for (ll qno = 0; qno < Q; ++qno)
{
ll t;
cin >> t;
if (t==1)
{
ll l,r,k;
cin >> l >> r >> q_group[qno] >> k;
tostart[l].push_back({k,qno});
toend[r].push_back(qno);
totsize.add(k,0,-INFTY,l,r, 1,N,1);
stree.add(k,0,-INFTY,l,r, 1,N,1);
}
else if (t==2)
{
ll l,r,k;
cin >> l >> r >> k;
stree.add(-k,k,-INFTY,l,r, 1,N,1);
}
else
{
assert(t==3);
ll a,b;
cin >> a >> b;
if (b>stree.get(a, 1,N,1))
{
ans[qno]=0;
}
else
{
tofind[a].push_back({totsize.get(a, 1,N,1)-(stree.get(a, 1,N,1)-b),qno});
}
}
}
//vector<ll> currpeeps(Q,0);
segtree2 currpeeps(Q);
for (ll i = 1; i <= N; ++i)
{
for (auto [k ,qno] :tostart[i])
{
//assert(currpeeps[qno]==0);
currpeeps.update(qno, k, 0,Q-1,1);
}
for (auto [numpeeps, qno]:tofind[i])
{
/*ll cs=0;
ll qidx=0;
while (cs<numpeeps)
{
cs+=currpeeps[qidx];
qidx++;
}
qidx--;*/
ll qidx = currpeeps.preflb(numpeeps, 0,Q-1,1);
ans[qno]=q_group[qidx];
}
for (ll qno :toend[i])
{
//assert(currpeeps[qno]!=0);
//currpeeps[qno]=0;
currpeeps.update(qno, 0, 0,Q-1,1);
}
}
for (ll i : ans)
{
if (i!=-1) cout << i << "\n";
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
604 KB |
Output is correct |
2 |
Correct |
3 ms |
860 KB |
Output is correct |
3 |
Correct |
2 ms |
860 KB |
Output is correct |
4 |
Correct |
3 ms |
860 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
3 ms |
860 KB |
Output is correct |
8 |
Correct |
3 ms |
860 KB |
Output is correct |
9 |
Correct |
3 ms |
860 KB |
Output is correct |
10 |
Correct |
3 ms |
860 KB |
Output is correct |
11 |
Correct |
3 ms |
900 KB |
Output is correct |
12 |
Correct |
3 ms |
860 KB |
Output is correct |
13 |
Correct |
2 ms |
860 KB |
Output is correct |
14 |
Correct |
3 ms |
860 KB |
Output is correct |
15 |
Correct |
2 ms |
860 KB |
Output is correct |
16 |
Correct |
2 ms |
860 KB |
Output is correct |
17 |
Correct |
2 ms |
604 KB |
Output is correct |
18 |
Correct |
3 ms |
860 KB |
Output is correct |
19 |
Correct |
3 ms |
860 KB |
Output is correct |
20 |
Correct |
3 ms |
932 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
604 KB |
Output is correct |
2 |
Correct |
3 ms |
860 KB |
Output is correct |
3 |
Correct |
2 ms |
860 KB |
Output is correct |
4 |
Correct |
3 ms |
860 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
3 ms |
860 KB |
Output is correct |
8 |
Correct |
3 ms |
860 KB |
Output is correct |
9 |
Correct |
3 ms |
860 KB |
Output is correct |
10 |
Correct |
3 ms |
860 KB |
Output is correct |
11 |
Correct |
3 ms |
900 KB |
Output is correct |
12 |
Correct |
3 ms |
860 KB |
Output is correct |
13 |
Correct |
2 ms |
860 KB |
Output is correct |
14 |
Correct |
3 ms |
860 KB |
Output is correct |
15 |
Correct |
2 ms |
860 KB |
Output is correct |
16 |
Correct |
2 ms |
860 KB |
Output is correct |
17 |
Correct |
2 ms |
604 KB |
Output is correct |
18 |
Correct |
3 ms |
860 KB |
Output is correct |
19 |
Correct |
3 ms |
860 KB |
Output is correct |
20 |
Correct |
3 ms |
932 KB |
Output is correct |
21 |
Correct |
3 ms |
1112 KB |
Output is correct |
22 |
Correct |
3 ms |
860 KB |
Output is correct |
23 |
Correct |
3 ms |
860 KB |
Output is correct |
24 |
Correct |
3 ms |
1024 KB |
Output is correct |
25 |
Correct |
2 ms |
348 KB |
Output is correct |
26 |
Correct |
2 ms |
592 KB |
Output is correct |
27 |
Correct |
3 ms |
860 KB |
Output is correct |
28 |
Correct |
3 ms |
860 KB |
Output is correct |
29 |
Correct |
3 ms |
856 KB |
Output is correct |
30 |
Correct |
3 ms |
860 KB |
Output is correct |
31 |
Correct |
3 ms |
964 KB |
Output is correct |
32 |
Correct |
3 ms |
860 KB |
Output is correct |
33 |
Correct |
2 ms |
704 KB |
Output is correct |
34 |
Correct |
2 ms |
868 KB |
Output is correct |
35 |
Correct |
4 ms |
860 KB |
Output is correct |
36 |
Correct |
3 ms |
860 KB |
Output is correct |
37 |
Correct |
2 ms |
860 KB |
Output is correct |
38 |
Correct |
4 ms |
860 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
88 ms |
18008 KB |
Output is correct |
2 |
Correct |
101 ms |
18712 KB |
Output is correct |
3 |
Correct |
82 ms |
18004 KB |
Output is correct |
4 |
Correct |
94 ms |
18104 KB |
Output is correct |
5 |
Correct |
101 ms |
18512 KB |
Output is correct |
6 |
Correct |
103 ms |
18700 KB |
Output is correct |
7 |
Correct |
38 ms |
4548 KB |
Output is correct |
8 |
Correct |
40 ms |
4472 KB |
Output is correct |
9 |
Correct |
93 ms |
18256 KB |
Output is correct |
10 |
Correct |
88 ms |
18256 KB |
Output is correct |
11 |
Correct |
100 ms |
18340 KB |
Output is correct |
12 |
Correct |
104 ms |
18328 KB |
Output is correct |
13 |
Correct |
82 ms |
14072 KB |
Output is correct |
14 |
Correct |
91 ms |
18852 KB |
Output is correct |
15 |
Correct |
101 ms |
15184 KB |
Output is correct |
16 |
Correct |
119 ms |
19712 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
460 ms |
64008 KB |
Output is correct |
2 |
Correct |
356 ms |
56144 KB |
Output is correct |
3 |
Correct |
509 ms |
73392 KB |
Output is correct |
4 |
Correct |
442 ms |
67500 KB |
Output is correct |
5 |
Correct |
413 ms |
56016 KB |
Output is correct |
6 |
Correct |
588 ms |
74888 KB |
Output is correct |
7 |
Correct |
187 ms |
20188 KB |
Output is correct |
8 |
Correct |
185 ms |
19944 KB |
Output is correct |
9 |
Correct |
594 ms |
75736 KB |
Output is correct |
10 |
Correct |
575 ms |
75724 KB |
Output is correct |
11 |
Correct |
509 ms |
73300 KB |
Output is correct |
12 |
Correct |
517 ms |
73268 KB |
Output is correct |
13 |
Correct |
506 ms |
73568 KB |
Output is correct |
14 |
Correct |
514 ms |
73160 KB |
Output is correct |
15 |
Correct |
535 ms |
73264 KB |
Output is correct |
16 |
Correct |
532 ms |
73388 KB |
Output is correct |
17 |
Correct |
514 ms |
73300 KB |
Output is correct |
18 |
Correct |
513 ms |
73216 KB |
Output is correct |
19 |
Correct |
515 ms |
73296 KB |
Output is correct |
20 |
Correct |
525 ms |
73156 KB |
Output is correct |
21 |
Correct |
513 ms |
73208 KB |
Output is correct |
22 |
Correct |
519 ms |
73312 KB |
Output is correct |
23 |
Correct |
506 ms |
73252 KB |
Output is correct |
24 |
Correct |
556 ms |
73280 KB |
Output is correct |
25 |
Correct |
385 ms |
59984 KB |
Output is correct |
26 |
Correct |
418 ms |
71764 KB |
Output is correct |
27 |
Correct |
458 ms |
77276 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
604 KB |
Output is correct |
2 |
Correct |
3 ms |
860 KB |
Output is correct |
3 |
Correct |
2 ms |
860 KB |
Output is correct |
4 |
Correct |
3 ms |
860 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
3 ms |
860 KB |
Output is correct |
8 |
Correct |
3 ms |
860 KB |
Output is correct |
9 |
Correct |
3 ms |
860 KB |
Output is correct |
10 |
Correct |
3 ms |
860 KB |
Output is correct |
11 |
Correct |
3 ms |
900 KB |
Output is correct |
12 |
Correct |
3 ms |
860 KB |
Output is correct |
13 |
Correct |
2 ms |
860 KB |
Output is correct |
14 |
Correct |
3 ms |
860 KB |
Output is correct |
15 |
Correct |
2 ms |
860 KB |
Output is correct |
16 |
Correct |
2 ms |
860 KB |
Output is correct |
17 |
Correct |
2 ms |
604 KB |
Output is correct |
18 |
Correct |
3 ms |
860 KB |
Output is correct |
19 |
Correct |
3 ms |
860 KB |
Output is correct |
20 |
Correct |
3 ms |
932 KB |
Output is correct |
21 |
Correct |
88 ms |
18008 KB |
Output is correct |
22 |
Correct |
101 ms |
18712 KB |
Output is correct |
23 |
Correct |
82 ms |
18004 KB |
Output is correct |
24 |
Correct |
94 ms |
18104 KB |
Output is correct |
25 |
Correct |
101 ms |
18512 KB |
Output is correct |
26 |
Correct |
103 ms |
18700 KB |
Output is correct |
27 |
Correct |
38 ms |
4548 KB |
Output is correct |
28 |
Correct |
40 ms |
4472 KB |
Output is correct |
29 |
Correct |
93 ms |
18256 KB |
Output is correct |
30 |
Correct |
88 ms |
18256 KB |
Output is correct |
31 |
Correct |
100 ms |
18340 KB |
Output is correct |
32 |
Correct |
104 ms |
18328 KB |
Output is correct |
33 |
Correct |
82 ms |
14072 KB |
Output is correct |
34 |
Correct |
91 ms |
18852 KB |
Output is correct |
35 |
Correct |
101 ms |
15184 KB |
Output is correct |
36 |
Correct |
119 ms |
19712 KB |
Output is correct |
37 |
Correct |
86 ms |
16848 KB |
Output is correct |
38 |
Correct |
85 ms |
16676 KB |
Output is correct |
39 |
Correct |
32 ms |
4304 KB |
Output is correct |
40 |
Correct |
39 ms |
5132 KB |
Output is correct |
41 |
Correct |
94 ms |
18520 KB |
Output is correct |
42 |
Correct |
99 ms |
18600 KB |
Output is correct |
43 |
Correct |
98 ms |
18448 KB |
Output is correct |
44 |
Correct |
107 ms |
18676 KB |
Output is correct |
45 |
Correct |
101 ms |
18560 KB |
Output is correct |
46 |
Correct |
98 ms |
18516 KB |
Output is correct |
47 |
Correct |
61 ms |
17864 KB |
Output is correct |
48 |
Correct |
85 ms |
18256 KB |
Output is correct |
49 |
Correct |
76 ms |
13008 KB |
Output is correct |
50 |
Correct |
84 ms |
17748 KB |
Output is correct |
51 |
Correct |
98 ms |
18512 KB |
Output is correct |
52 |
Correct |
99 ms |
18516 KB |
Output is correct |
53 |
Correct |
85 ms |
16724 KB |
Output is correct |
54 |
Correct |
117 ms |
19884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
111 ms |
18552 KB |
Output is correct |
2 |
Correct |
124 ms |
17304 KB |
Output is correct |
3 |
Correct |
118 ms |
19536 KB |
Output is correct |
4 |
Correct |
87 ms |
16984 KB |
Output is correct |
5 |
Correct |
98 ms |
18336 KB |
Output is correct |
6 |
Correct |
115 ms |
19540 KB |
Output is correct |
7 |
Correct |
50 ms |
5124 KB |
Output is correct |
8 |
Correct |
48 ms |
5324 KB |
Output is correct |
9 |
Correct |
79 ms |
18724 KB |
Output is correct |
10 |
Correct |
80 ms |
15840 KB |
Output is correct |
11 |
Correct |
116 ms |
18944 KB |
Output is correct |
12 |
Correct |
106 ms |
18888 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
604 KB |
Output is correct |
2 |
Correct |
3 ms |
860 KB |
Output is correct |
3 |
Correct |
2 ms |
860 KB |
Output is correct |
4 |
Correct |
3 ms |
860 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
3 ms |
860 KB |
Output is correct |
8 |
Correct |
3 ms |
860 KB |
Output is correct |
9 |
Correct |
3 ms |
860 KB |
Output is correct |
10 |
Correct |
3 ms |
860 KB |
Output is correct |
11 |
Correct |
3 ms |
900 KB |
Output is correct |
12 |
Correct |
3 ms |
860 KB |
Output is correct |
13 |
Correct |
2 ms |
860 KB |
Output is correct |
14 |
Correct |
3 ms |
860 KB |
Output is correct |
15 |
Correct |
2 ms |
860 KB |
Output is correct |
16 |
Correct |
2 ms |
860 KB |
Output is correct |
17 |
Correct |
2 ms |
604 KB |
Output is correct |
18 |
Correct |
3 ms |
860 KB |
Output is correct |
19 |
Correct |
3 ms |
860 KB |
Output is correct |
20 |
Correct |
3 ms |
932 KB |
Output is correct |
21 |
Correct |
3 ms |
1112 KB |
Output is correct |
22 |
Correct |
3 ms |
860 KB |
Output is correct |
23 |
Correct |
3 ms |
860 KB |
Output is correct |
24 |
Correct |
3 ms |
1024 KB |
Output is correct |
25 |
Correct |
2 ms |
348 KB |
Output is correct |
26 |
Correct |
2 ms |
592 KB |
Output is correct |
27 |
Correct |
3 ms |
860 KB |
Output is correct |
28 |
Correct |
3 ms |
860 KB |
Output is correct |
29 |
Correct |
3 ms |
856 KB |
Output is correct |
30 |
Correct |
3 ms |
860 KB |
Output is correct |
31 |
Correct |
3 ms |
964 KB |
Output is correct |
32 |
Correct |
3 ms |
860 KB |
Output is correct |
33 |
Correct |
2 ms |
704 KB |
Output is correct |
34 |
Correct |
2 ms |
868 KB |
Output is correct |
35 |
Correct |
4 ms |
860 KB |
Output is correct |
36 |
Correct |
3 ms |
860 KB |
Output is correct |
37 |
Correct |
2 ms |
860 KB |
Output is correct |
38 |
Correct |
4 ms |
860 KB |
Output is correct |
39 |
Correct |
88 ms |
18008 KB |
Output is correct |
40 |
Correct |
101 ms |
18712 KB |
Output is correct |
41 |
Correct |
82 ms |
18004 KB |
Output is correct |
42 |
Correct |
94 ms |
18104 KB |
Output is correct |
43 |
Correct |
101 ms |
18512 KB |
Output is correct |
44 |
Correct |
103 ms |
18700 KB |
Output is correct |
45 |
Correct |
38 ms |
4548 KB |
Output is correct |
46 |
Correct |
40 ms |
4472 KB |
Output is correct |
47 |
Correct |
93 ms |
18256 KB |
Output is correct |
48 |
Correct |
88 ms |
18256 KB |
Output is correct |
49 |
Correct |
100 ms |
18340 KB |
Output is correct |
50 |
Correct |
104 ms |
18328 KB |
Output is correct |
51 |
Correct |
82 ms |
14072 KB |
Output is correct |
52 |
Correct |
91 ms |
18852 KB |
Output is correct |
53 |
Correct |
101 ms |
15184 KB |
Output is correct |
54 |
Correct |
119 ms |
19712 KB |
Output is correct |
55 |
Correct |
86 ms |
16848 KB |
Output is correct |
56 |
Correct |
85 ms |
16676 KB |
Output is correct |
57 |
Correct |
32 ms |
4304 KB |
Output is correct |
58 |
Correct |
39 ms |
5132 KB |
Output is correct |
59 |
Correct |
94 ms |
18520 KB |
Output is correct |
60 |
Correct |
99 ms |
18600 KB |
Output is correct |
61 |
Correct |
98 ms |
18448 KB |
Output is correct |
62 |
Correct |
107 ms |
18676 KB |
Output is correct |
63 |
Correct |
101 ms |
18560 KB |
Output is correct |
64 |
Correct |
98 ms |
18516 KB |
Output is correct |
65 |
Correct |
61 ms |
17864 KB |
Output is correct |
66 |
Correct |
85 ms |
18256 KB |
Output is correct |
67 |
Correct |
76 ms |
13008 KB |
Output is correct |
68 |
Correct |
84 ms |
17748 KB |
Output is correct |
69 |
Correct |
98 ms |
18512 KB |
Output is correct |
70 |
Correct |
99 ms |
18516 KB |
Output is correct |
71 |
Correct |
85 ms |
16724 KB |
Output is correct |
72 |
Correct |
117 ms |
19884 KB |
Output is correct |
73 |
Correct |
111 ms |
18552 KB |
Output is correct |
74 |
Correct |
124 ms |
17304 KB |
Output is correct |
75 |
Correct |
118 ms |
19536 KB |
Output is correct |
76 |
Correct |
87 ms |
16984 KB |
Output is correct |
77 |
Correct |
98 ms |
18336 KB |
Output is correct |
78 |
Correct |
115 ms |
19540 KB |
Output is correct |
79 |
Correct |
50 ms |
5124 KB |
Output is correct |
80 |
Correct |
48 ms |
5324 KB |
Output is correct |
81 |
Correct |
79 ms |
18724 KB |
Output is correct |
82 |
Correct |
80 ms |
15840 KB |
Output is correct |
83 |
Correct |
116 ms |
18944 KB |
Output is correct |
84 |
Correct |
106 ms |
18888 KB |
Output is correct |
85 |
Correct |
97 ms |
15512 KB |
Output is correct |
86 |
Correct |
110 ms |
18948 KB |
Output is correct |
87 |
Correct |
101 ms |
17548 KB |
Output is correct |
88 |
Correct |
130 ms |
19160 KB |
Output is correct |
89 |
Correct |
72 ms |
14420 KB |
Output is correct |
90 |
Correct |
114 ms |
18768 KB |
Output is correct |
91 |
Correct |
89 ms |
13748 KB |
Output is correct |
92 |
Correct |
81 ms |
13396 KB |
Output is correct |
93 |
Correct |
117 ms |
18768 KB |
Output is correct |
94 |
Correct |
106 ms |
18772 KB |
Output is correct |
95 |
Correct |
123 ms |
17748 KB |
Output is correct |
96 |
Correct |
114 ms |
18732 KB |
Output is correct |
97 |
Correct |
117 ms |
18664 KB |
Output is correct |
98 |
Correct |
87 ms |
14416 KB |
Output is correct |
99 |
Correct |
72 ms |
18136 KB |
Output is correct |
100 |
Correct |
81 ms |
15640 KB |
Output is correct |
101 |
Correct |
97 ms |
18516 KB |
Output is correct |
102 |
Correct |
112 ms |
19728 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
604 KB |
Output is correct |
2 |
Correct |
3 ms |
860 KB |
Output is correct |
3 |
Correct |
2 ms |
860 KB |
Output is correct |
4 |
Correct |
3 ms |
860 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
3 ms |
860 KB |
Output is correct |
8 |
Correct |
3 ms |
860 KB |
Output is correct |
9 |
Correct |
3 ms |
860 KB |
Output is correct |
10 |
Correct |
3 ms |
860 KB |
Output is correct |
11 |
Correct |
3 ms |
900 KB |
Output is correct |
12 |
Correct |
3 ms |
860 KB |
Output is correct |
13 |
Correct |
2 ms |
860 KB |
Output is correct |
14 |
Correct |
3 ms |
860 KB |
Output is correct |
15 |
Correct |
2 ms |
860 KB |
Output is correct |
16 |
Correct |
2 ms |
860 KB |
Output is correct |
17 |
Correct |
2 ms |
604 KB |
Output is correct |
18 |
Correct |
3 ms |
860 KB |
Output is correct |
19 |
Correct |
3 ms |
860 KB |
Output is correct |
20 |
Correct |
3 ms |
932 KB |
Output is correct |
21 |
Correct |
3 ms |
1112 KB |
Output is correct |
22 |
Correct |
3 ms |
860 KB |
Output is correct |
23 |
Correct |
3 ms |
860 KB |
Output is correct |
24 |
Correct |
3 ms |
1024 KB |
Output is correct |
25 |
Correct |
2 ms |
348 KB |
Output is correct |
26 |
Correct |
2 ms |
592 KB |
Output is correct |
27 |
Correct |
3 ms |
860 KB |
Output is correct |
28 |
Correct |
3 ms |
860 KB |
Output is correct |
29 |
Correct |
3 ms |
856 KB |
Output is correct |
30 |
Correct |
3 ms |
860 KB |
Output is correct |
31 |
Correct |
3 ms |
964 KB |
Output is correct |
32 |
Correct |
3 ms |
860 KB |
Output is correct |
33 |
Correct |
2 ms |
704 KB |
Output is correct |
34 |
Correct |
2 ms |
868 KB |
Output is correct |
35 |
Correct |
4 ms |
860 KB |
Output is correct |
36 |
Correct |
3 ms |
860 KB |
Output is correct |
37 |
Correct |
2 ms |
860 KB |
Output is correct |
38 |
Correct |
4 ms |
860 KB |
Output is correct |
39 |
Correct |
88 ms |
18008 KB |
Output is correct |
40 |
Correct |
101 ms |
18712 KB |
Output is correct |
41 |
Correct |
82 ms |
18004 KB |
Output is correct |
42 |
Correct |
94 ms |
18104 KB |
Output is correct |
43 |
Correct |
101 ms |
18512 KB |
Output is correct |
44 |
Correct |
103 ms |
18700 KB |
Output is correct |
45 |
Correct |
38 ms |
4548 KB |
Output is correct |
46 |
Correct |
40 ms |
4472 KB |
Output is correct |
47 |
Correct |
93 ms |
18256 KB |
Output is correct |
48 |
Correct |
88 ms |
18256 KB |
Output is correct |
49 |
Correct |
100 ms |
18340 KB |
Output is correct |
50 |
Correct |
104 ms |
18328 KB |
Output is correct |
51 |
Correct |
82 ms |
14072 KB |
Output is correct |
52 |
Correct |
91 ms |
18852 KB |
Output is correct |
53 |
Correct |
101 ms |
15184 KB |
Output is correct |
54 |
Correct |
119 ms |
19712 KB |
Output is correct |
55 |
Correct |
460 ms |
64008 KB |
Output is correct |
56 |
Correct |
356 ms |
56144 KB |
Output is correct |
57 |
Correct |
509 ms |
73392 KB |
Output is correct |
58 |
Correct |
442 ms |
67500 KB |
Output is correct |
59 |
Correct |
413 ms |
56016 KB |
Output is correct |
60 |
Correct |
588 ms |
74888 KB |
Output is correct |
61 |
Correct |
187 ms |
20188 KB |
Output is correct |
62 |
Correct |
185 ms |
19944 KB |
Output is correct |
63 |
Correct |
594 ms |
75736 KB |
Output is correct |
64 |
Correct |
575 ms |
75724 KB |
Output is correct |
65 |
Correct |
509 ms |
73300 KB |
Output is correct |
66 |
Correct |
517 ms |
73268 KB |
Output is correct |
67 |
Correct |
506 ms |
73568 KB |
Output is correct |
68 |
Correct |
514 ms |
73160 KB |
Output is correct |
69 |
Correct |
535 ms |
73264 KB |
Output is correct |
70 |
Correct |
532 ms |
73388 KB |
Output is correct |
71 |
Correct |
514 ms |
73300 KB |
Output is correct |
72 |
Correct |
513 ms |
73216 KB |
Output is correct |
73 |
Correct |
515 ms |
73296 KB |
Output is correct |
74 |
Correct |
525 ms |
73156 KB |
Output is correct |
75 |
Correct |
513 ms |
73208 KB |
Output is correct |
76 |
Correct |
519 ms |
73312 KB |
Output is correct |
77 |
Correct |
506 ms |
73252 KB |
Output is correct |
78 |
Correct |
556 ms |
73280 KB |
Output is correct |
79 |
Correct |
385 ms |
59984 KB |
Output is correct |
80 |
Correct |
418 ms |
71764 KB |
Output is correct |
81 |
Correct |
458 ms |
77276 KB |
Output is correct |
82 |
Correct |
86 ms |
16848 KB |
Output is correct |
83 |
Correct |
85 ms |
16676 KB |
Output is correct |
84 |
Correct |
32 ms |
4304 KB |
Output is correct |
85 |
Correct |
39 ms |
5132 KB |
Output is correct |
86 |
Correct |
94 ms |
18520 KB |
Output is correct |
87 |
Correct |
99 ms |
18600 KB |
Output is correct |
88 |
Correct |
98 ms |
18448 KB |
Output is correct |
89 |
Correct |
107 ms |
18676 KB |
Output is correct |
90 |
Correct |
101 ms |
18560 KB |
Output is correct |
91 |
Correct |
98 ms |
18516 KB |
Output is correct |
92 |
Correct |
61 ms |
17864 KB |
Output is correct |
93 |
Correct |
85 ms |
18256 KB |
Output is correct |
94 |
Correct |
76 ms |
13008 KB |
Output is correct |
95 |
Correct |
84 ms |
17748 KB |
Output is correct |
96 |
Correct |
98 ms |
18512 KB |
Output is correct |
97 |
Correct |
99 ms |
18516 KB |
Output is correct |
98 |
Correct |
85 ms |
16724 KB |
Output is correct |
99 |
Correct |
117 ms |
19884 KB |
Output is correct |
100 |
Correct |
111 ms |
18552 KB |
Output is correct |
101 |
Correct |
124 ms |
17304 KB |
Output is correct |
102 |
Correct |
118 ms |
19536 KB |
Output is correct |
103 |
Correct |
87 ms |
16984 KB |
Output is correct |
104 |
Correct |
98 ms |
18336 KB |
Output is correct |
105 |
Correct |
115 ms |
19540 KB |
Output is correct |
106 |
Correct |
50 ms |
5124 KB |
Output is correct |
107 |
Correct |
48 ms |
5324 KB |
Output is correct |
108 |
Correct |
79 ms |
18724 KB |
Output is correct |
109 |
Correct |
80 ms |
15840 KB |
Output is correct |
110 |
Correct |
116 ms |
18944 KB |
Output is correct |
111 |
Correct |
106 ms |
18888 KB |
Output is correct |
112 |
Correct |
97 ms |
15512 KB |
Output is correct |
113 |
Correct |
110 ms |
18948 KB |
Output is correct |
114 |
Correct |
101 ms |
17548 KB |
Output is correct |
115 |
Correct |
130 ms |
19160 KB |
Output is correct |
116 |
Correct |
72 ms |
14420 KB |
Output is correct |
117 |
Correct |
114 ms |
18768 KB |
Output is correct |
118 |
Correct |
89 ms |
13748 KB |
Output is correct |
119 |
Correct |
81 ms |
13396 KB |
Output is correct |
120 |
Correct |
117 ms |
18768 KB |
Output is correct |
121 |
Correct |
106 ms |
18772 KB |
Output is correct |
122 |
Correct |
123 ms |
17748 KB |
Output is correct |
123 |
Correct |
114 ms |
18732 KB |
Output is correct |
124 |
Correct |
117 ms |
18664 KB |
Output is correct |
125 |
Correct |
87 ms |
14416 KB |
Output is correct |
126 |
Correct |
72 ms |
18136 KB |
Output is correct |
127 |
Correct |
81 ms |
15640 KB |
Output is correct |
128 |
Correct |
97 ms |
18516 KB |
Output is correct |
129 |
Correct |
112 ms |
19728 KB |
Output is correct |
130 |
Correct |
551 ms |
72968 KB |
Output is correct |
131 |
Correct |
390 ms |
54916 KB |
Output is correct |
132 |
Correct |
520 ms |
73900 KB |
Output is correct |
133 |
Correct |
567 ms |
72532 KB |
Output is correct |
134 |
Correct |
492 ms |
69968 KB |
Output is correct |
135 |
Correct |
593 ms |
75608 KB |
Output is correct |
136 |
Correct |
615 ms |
76796 KB |
Output is correct |
137 |
Correct |
618 ms |
76948 KB |
Output is correct |
138 |
Correct |
531 ms |
73992 KB |
Output is correct |
139 |
Correct |
519 ms |
73844 KB |
Output is correct |
140 |
Correct |
532 ms |
73928 KB |
Output is correct |
141 |
Correct |
555 ms |
74064 KB |
Output is correct |
142 |
Correct |
529 ms |
73808 KB |
Output is correct |
143 |
Correct |
541 ms |
73976 KB |
Output is correct |
144 |
Correct |
561 ms |
73796 KB |
Output is correct |
145 |
Correct |
535 ms |
73996 KB |
Output is correct |
146 |
Correct |
536 ms |
73792 KB |
Output is correct |
147 |
Correct |
534 ms |
73868 KB |
Output is correct |
148 |
Correct |
547 ms |
74064 KB |
Output is correct |
149 |
Correct |
530 ms |
73732 KB |
Output is correct |
150 |
Correct |
312 ms |
70884 KB |
Output is correct |
151 |
Correct |
409 ms |
72276 KB |
Output is correct |
152 |
Correct |
473 ms |
72272 KB |
Output is correct |
153 |
Correct |
471 ms |
77988 KB |
Output is correct |