#include <bits/stdc++.h>
#ifdef NON_SUBMIT
#define TEST(n) (n)
#define tout cerr
#else
#define TEST(n) ((void)0)
#define tout cin
#endif
using namespace std;
struct Seg
{
long long m, sm, lz, slz;
Seg() : m(0), sm(0x7fffffffffffffffLL), lz(0), slz(-0x7fffffffffffffffLL) {}
Seg &operator =(const Seg &a) {
m=a.m;
sm=a.sm;
return *this;
}
};
const int SZ=1<<18;
const long long MAX=0x7fffffffffffffffLL;
Seg tree[2*SZ];
vector<tuple<int,int,int>> U[250001];
vector<tuple<int,int,long long>> qry;
long long C[2*SZ];
int V[250000];
Seg combine(const Seg &a, const Seg &b)
{
Seg c;
c.m=min(a.m,b.m);
if(c.m<max(a.m,b.m)) c.sm=max(a.m,b.m);
if(c.m<a.sm) c.sm=min(c.sm,a.sm);
if(c.m<b.sm) c.sm=min(c.sm,b.sm);
return c;
}
void lazy_propagation(int bit, int s, int e)
{
if(tree[bit].slz!=-MAX) {
if(s<e) {
if(max(tree[2*bit].slz,tree[2*bit].m)+tree[2*bit].lz==tree[bit].m) tree[2*bit].slz=tree[bit].slz-tree[2*bit].lz;
if(max(tree[2*bit+1].slz,tree[2*bit+1].m)+tree[2*bit+1].lz==tree[bit].m) tree[2*bit+1].slz=tree[bit].slz-tree[2*bit+1].lz;
}
tree[bit].m=tree[bit].slz;
tree[bit].slz=-MAX;
}
tree[bit].m+=tree[bit].lz;
if(tree[bit].sm<MAX) tree[bit].sm+=tree[bit].lz;
if(s<e) {
tree[2*bit].lz+=tree[bit].lz;
tree[2*bit+1].lz+=tree[bit].lz;
}
tree[bit].lz=0;
}
void add_tree(int n1, int n2, int v, int bit=1, int s=0, int e=SZ-1)
{
int m=(s+e)>>1;
lazy_propagation(bit,s,e);
if(n2<n1 || n2<s || e<n1) return;
if(n1<=s && e<=n2) {
tree[bit].lz=v;
C[bit]+=max(v,0);
lazy_propagation(bit,s,e);
return;
}
add_tree(n1,n2,v,2*bit,s,m);
add_tree(n1,n2,v,2*bit+1,m+1,e);
tree[bit]=combine(tree[2*bit],tree[2*bit+1]);
}
void set_tree(int n1, int n2, int bit=1, int s=0, int e=SZ-1)
{
int m=(s+e)>>1;
lazy_propagation(bit,s,e);
if(n2<n1 || n2<s || e<n1 || tree[bit].m>=0) return;
if(n1<=s && e<=n2 && tree[bit].sm>0) {
tree[bit].slz=0;
lazy_propagation(bit,s,e);
return;
}
set_tree(n1,n2,2*bit,s,m);
set_tree(n1,n2,2*bit+1,m+1,e);
tree[bit]=combine(tree[2*bit],tree[2*bit+1]);
}
void update(int n, int c, int k)
{
V[n]=c;
for(C[n+=SZ]+=k;n>>=1;) C[n]=C[2*n]+C[2*n+1];
}
int query(long long k)
{
int bit=1, s=0, e=SZ-1;
while(s<e) {
int m=(s+e)>>1;
if(C[2*bit]<k) {
k-=C[2*bit];
s=m+1;
bit=2*bit+1;
}
else {
e=m;
bit=2*bit;
}
}
return V[s];
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);
TEST(freopen("input.txt","r",stdin));
TEST(freopen("output.txt","w",stdout));
TEST(freopen("debug.txt","w",stderr));
int N, M, Q, j=0;
cin>>N>>M>>Q;
for(int i=1;i<=Q;i++) {
int t, a, c, d;
long long b;
cin>>t>>a>>b; --a;
if(t==1) {
cin>>c>>d;
add_tree(a,--b,d);
U[a].emplace_back(i,c,d);
U[b+1].emplace_back(i,c,-d);
}
else if(t==2) {
cin>>c;
add_tree(a,--b,-c);
set_tree(a,b);
}
else {
long long tot;
int n=1, s=0, e=SZ-1;
while(s<e) {
int m=(s+e)>>1;
lazy_propagation(n,s,e);
if(a<=m) tie(n,e)=make_pair(2*n,m);
else tie(n,s)=make_pair(2*n+1,m+1);
}
lazy_propagation(n,s,e);
if(tree[n].m<b) {
qry.emplace_back(i,a,-1);
continue;
}
for(tot=C[n=SZ+a];n>>=1;) tot+=C[n];
qry.emplace_back(i,a,b+=tot-tree[SZ+a].m);
}
}
sort(qry.begin(),qry.end(),[](const auto &a, const auto &b) {return get<1>(a)<get<1>(b);});
memset(C,0,sizeof(C));
for(auto &[t,p,v]: qry) {
for(;j<=p;j++) for(auto[i,c,k]: U[j]) update(i,c,k);
if(v==-1) {
v=0;
continue;
}
v=query(v);
}
sort(qry.begin(),qry.end());
for(auto &[t,p,v]: qry) cout<<v<<'\n';
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
26700 KB |
Output is correct |
2 |
Correct |
18 ms |
26692 KB |
Output is correct |
3 |
Correct |
17 ms |
26700 KB |
Output is correct |
4 |
Correct |
18 ms |
26744 KB |
Output is correct |
5 |
Correct |
16 ms |
26700 KB |
Output is correct |
6 |
Correct |
17 ms |
26700 KB |
Output is correct |
7 |
Correct |
18 ms |
26716 KB |
Output is correct |
8 |
Correct |
17 ms |
26776 KB |
Output is correct |
9 |
Correct |
19 ms |
26700 KB |
Output is correct |
10 |
Correct |
18 ms |
26744 KB |
Output is correct |
11 |
Correct |
18 ms |
26700 KB |
Output is correct |
12 |
Correct |
18 ms |
26688 KB |
Output is correct |
13 |
Correct |
16 ms |
26732 KB |
Output is correct |
14 |
Correct |
17 ms |
26752 KB |
Output is correct |
15 |
Correct |
16 ms |
26712 KB |
Output is correct |
16 |
Correct |
17 ms |
26700 KB |
Output is correct |
17 |
Correct |
17 ms |
26700 KB |
Output is correct |
18 |
Correct |
19 ms |
26700 KB |
Output is correct |
19 |
Correct |
18 ms |
26700 KB |
Output is correct |
20 |
Correct |
19 ms |
26700 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
26700 KB |
Output is correct |
2 |
Correct |
18 ms |
26692 KB |
Output is correct |
3 |
Correct |
17 ms |
26700 KB |
Output is correct |
4 |
Correct |
18 ms |
26744 KB |
Output is correct |
5 |
Correct |
16 ms |
26700 KB |
Output is correct |
6 |
Correct |
17 ms |
26700 KB |
Output is correct |
7 |
Correct |
18 ms |
26716 KB |
Output is correct |
8 |
Correct |
17 ms |
26776 KB |
Output is correct |
9 |
Correct |
19 ms |
26700 KB |
Output is correct |
10 |
Correct |
18 ms |
26744 KB |
Output is correct |
11 |
Correct |
18 ms |
26700 KB |
Output is correct |
12 |
Correct |
18 ms |
26688 KB |
Output is correct |
13 |
Correct |
16 ms |
26732 KB |
Output is correct |
14 |
Correct |
17 ms |
26752 KB |
Output is correct |
15 |
Correct |
16 ms |
26712 KB |
Output is correct |
16 |
Correct |
17 ms |
26700 KB |
Output is correct |
17 |
Correct |
17 ms |
26700 KB |
Output is correct |
18 |
Correct |
19 ms |
26700 KB |
Output is correct |
19 |
Correct |
18 ms |
26700 KB |
Output is correct |
20 |
Correct |
19 ms |
26700 KB |
Output is correct |
21 |
Correct |
18 ms |
26772 KB |
Output is correct |
22 |
Correct |
20 ms |
26748 KB |
Output is correct |
23 |
Correct |
17 ms |
26700 KB |
Output is correct |
24 |
Correct |
17 ms |
26760 KB |
Output is correct |
25 |
Correct |
16 ms |
26700 KB |
Output is correct |
26 |
Correct |
18 ms |
26700 KB |
Output is correct |
27 |
Correct |
18 ms |
26700 KB |
Output is correct |
28 |
Correct |
18 ms |
26688 KB |
Output is correct |
29 |
Correct |
17 ms |
26700 KB |
Output is correct |
30 |
Correct |
19 ms |
26712 KB |
Output is correct |
31 |
Correct |
18 ms |
26660 KB |
Output is correct |
32 |
Correct |
18 ms |
26700 KB |
Output is correct |
33 |
Correct |
17 ms |
26700 KB |
Output is correct |
34 |
Correct |
17 ms |
26700 KB |
Output is correct |
35 |
Correct |
18 ms |
26668 KB |
Output is correct |
36 |
Correct |
19 ms |
26776 KB |
Output is correct |
37 |
Correct |
17 ms |
26700 KB |
Output is correct |
38 |
Correct |
18 ms |
26704 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
187 ms |
28368 KB |
Output is correct |
2 |
Correct |
197 ms |
28768 KB |
Output is correct |
3 |
Correct |
176 ms |
28280 KB |
Output is correct |
4 |
Correct |
186 ms |
28264 KB |
Output is correct |
5 |
Correct |
203 ms |
28616 KB |
Output is correct |
6 |
Correct |
190 ms |
28736 KB |
Output is correct |
7 |
Correct |
82 ms |
28052 KB |
Output is correct |
8 |
Correct |
81 ms |
27980 KB |
Output is correct |
9 |
Correct |
186 ms |
28464 KB |
Output is correct |
10 |
Correct |
192 ms |
28328 KB |
Output is correct |
11 |
Correct |
181 ms |
28352 KB |
Output is correct |
12 |
Correct |
201 ms |
28408 KB |
Output is correct |
13 |
Correct |
151 ms |
28568 KB |
Output is correct |
14 |
Correct |
171 ms |
28872 KB |
Output is correct |
15 |
Correct |
163 ms |
29248 KB |
Output is correct |
16 |
Correct |
176 ms |
29248 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
850 ms |
32932 KB |
Output is correct |
2 |
Correct |
688 ms |
31560 KB |
Output is correct |
3 |
Correct |
853 ms |
33288 KB |
Output is correct |
4 |
Correct |
572 ms |
32440 KB |
Output is correct |
5 |
Correct |
621 ms |
32264 KB |
Output is correct |
6 |
Correct |
819 ms |
34400 KB |
Output is correct |
7 |
Correct |
247 ms |
31244 KB |
Output is correct |
8 |
Correct |
247 ms |
31216 KB |
Output is correct |
9 |
Correct |
720 ms |
35304 KB |
Output is correct |
10 |
Correct |
726 ms |
35216 KB |
Output is correct |
11 |
Correct |
833 ms |
32616 KB |
Output is correct |
12 |
Correct |
780 ms |
33180 KB |
Output is correct |
13 |
Correct |
771 ms |
32720 KB |
Output is correct |
14 |
Correct |
971 ms |
33212 KB |
Output is correct |
15 |
Correct |
890 ms |
33156 KB |
Output is correct |
16 |
Correct |
884 ms |
39092 KB |
Output is correct |
17 |
Correct |
966 ms |
39076 KB |
Output is correct |
18 |
Correct |
827 ms |
38960 KB |
Output is correct |
19 |
Correct |
838 ms |
39172 KB |
Output is correct |
20 |
Correct |
873 ms |
38972 KB |
Output is correct |
21 |
Correct |
913 ms |
39100 KB |
Output is correct |
22 |
Correct |
885 ms |
39148 KB |
Output is correct |
23 |
Correct |
868 ms |
39092 KB |
Output is correct |
24 |
Correct |
871 ms |
39096 KB |
Output is correct |
25 |
Correct |
515 ms |
38012 KB |
Output is correct |
26 |
Correct |
500 ms |
38276 KB |
Output is correct |
27 |
Correct |
666 ms |
40632 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
26700 KB |
Output is correct |
2 |
Correct |
18 ms |
26692 KB |
Output is correct |
3 |
Correct |
17 ms |
26700 KB |
Output is correct |
4 |
Correct |
18 ms |
26744 KB |
Output is correct |
5 |
Correct |
16 ms |
26700 KB |
Output is correct |
6 |
Correct |
17 ms |
26700 KB |
Output is correct |
7 |
Correct |
18 ms |
26716 KB |
Output is correct |
8 |
Correct |
17 ms |
26776 KB |
Output is correct |
9 |
Correct |
19 ms |
26700 KB |
Output is correct |
10 |
Correct |
18 ms |
26744 KB |
Output is correct |
11 |
Correct |
18 ms |
26700 KB |
Output is correct |
12 |
Correct |
18 ms |
26688 KB |
Output is correct |
13 |
Correct |
16 ms |
26732 KB |
Output is correct |
14 |
Correct |
17 ms |
26752 KB |
Output is correct |
15 |
Correct |
16 ms |
26712 KB |
Output is correct |
16 |
Correct |
17 ms |
26700 KB |
Output is correct |
17 |
Correct |
17 ms |
26700 KB |
Output is correct |
18 |
Correct |
19 ms |
26700 KB |
Output is correct |
19 |
Correct |
18 ms |
26700 KB |
Output is correct |
20 |
Correct |
19 ms |
26700 KB |
Output is correct |
21 |
Correct |
187 ms |
28368 KB |
Output is correct |
22 |
Correct |
197 ms |
28768 KB |
Output is correct |
23 |
Correct |
176 ms |
28280 KB |
Output is correct |
24 |
Correct |
186 ms |
28264 KB |
Output is correct |
25 |
Correct |
203 ms |
28616 KB |
Output is correct |
26 |
Correct |
190 ms |
28736 KB |
Output is correct |
27 |
Correct |
82 ms |
28052 KB |
Output is correct |
28 |
Correct |
81 ms |
27980 KB |
Output is correct |
29 |
Correct |
186 ms |
28464 KB |
Output is correct |
30 |
Correct |
192 ms |
28328 KB |
Output is correct |
31 |
Correct |
181 ms |
28352 KB |
Output is correct |
32 |
Correct |
201 ms |
28408 KB |
Output is correct |
33 |
Correct |
151 ms |
28568 KB |
Output is correct |
34 |
Correct |
171 ms |
28872 KB |
Output is correct |
35 |
Correct |
163 ms |
29248 KB |
Output is correct |
36 |
Correct |
176 ms |
29248 KB |
Output is correct |
37 |
Correct |
140 ms |
28272 KB |
Output is correct |
38 |
Correct |
129 ms |
28280 KB |
Output is correct |
39 |
Correct |
63 ms |
27680 KB |
Output is correct |
40 |
Correct |
71 ms |
28016 KB |
Output is correct |
41 |
Correct |
163 ms |
28272 KB |
Output is correct |
42 |
Correct |
166 ms |
28524 KB |
Output is correct |
43 |
Correct |
196 ms |
28424 KB |
Output is correct |
44 |
Correct |
163 ms |
28260 KB |
Output is correct |
45 |
Correct |
158 ms |
28344 KB |
Output is correct |
46 |
Correct |
189 ms |
28452 KB |
Output is correct |
47 |
Correct |
84 ms |
28148 KB |
Output is correct |
48 |
Correct |
127 ms |
28228 KB |
Output is correct |
49 |
Correct |
148 ms |
27812 KB |
Output is correct |
50 |
Correct |
177 ms |
28104 KB |
Output is correct |
51 |
Correct |
216 ms |
28368 KB |
Output is correct |
52 |
Correct |
204 ms |
28380 KB |
Output is correct |
53 |
Correct |
148 ms |
28808 KB |
Output is correct |
54 |
Correct |
172 ms |
29340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
129 ms |
28732 KB |
Output is correct |
2 |
Correct |
147 ms |
28912 KB |
Output is correct |
3 |
Correct |
150 ms |
29004 KB |
Output is correct |
4 |
Correct |
112 ms |
28408 KB |
Output is correct |
5 |
Correct |
122 ms |
28700 KB |
Output is correct |
6 |
Correct |
168 ms |
29048 KB |
Output is correct |
7 |
Correct |
68 ms |
28276 KB |
Output is correct |
8 |
Correct |
65 ms |
28412 KB |
Output is correct |
9 |
Correct |
92 ms |
28704 KB |
Output is correct |
10 |
Correct |
98 ms |
28196 KB |
Output is correct |
11 |
Correct |
117 ms |
28732 KB |
Output is correct |
12 |
Correct |
127 ms |
28780 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
26700 KB |
Output is correct |
2 |
Correct |
18 ms |
26692 KB |
Output is correct |
3 |
Correct |
17 ms |
26700 KB |
Output is correct |
4 |
Correct |
18 ms |
26744 KB |
Output is correct |
5 |
Correct |
16 ms |
26700 KB |
Output is correct |
6 |
Correct |
17 ms |
26700 KB |
Output is correct |
7 |
Correct |
18 ms |
26716 KB |
Output is correct |
8 |
Correct |
17 ms |
26776 KB |
Output is correct |
9 |
Correct |
19 ms |
26700 KB |
Output is correct |
10 |
Correct |
18 ms |
26744 KB |
Output is correct |
11 |
Correct |
18 ms |
26700 KB |
Output is correct |
12 |
Correct |
18 ms |
26688 KB |
Output is correct |
13 |
Correct |
16 ms |
26732 KB |
Output is correct |
14 |
Correct |
17 ms |
26752 KB |
Output is correct |
15 |
Correct |
16 ms |
26712 KB |
Output is correct |
16 |
Correct |
17 ms |
26700 KB |
Output is correct |
17 |
Correct |
17 ms |
26700 KB |
Output is correct |
18 |
Correct |
19 ms |
26700 KB |
Output is correct |
19 |
Correct |
18 ms |
26700 KB |
Output is correct |
20 |
Correct |
19 ms |
26700 KB |
Output is correct |
21 |
Correct |
18 ms |
26772 KB |
Output is correct |
22 |
Correct |
20 ms |
26748 KB |
Output is correct |
23 |
Correct |
17 ms |
26700 KB |
Output is correct |
24 |
Correct |
17 ms |
26760 KB |
Output is correct |
25 |
Correct |
16 ms |
26700 KB |
Output is correct |
26 |
Correct |
18 ms |
26700 KB |
Output is correct |
27 |
Correct |
18 ms |
26700 KB |
Output is correct |
28 |
Correct |
18 ms |
26688 KB |
Output is correct |
29 |
Correct |
17 ms |
26700 KB |
Output is correct |
30 |
Correct |
19 ms |
26712 KB |
Output is correct |
31 |
Correct |
18 ms |
26660 KB |
Output is correct |
32 |
Correct |
18 ms |
26700 KB |
Output is correct |
33 |
Correct |
17 ms |
26700 KB |
Output is correct |
34 |
Correct |
17 ms |
26700 KB |
Output is correct |
35 |
Correct |
18 ms |
26668 KB |
Output is correct |
36 |
Correct |
19 ms |
26776 KB |
Output is correct |
37 |
Correct |
17 ms |
26700 KB |
Output is correct |
38 |
Correct |
18 ms |
26704 KB |
Output is correct |
39 |
Correct |
187 ms |
28368 KB |
Output is correct |
40 |
Correct |
197 ms |
28768 KB |
Output is correct |
41 |
Correct |
176 ms |
28280 KB |
Output is correct |
42 |
Correct |
186 ms |
28264 KB |
Output is correct |
43 |
Correct |
203 ms |
28616 KB |
Output is correct |
44 |
Correct |
190 ms |
28736 KB |
Output is correct |
45 |
Correct |
82 ms |
28052 KB |
Output is correct |
46 |
Correct |
81 ms |
27980 KB |
Output is correct |
47 |
Correct |
186 ms |
28464 KB |
Output is correct |
48 |
Correct |
192 ms |
28328 KB |
Output is correct |
49 |
Correct |
181 ms |
28352 KB |
Output is correct |
50 |
Correct |
201 ms |
28408 KB |
Output is correct |
51 |
Correct |
151 ms |
28568 KB |
Output is correct |
52 |
Correct |
171 ms |
28872 KB |
Output is correct |
53 |
Correct |
163 ms |
29248 KB |
Output is correct |
54 |
Correct |
176 ms |
29248 KB |
Output is correct |
55 |
Correct |
140 ms |
28272 KB |
Output is correct |
56 |
Correct |
129 ms |
28280 KB |
Output is correct |
57 |
Correct |
63 ms |
27680 KB |
Output is correct |
58 |
Correct |
71 ms |
28016 KB |
Output is correct |
59 |
Correct |
163 ms |
28272 KB |
Output is correct |
60 |
Correct |
166 ms |
28524 KB |
Output is correct |
61 |
Correct |
196 ms |
28424 KB |
Output is correct |
62 |
Correct |
163 ms |
28260 KB |
Output is correct |
63 |
Correct |
158 ms |
28344 KB |
Output is correct |
64 |
Correct |
189 ms |
28452 KB |
Output is correct |
65 |
Correct |
84 ms |
28148 KB |
Output is correct |
66 |
Correct |
127 ms |
28228 KB |
Output is correct |
67 |
Correct |
148 ms |
27812 KB |
Output is correct |
68 |
Correct |
177 ms |
28104 KB |
Output is correct |
69 |
Correct |
216 ms |
28368 KB |
Output is correct |
70 |
Correct |
204 ms |
28380 KB |
Output is correct |
71 |
Correct |
148 ms |
28808 KB |
Output is correct |
72 |
Correct |
172 ms |
29340 KB |
Output is correct |
73 |
Correct |
129 ms |
28732 KB |
Output is correct |
74 |
Correct |
147 ms |
28912 KB |
Output is correct |
75 |
Correct |
150 ms |
29004 KB |
Output is correct |
76 |
Correct |
112 ms |
28408 KB |
Output is correct |
77 |
Correct |
122 ms |
28700 KB |
Output is correct |
78 |
Correct |
168 ms |
29048 KB |
Output is correct |
79 |
Correct |
68 ms |
28276 KB |
Output is correct |
80 |
Correct |
65 ms |
28412 KB |
Output is correct |
81 |
Correct |
92 ms |
28704 KB |
Output is correct |
82 |
Correct |
98 ms |
28196 KB |
Output is correct |
83 |
Correct |
117 ms |
28732 KB |
Output is correct |
84 |
Correct |
127 ms |
28780 KB |
Output is correct |
85 |
Correct |
173 ms |
28172 KB |
Output is correct |
86 |
Correct |
174 ms |
28404 KB |
Output is correct |
87 |
Correct |
147 ms |
28456 KB |
Output is correct |
88 |
Correct |
165 ms |
28644 KB |
Output is correct |
89 |
Correct |
115 ms |
27812 KB |
Output is correct |
90 |
Correct |
163 ms |
28400 KB |
Output is correct |
91 |
Correct |
151 ms |
28104 KB |
Output is correct |
92 |
Correct |
136 ms |
27956 KB |
Output is correct |
93 |
Correct |
177 ms |
28336 KB |
Output is correct |
94 |
Correct |
164 ms |
28376 KB |
Output is correct |
95 |
Correct |
169 ms |
28380 KB |
Output is correct |
96 |
Correct |
170 ms |
28400 KB |
Output is correct |
97 |
Correct |
195 ms |
28484 KB |
Output is correct |
98 |
Correct |
154 ms |
28124 KB |
Output is correct |
99 |
Correct |
87 ms |
27988 KB |
Output is correct |
100 |
Correct |
112 ms |
27968 KB |
Output is correct |
101 |
Correct |
130 ms |
28328 KB |
Output is correct |
102 |
Correct |
149 ms |
28732 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
26700 KB |
Output is correct |
2 |
Correct |
18 ms |
26692 KB |
Output is correct |
3 |
Correct |
17 ms |
26700 KB |
Output is correct |
4 |
Correct |
18 ms |
26744 KB |
Output is correct |
5 |
Correct |
16 ms |
26700 KB |
Output is correct |
6 |
Correct |
17 ms |
26700 KB |
Output is correct |
7 |
Correct |
18 ms |
26716 KB |
Output is correct |
8 |
Correct |
17 ms |
26776 KB |
Output is correct |
9 |
Correct |
19 ms |
26700 KB |
Output is correct |
10 |
Correct |
18 ms |
26744 KB |
Output is correct |
11 |
Correct |
18 ms |
26700 KB |
Output is correct |
12 |
Correct |
18 ms |
26688 KB |
Output is correct |
13 |
Correct |
16 ms |
26732 KB |
Output is correct |
14 |
Correct |
17 ms |
26752 KB |
Output is correct |
15 |
Correct |
16 ms |
26712 KB |
Output is correct |
16 |
Correct |
17 ms |
26700 KB |
Output is correct |
17 |
Correct |
17 ms |
26700 KB |
Output is correct |
18 |
Correct |
19 ms |
26700 KB |
Output is correct |
19 |
Correct |
18 ms |
26700 KB |
Output is correct |
20 |
Correct |
19 ms |
26700 KB |
Output is correct |
21 |
Correct |
18 ms |
26772 KB |
Output is correct |
22 |
Correct |
20 ms |
26748 KB |
Output is correct |
23 |
Correct |
17 ms |
26700 KB |
Output is correct |
24 |
Correct |
17 ms |
26760 KB |
Output is correct |
25 |
Correct |
16 ms |
26700 KB |
Output is correct |
26 |
Correct |
18 ms |
26700 KB |
Output is correct |
27 |
Correct |
18 ms |
26700 KB |
Output is correct |
28 |
Correct |
18 ms |
26688 KB |
Output is correct |
29 |
Correct |
17 ms |
26700 KB |
Output is correct |
30 |
Correct |
19 ms |
26712 KB |
Output is correct |
31 |
Correct |
18 ms |
26660 KB |
Output is correct |
32 |
Correct |
18 ms |
26700 KB |
Output is correct |
33 |
Correct |
17 ms |
26700 KB |
Output is correct |
34 |
Correct |
17 ms |
26700 KB |
Output is correct |
35 |
Correct |
18 ms |
26668 KB |
Output is correct |
36 |
Correct |
19 ms |
26776 KB |
Output is correct |
37 |
Correct |
17 ms |
26700 KB |
Output is correct |
38 |
Correct |
18 ms |
26704 KB |
Output is correct |
39 |
Correct |
187 ms |
28368 KB |
Output is correct |
40 |
Correct |
197 ms |
28768 KB |
Output is correct |
41 |
Correct |
176 ms |
28280 KB |
Output is correct |
42 |
Correct |
186 ms |
28264 KB |
Output is correct |
43 |
Correct |
203 ms |
28616 KB |
Output is correct |
44 |
Correct |
190 ms |
28736 KB |
Output is correct |
45 |
Correct |
82 ms |
28052 KB |
Output is correct |
46 |
Correct |
81 ms |
27980 KB |
Output is correct |
47 |
Correct |
186 ms |
28464 KB |
Output is correct |
48 |
Correct |
192 ms |
28328 KB |
Output is correct |
49 |
Correct |
181 ms |
28352 KB |
Output is correct |
50 |
Correct |
201 ms |
28408 KB |
Output is correct |
51 |
Correct |
151 ms |
28568 KB |
Output is correct |
52 |
Correct |
171 ms |
28872 KB |
Output is correct |
53 |
Correct |
163 ms |
29248 KB |
Output is correct |
54 |
Correct |
176 ms |
29248 KB |
Output is correct |
55 |
Correct |
850 ms |
32932 KB |
Output is correct |
56 |
Correct |
688 ms |
31560 KB |
Output is correct |
57 |
Correct |
853 ms |
33288 KB |
Output is correct |
58 |
Correct |
572 ms |
32440 KB |
Output is correct |
59 |
Correct |
621 ms |
32264 KB |
Output is correct |
60 |
Correct |
819 ms |
34400 KB |
Output is correct |
61 |
Correct |
247 ms |
31244 KB |
Output is correct |
62 |
Correct |
247 ms |
31216 KB |
Output is correct |
63 |
Correct |
720 ms |
35304 KB |
Output is correct |
64 |
Correct |
726 ms |
35216 KB |
Output is correct |
65 |
Correct |
833 ms |
32616 KB |
Output is correct |
66 |
Correct |
780 ms |
33180 KB |
Output is correct |
67 |
Correct |
771 ms |
32720 KB |
Output is correct |
68 |
Correct |
971 ms |
33212 KB |
Output is correct |
69 |
Correct |
890 ms |
33156 KB |
Output is correct |
70 |
Correct |
884 ms |
39092 KB |
Output is correct |
71 |
Correct |
966 ms |
39076 KB |
Output is correct |
72 |
Correct |
827 ms |
38960 KB |
Output is correct |
73 |
Correct |
838 ms |
39172 KB |
Output is correct |
74 |
Correct |
873 ms |
38972 KB |
Output is correct |
75 |
Correct |
913 ms |
39100 KB |
Output is correct |
76 |
Correct |
885 ms |
39148 KB |
Output is correct |
77 |
Correct |
868 ms |
39092 KB |
Output is correct |
78 |
Correct |
871 ms |
39096 KB |
Output is correct |
79 |
Correct |
515 ms |
38012 KB |
Output is correct |
80 |
Correct |
500 ms |
38276 KB |
Output is correct |
81 |
Correct |
666 ms |
40632 KB |
Output is correct |
82 |
Correct |
140 ms |
28272 KB |
Output is correct |
83 |
Correct |
129 ms |
28280 KB |
Output is correct |
84 |
Correct |
63 ms |
27680 KB |
Output is correct |
85 |
Correct |
71 ms |
28016 KB |
Output is correct |
86 |
Correct |
163 ms |
28272 KB |
Output is correct |
87 |
Correct |
166 ms |
28524 KB |
Output is correct |
88 |
Correct |
196 ms |
28424 KB |
Output is correct |
89 |
Correct |
163 ms |
28260 KB |
Output is correct |
90 |
Correct |
158 ms |
28344 KB |
Output is correct |
91 |
Correct |
189 ms |
28452 KB |
Output is correct |
92 |
Correct |
84 ms |
28148 KB |
Output is correct |
93 |
Correct |
127 ms |
28228 KB |
Output is correct |
94 |
Correct |
148 ms |
27812 KB |
Output is correct |
95 |
Correct |
177 ms |
28104 KB |
Output is correct |
96 |
Correct |
216 ms |
28368 KB |
Output is correct |
97 |
Correct |
204 ms |
28380 KB |
Output is correct |
98 |
Correct |
148 ms |
28808 KB |
Output is correct |
99 |
Correct |
172 ms |
29340 KB |
Output is correct |
100 |
Correct |
129 ms |
28732 KB |
Output is correct |
101 |
Correct |
147 ms |
28912 KB |
Output is correct |
102 |
Correct |
150 ms |
29004 KB |
Output is correct |
103 |
Correct |
112 ms |
28408 KB |
Output is correct |
104 |
Correct |
122 ms |
28700 KB |
Output is correct |
105 |
Correct |
168 ms |
29048 KB |
Output is correct |
106 |
Correct |
68 ms |
28276 KB |
Output is correct |
107 |
Correct |
65 ms |
28412 KB |
Output is correct |
108 |
Correct |
92 ms |
28704 KB |
Output is correct |
109 |
Correct |
98 ms |
28196 KB |
Output is correct |
110 |
Correct |
117 ms |
28732 KB |
Output is correct |
111 |
Correct |
127 ms |
28780 KB |
Output is correct |
112 |
Correct |
173 ms |
28172 KB |
Output is correct |
113 |
Correct |
174 ms |
28404 KB |
Output is correct |
114 |
Correct |
147 ms |
28456 KB |
Output is correct |
115 |
Correct |
165 ms |
28644 KB |
Output is correct |
116 |
Correct |
115 ms |
27812 KB |
Output is correct |
117 |
Correct |
163 ms |
28400 KB |
Output is correct |
118 |
Correct |
151 ms |
28104 KB |
Output is correct |
119 |
Correct |
136 ms |
27956 KB |
Output is correct |
120 |
Correct |
177 ms |
28336 KB |
Output is correct |
121 |
Correct |
164 ms |
28376 KB |
Output is correct |
122 |
Correct |
169 ms |
28380 KB |
Output is correct |
123 |
Correct |
170 ms |
28400 KB |
Output is correct |
124 |
Correct |
195 ms |
28484 KB |
Output is correct |
125 |
Correct |
154 ms |
28124 KB |
Output is correct |
126 |
Correct |
87 ms |
27988 KB |
Output is correct |
127 |
Correct |
112 ms |
27968 KB |
Output is correct |
128 |
Correct |
130 ms |
28328 KB |
Output is correct |
129 |
Correct |
149 ms |
28732 KB |
Output is correct |
130 |
Correct |
812 ms |
39752 KB |
Output is correct |
131 |
Correct |
592 ms |
36108 KB |
Output is correct |
132 |
Correct |
921 ms |
39724 KB |
Output is correct |
133 |
Correct |
791 ms |
40792 KB |
Output is correct |
134 |
Correct |
691 ms |
39208 KB |
Output is correct |
135 |
Correct |
857 ms |
41344 KB |
Output is correct |
136 |
Correct |
743 ms |
42376 KB |
Output is correct |
137 |
Correct |
728 ms |
42292 KB |
Output is correct |
138 |
Correct |
805 ms |
39492 KB |
Output is correct |
139 |
Correct |
825 ms |
39904 KB |
Output is correct |
140 |
Correct |
919 ms |
39396 KB |
Output is correct |
141 |
Correct |
842 ms |
39804 KB |
Output is correct |
142 |
Correct |
821 ms |
39760 KB |
Output is correct |
143 |
Correct |
884 ms |
39824 KB |
Output is correct |
144 |
Correct |
832 ms |
39648 KB |
Output is correct |
145 |
Correct |
856 ms |
39812 KB |
Output is correct |
146 |
Correct |
899 ms |
39752 KB |
Output is correct |
147 |
Correct |
968 ms |
39800 KB |
Output is correct |
148 |
Correct |
931 ms |
39824 KB |
Output is correct |
149 |
Correct |
915 ms |
39764 KB |
Output is correct |
150 |
Correct |
320 ms |
37136 KB |
Output is correct |
151 |
Correct |
547 ms |
38832 KB |
Output is correct |
152 |
Correct |
544 ms |
38916 KB |
Output is correct |
153 |
Correct |
662 ms |
41276 KB |
Output is correct |