#include<bits/stdc++.h>
using namespace std;
const int maxn = 2e5+5;
const int inf = 1e9;
#define pii pair<int,int>
#define fi first
#define se second
int N,M,S;
int A[maxn],B[maxn],T[maxn],W[maxn];
int ans[maxn],ok[maxn];
struct BIT{
int bit[2*maxn];
void init(){
for(int i=1;i<=S;i++) bit[i]=0;
}
void update(int x,int val){
for(int i=x;i<=S;i+=(i&(-i))) bit[i]=max(bit[i],val);
}
int query(int x){
int res=0;
for(int i=x;i>=1;i-=(i&(-i))) res=max(res,bit[i]);
return res;
}
}b0,b1;
void solve0(){
map<pair<int,int>,int> mp;
for(int i=0;i<N;i++){
ok[i]=(!i || S+1-b0.query(A[i])<=B[i] || b1.query(S+1-A[i])>=B[i]);
b0.update(A[i],S+1-B[i]);
b1.update(S+1-A[i],B[i]);
}
b0.init();b1.init();
for(int i=N-1;i>=0;i--){
ok[i]&=(i==N-1 || S+1-b0.query(A[i])<=B[i] || b1.query(S+1-A[i])>=B[i]);
b0.update(A[i],S+1-B[i]);
b1.update(S+1-A[i],B[i]);
mp[{A[i],B[i]}]|=ok[i];
}
for(int i=0;i<M;i++) ans[i]=mp[{T[i],W[i]}];
}
struct BIT2{
pii bit[2*maxn];
void init(){
for(int i=1;i<=S;i++) bit[i]={N,N};
}
pii add(pii x,int y){
if(y<x.fi) x.se=x.fi,x.fi=y;
else if(y<x.se) x.se=y;
return x;
};
pii add2(pii x,pii y){
return add(add(x,y.fi),y.se);
};
void update(int x,int val){
for(int i=x;i<=S;i+=(i&(-i))) bit[i]=add(bit[i],val);
}
pii query(int x){
pii res={inf,inf};
for(int i=x;i>=1;i-=(i&(-i))) res=add2(res,bit[i]);
return res;
}
}cc;
vector<int> f[maxn];
vector<pii> solve(bool suffix,bool upper,bool larger){
if(suffix){
reverse(A,A+N);
reverse(B,B+N);
}
if(upper){
for(int i=0;i<N;i++) swap(A[i],B[i]);
for(int i=0;i<M;i++) swap(T[i],W[i]);
}
if(larger){
for(int i=0;i<N;i++) B[i]=S-B[i]+1,A[i]=S-A[i]+1;
for(int i=0;i<M;i++) W[i]=S-W[i]+1,T[i]=S-T[i]+1;
}
vector<pii> res(M);
map<int,int> mp;
for(int i=N-1;i>=0;i--) mp[A[i]]=i;
b0.init();b1.init();
for(int i=0;i<N;i++){
b0.update(S+1-A[i],N-i);
b1.update(B[i],N-i);
}
for(int i=0;i<M;i++) res[i].fi=N-max(b0.query(S+1-T[i]),b1.query(W[i]))+1;
cc.init();
vector<int> pp(N);
vector<int> qq(M);
iota(pp.begin(),pp.end(),0);
iota(qq.begin(),qq.end(),0);
sort(pp.begin(),pp.end(),[&](int x,int y){return A[x]>A[y];});
sort(qq.begin(),qq.end(),[&](int x,int y){return T[x]>T[y];});
int p=0;
for(int id:qq){
while(p<N && A[pp[p]]>=T[id]) cc.update(B[pp[p]],pp[p]),p++;
pii cur=cc.query(W[id]);
res[id].fi=min(N,(res[id].fi<=cur.fi || !cur.fi?cur.fi:cur.se));
res[id].se=res[id].fi+1;
}
for(int i=0;i<=N;i++) f[i].clear();
for(int i=0;i<M;i++) f[res[i].se].push_back(i);
b0.init();b1.init();
for(int i=N-1;i>=0;i--){
b0.update(S+1-A[i],N-i);
b1.update(B[i],N-i);
for(int id:f[i]) res[id].se=N-max(b0.query(S+1-T[id]),b1.query(W[id]));
}
for(int i=0;i<M;i++){
auto it=mp.find(T[i]);
int pos=(it==mp.end()?N:it->se);
if(pos>res[i].fi) res[i].fi=N;
res[i].se=max(res[i].se,pos);
}
/*
cout << suffix << ' ' << upper << ' ' << larger << endl;
for(int i=0;i<N;i++) cout << A[i] << ' ' << B[i] << endl;
for(int i=0;i<M;i++) cout << T[i] << ' ' << W[i] << ' ' << res[i].fi << ' ' << res[i].se << endl;
cout << '\n';
*/
if(larger){
for(int i=0;i<N;i++) B[i]=S-B[i]+1,A[i]=S-A[i]+1;
for(int i=0;i<M;i++) W[i]=S-W[i]+1,T[i]=S-T[i]+1;
}
if(upper){
for(int i=0;i<N;i++) swap(A[i],B[i]);
for(int i=0;i<M;i++) swap(T[i],W[i]);
}
if(suffix){
reverse(A,A+N);
reverse(B,B+N);
}
return res;
}
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);cout.tie(NULL);
cin >> N >> M;S=N+M;
vector<int> cu,cd;
for(int i=0;i<N;i++){
cin >> A[i] >> B[i];
cu.push_back(A[i]);
cd.push_back(B[i]);
}
for(int i=0;i<M;i++){
cin >> T[i] >> W[i];
cu.push_back(T[i]);
cd.push_back(W[i]);
}
sort(cu.begin(),cu.end());
cu.erase(unique(cu.begin(),cu.end()),cu.end());
sort(cd.begin(),cd.end());
cd.erase(unique(cd.begin(),cd.end()),cd.end());
for(int i=0;i<N;i++){
A[i]=lower_bound(cu.begin(),cu.end(),A[i])-cu.begin()+1;
B[i]=lower_bound(cd.begin(),cd.end(),B[i])-cd.begin()+1;
//cout << A[i] << ' ' << B[i] << '\n';
}
for(int i=0;i<M;i++){
T[i]=lower_bound(cu.begin(),cu.end(),T[i])-cu.begin()+1;
W[i]=lower_bound(cd.begin(),cd.end(),W[i])-cd.begin()+1;
//cout << T[i] << ' ' << W[i] << '\n';
}
solve0();
vector<vector<pii>> d(8);
for(int i=0;i<8;i++) d[i]=solve(i>>2,i>>1&1,i&1);
auto check = [&](pii x,pii y){
if(x.fi+y.fi==N-2) return true;
int val=min({x.fi+y.se,x.se+y.fi,x.se+y.se});
return (val<N-1);
};
for(int i=0;i<M;i++){
ans[i]|=check(d[0][i],d[6][i]);
ans[i]|=check(d[1][i],d[7][i]);
ans[i]|=check(d[2][i],d[4][i]);
ans[i]|=check(d[3][i],d[5][i]);
}
for(int i=0;i<M;i++) if(ans[i]) cout << i+1 << ' ';
cout << '\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
5212 KB |
Output is correct |
2 |
Correct |
2 ms |
5212 KB |
Output is correct |
3 |
Correct |
2 ms |
5036 KB |
Output is correct |
4 |
Correct |
3 ms |
5212 KB |
Output is correct |
5 |
Correct |
2 ms |
5212 KB |
Output is correct |
6 |
Correct |
2 ms |
5212 KB |
Output is correct |
7 |
Correct |
2 ms |
5208 KB |
Output is correct |
8 |
Correct |
2 ms |
5136 KB |
Output is correct |
9 |
Correct |
2 ms |
5212 KB |
Output is correct |
10 |
Correct |
2 ms |
5212 KB |
Output is correct |
11 |
Correct |
2 ms |
5212 KB |
Output is correct |
12 |
Correct |
2 ms |
5212 KB |
Output is correct |
13 |
Correct |
2 ms |
5164 KB |
Output is correct |
14 |
Correct |
2 ms |
5212 KB |
Output is correct |
15 |
Correct |
2 ms |
5212 KB |
Output is correct |
16 |
Correct |
2 ms |
5064 KB |
Output is correct |
17 |
Correct |
3 ms |
5212 KB |
Output is correct |
18 |
Correct |
2 ms |
5212 KB |
Output is correct |
19 |
Correct |
2 ms |
5212 KB |
Output is correct |
20 |
Correct |
2 ms |
5212 KB |
Output is correct |
21 |
Correct |
2 ms |
5212 KB |
Output is correct |
22 |
Correct |
2 ms |
4952 KB |
Output is correct |
23 |
Correct |
3 ms |
5212 KB |
Output is correct |
24 |
Correct |
2 ms |
5212 KB |
Output is correct |
25 |
Correct |
3 ms |
5212 KB |
Output is correct |
26 |
Correct |
2 ms |
5212 KB |
Output is correct |
27 |
Correct |
2 ms |
5212 KB |
Output is correct |
28 |
Correct |
3 ms |
5212 KB |
Output is correct |
29 |
Correct |
2 ms |
5212 KB |
Output is correct |
30 |
Correct |
3 ms |
5212 KB |
Output is correct |
31 |
Correct |
2 ms |
5212 KB |
Output is correct |
32 |
Correct |
2 ms |
5212 KB |
Output is correct |
33 |
Correct |
2 ms |
5212 KB |
Output is correct |
34 |
Correct |
2 ms |
5212 KB |
Output is correct |
35 |
Correct |
4 ms |
5296 KB |
Output is correct |
36 |
Correct |
2 ms |
5212 KB |
Output is correct |
37 |
Correct |
2 ms |
5012 KB |
Output is correct |
38 |
Correct |
3 ms |
5212 KB |
Output is correct |
39 |
Correct |
3 ms |
5212 KB |
Output is correct |
40 |
Correct |
2 ms |
5020 KB |
Output is correct |
41 |
Correct |
3 ms |
5212 KB |
Output is correct |
42 |
Correct |
3 ms |
5212 KB |
Output is correct |
43 |
Correct |
3 ms |
5212 KB |
Output is correct |
44 |
Correct |
3 ms |
5212 KB |
Output is correct |
45 |
Correct |
3 ms |
5000 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
5212 KB |
Output is correct |
2 |
Correct |
2 ms |
5212 KB |
Output is correct |
3 |
Correct |
2 ms |
5036 KB |
Output is correct |
4 |
Correct |
3 ms |
5212 KB |
Output is correct |
5 |
Correct |
2 ms |
5212 KB |
Output is correct |
6 |
Correct |
2 ms |
5212 KB |
Output is correct |
7 |
Correct |
2 ms |
5208 KB |
Output is correct |
8 |
Correct |
2 ms |
5136 KB |
Output is correct |
9 |
Correct |
2 ms |
5212 KB |
Output is correct |
10 |
Correct |
2 ms |
5212 KB |
Output is correct |
11 |
Correct |
2 ms |
5212 KB |
Output is correct |
12 |
Correct |
2 ms |
5212 KB |
Output is correct |
13 |
Correct |
2 ms |
5164 KB |
Output is correct |
14 |
Correct |
2 ms |
5212 KB |
Output is correct |
15 |
Correct |
2 ms |
5212 KB |
Output is correct |
16 |
Correct |
2 ms |
5064 KB |
Output is correct |
17 |
Correct |
3 ms |
5212 KB |
Output is correct |
18 |
Correct |
2 ms |
5212 KB |
Output is correct |
19 |
Correct |
2 ms |
5212 KB |
Output is correct |
20 |
Correct |
2 ms |
5212 KB |
Output is correct |
21 |
Correct |
2 ms |
5212 KB |
Output is correct |
22 |
Correct |
2 ms |
4952 KB |
Output is correct |
23 |
Correct |
3 ms |
5212 KB |
Output is correct |
24 |
Correct |
2 ms |
5212 KB |
Output is correct |
25 |
Correct |
3 ms |
5212 KB |
Output is correct |
26 |
Correct |
2 ms |
5212 KB |
Output is correct |
27 |
Correct |
2 ms |
5212 KB |
Output is correct |
28 |
Correct |
3 ms |
5212 KB |
Output is correct |
29 |
Correct |
2 ms |
5212 KB |
Output is correct |
30 |
Correct |
3 ms |
5212 KB |
Output is correct |
31 |
Correct |
2 ms |
5212 KB |
Output is correct |
32 |
Correct |
2 ms |
5212 KB |
Output is correct |
33 |
Correct |
2 ms |
5212 KB |
Output is correct |
34 |
Correct |
2 ms |
5212 KB |
Output is correct |
35 |
Correct |
4 ms |
5296 KB |
Output is correct |
36 |
Correct |
2 ms |
5212 KB |
Output is correct |
37 |
Correct |
2 ms |
5012 KB |
Output is correct |
38 |
Correct |
3 ms |
5212 KB |
Output is correct |
39 |
Correct |
3 ms |
5212 KB |
Output is correct |
40 |
Correct |
2 ms |
5020 KB |
Output is correct |
41 |
Correct |
3 ms |
5212 KB |
Output is correct |
42 |
Correct |
3 ms |
5212 KB |
Output is correct |
43 |
Correct |
3 ms |
5212 KB |
Output is correct |
44 |
Correct |
3 ms |
5212 KB |
Output is correct |
45 |
Correct |
3 ms |
5000 KB |
Output is correct |
46 |
Correct |
7 ms |
5212 KB |
Output is correct |
47 |
Correct |
7 ms |
5456 KB |
Output is correct |
48 |
Correct |
7 ms |
5468 KB |
Output is correct |
49 |
Correct |
6 ms |
5284 KB |
Output is correct |
50 |
Correct |
9 ms |
5440 KB |
Output is correct |
51 |
Correct |
7 ms |
5468 KB |
Output is correct |
52 |
Correct |
7 ms |
5468 KB |
Output is correct |
53 |
Correct |
7 ms |
5532 KB |
Output is correct |
54 |
Correct |
7 ms |
5464 KB |
Output is correct |
55 |
Correct |
5 ms |
5212 KB |
Output is correct |
56 |
Correct |
5 ms |
5212 KB |
Output is correct |
57 |
Correct |
5 ms |
5416 KB |
Output is correct |
58 |
Correct |
7 ms |
5464 KB |
Output is correct |
59 |
Correct |
5 ms |
5468 KB |
Output is correct |
60 |
Correct |
5 ms |
5464 KB |
Output is correct |
61 |
Correct |
4 ms |
5208 KB |
Output is correct |
62 |
Correct |
5 ms |
5312 KB |
Output is correct |
63 |
Correct |
4 ms |
5212 KB |
Output is correct |
64 |
Correct |
4 ms |
5212 KB |
Output is correct |
65 |
Correct |
4 ms |
5212 KB |
Output is correct |
66 |
Correct |
4 ms |
5212 KB |
Output is correct |
67 |
Correct |
5 ms |
5212 KB |
Output is correct |
68 |
Correct |
4 ms |
5212 KB |
Output is correct |
69 |
Correct |
4 ms |
5212 KB |
Output is correct |
70 |
Correct |
4 ms |
5252 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
5212 KB |
Output is correct |
2 |
Correct |
2 ms |
5212 KB |
Output is correct |
3 |
Correct |
2 ms |
5036 KB |
Output is correct |
4 |
Correct |
3 ms |
5212 KB |
Output is correct |
5 |
Correct |
2 ms |
5212 KB |
Output is correct |
6 |
Correct |
2 ms |
5212 KB |
Output is correct |
7 |
Correct |
2 ms |
5208 KB |
Output is correct |
8 |
Correct |
2 ms |
5136 KB |
Output is correct |
9 |
Correct |
2 ms |
5212 KB |
Output is correct |
10 |
Correct |
2 ms |
5212 KB |
Output is correct |
11 |
Correct |
2 ms |
5212 KB |
Output is correct |
12 |
Correct |
2 ms |
5212 KB |
Output is correct |
13 |
Correct |
2 ms |
5164 KB |
Output is correct |
14 |
Correct |
2 ms |
5212 KB |
Output is correct |
15 |
Correct |
2 ms |
5212 KB |
Output is correct |
16 |
Correct |
2 ms |
5064 KB |
Output is correct |
17 |
Correct |
3 ms |
5212 KB |
Output is correct |
18 |
Correct |
2 ms |
5212 KB |
Output is correct |
19 |
Correct |
2 ms |
5212 KB |
Output is correct |
20 |
Correct |
2 ms |
5212 KB |
Output is correct |
21 |
Correct |
2 ms |
5212 KB |
Output is correct |
22 |
Correct |
2 ms |
4952 KB |
Output is correct |
23 |
Correct |
3 ms |
5212 KB |
Output is correct |
24 |
Correct |
2 ms |
5212 KB |
Output is correct |
25 |
Correct |
3 ms |
5212 KB |
Output is correct |
26 |
Correct |
2 ms |
5212 KB |
Output is correct |
27 |
Correct |
2 ms |
5212 KB |
Output is correct |
28 |
Correct |
3 ms |
5212 KB |
Output is correct |
29 |
Correct |
2 ms |
5212 KB |
Output is correct |
30 |
Correct |
3 ms |
5212 KB |
Output is correct |
31 |
Correct |
2 ms |
5212 KB |
Output is correct |
32 |
Correct |
2 ms |
5212 KB |
Output is correct |
33 |
Correct |
2 ms |
5212 KB |
Output is correct |
34 |
Correct |
2 ms |
5212 KB |
Output is correct |
35 |
Correct |
4 ms |
5296 KB |
Output is correct |
36 |
Correct |
2 ms |
5212 KB |
Output is correct |
37 |
Correct |
2 ms |
5012 KB |
Output is correct |
38 |
Correct |
3 ms |
5212 KB |
Output is correct |
39 |
Correct |
3 ms |
5212 KB |
Output is correct |
40 |
Correct |
2 ms |
5020 KB |
Output is correct |
41 |
Correct |
3 ms |
5212 KB |
Output is correct |
42 |
Correct |
3 ms |
5212 KB |
Output is correct |
43 |
Correct |
3 ms |
5212 KB |
Output is correct |
44 |
Correct |
3 ms |
5212 KB |
Output is correct |
45 |
Correct |
3 ms |
5000 KB |
Output is correct |
46 |
Correct |
7 ms |
5212 KB |
Output is correct |
47 |
Correct |
7 ms |
5456 KB |
Output is correct |
48 |
Correct |
7 ms |
5468 KB |
Output is correct |
49 |
Correct |
6 ms |
5284 KB |
Output is correct |
50 |
Correct |
9 ms |
5440 KB |
Output is correct |
51 |
Correct |
7 ms |
5468 KB |
Output is correct |
52 |
Correct |
7 ms |
5468 KB |
Output is correct |
53 |
Correct |
7 ms |
5532 KB |
Output is correct |
54 |
Correct |
7 ms |
5464 KB |
Output is correct |
55 |
Correct |
5 ms |
5212 KB |
Output is correct |
56 |
Correct |
5 ms |
5212 KB |
Output is correct |
57 |
Correct |
5 ms |
5416 KB |
Output is correct |
58 |
Correct |
7 ms |
5464 KB |
Output is correct |
59 |
Correct |
5 ms |
5468 KB |
Output is correct |
60 |
Correct |
5 ms |
5464 KB |
Output is correct |
61 |
Correct |
4 ms |
5208 KB |
Output is correct |
62 |
Correct |
5 ms |
5312 KB |
Output is correct |
63 |
Correct |
4 ms |
5212 KB |
Output is correct |
64 |
Correct |
4 ms |
5212 KB |
Output is correct |
65 |
Correct |
4 ms |
5212 KB |
Output is correct |
66 |
Correct |
4 ms |
5212 KB |
Output is correct |
67 |
Correct |
5 ms |
5212 KB |
Output is correct |
68 |
Correct |
4 ms |
5212 KB |
Output is correct |
69 |
Correct |
4 ms |
5212 KB |
Output is correct |
70 |
Correct |
4 ms |
5252 KB |
Output is correct |
71 |
Correct |
707 ms |
22680 KB |
Output is correct |
72 |
Correct |
746 ms |
23740 KB |
Output is correct |
73 |
Correct |
788 ms |
25020 KB |
Output is correct |
74 |
Correct |
836 ms |
26304 KB |
Output is correct |
75 |
Correct |
923 ms |
27536 KB |
Output is correct |
76 |
Correct |
976 ms |
28600 KB |
Output is correct |
77 |
Correct |
984 ms |
26288 KB |
Output is correct |
78 |
Correct |
1084 ms |
27352 KB |
Output is correct |
79 |
Correct |
1156 ms |
28544 KB |
Output is correct |
80 |
Correct |
403 ms |
21140 KB |
Output is correct |
81 |
Correct |
423 ms |
22208 KB |
Output is correct |
82 |
Correct |
484 ms |
23084 KB |
Output is correct |
83 |
Correct |
1141 ms |
27068 KB |
Output is correct |
84 |
Correct |
463 ms |
27064 KB |
Output is correct |
85 |
Correct |
423 ms |
27068 KB |
Output is correct |
86 |
Correct |
293 ms |
17576 KB |
Output is correct |
87 |
Correct |
220 ms |
14012 KB |
Output is correct |
88 |
Correct |
209 ms |
14104 KB |
Output is correct |
89 |
Correct |
213 ms |
14008 KB |
Output is correct |
90 |
Correct |
214 ms |
14100 KB |
Output is correct |
91 |
Correct |
213 ms |
14008 KB |
Output is correct |
92 |
Correct |
227 ms |
14100 KB |
Output is correct |
93 |
Correct |
221 ms |
14012 KB |
Output is correct |
94 |
Correct |
219 ms |
14152 KB |
Output is correct |
95 |
Correct |
236 ms |
14016 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
5212 KB |
Output is correct |
2 |
Correct |
2 ms |
5212 KB |
Output is correct |
3 |
Correct |
2 ms |
5036 KB |
Output is correct |
4 |
Correct |
3 ms |
5212 KB |
Output is correct |
5 |
Correct |
2 ms |
5212 KB |
Output is correct |
6 |
Correct |
2 ms |
5212 KB |
Output is correct |
7 |
Correct |
2 ms |
5208 KB |
Output is correct |
8 |
Correct |
2 ms |
5136 KB |
Output is correct |
9 |
Correct |
2 ms |
5212 KB |
Output is correct |
10 |
Correct |
2 ms |
5212 KB |
Output is correct |
11 |
Correct |
2 ms |
5212 KB |
Output is correct |
12 |
Correct |
2 ms |
5212 KB |
Output is correct |
13 |
Correct |
2 ms |
5164 KB |
Output is correct |
14 |
Correct |
2 ms |
5212 KB |
Output is correct |
15 |
Correct |
2 ms |
5212 KB |
Output is correct |
16 |
Correct |
2 ms |
5064 KB |
Output is correct |
17 |
Correct |
3 ms |
5212 KB |
Output is correct |
18 |
Correct |
2 ms |
5212 KB |
Output is correct |
19 |
Correct |
2 ms |
5212 KB |
Output is correct |
20 |
Correct |
2 ms |
5212 KB |
Output is correct |
21 |
Correct |
2 ms |
5212 KB |
Output is correct |
22 |
Correct |
2 ms |
4952 KB |
Output is correct |
23 |
Correct |
3 ms |
5212 KB |
Output is correct |
24 |
Correct |
2 ms |
5212 KB |
Output is correct |
25 |
Correct |
3 ms |
5212 KB |
Output is correct |
26 |
Correct |
2 ms |
5212 KB |
Output is correct |
27 |
Correct |
2 ms |
5212 KB |
Output is correct |
28 |
Correct |
3 ms |
5212 KB |
Output is correct |
29 |
Correct |
2 ms |
5212 KB |
Output is correct |
30 |
Correct |
3 ms |
5212 KB |
Output is correct |
31 |
Correct |
2 ms |
5212 KB |
Output is correct |
32 |
Correct |
2 ms |
5212 KB |
Output is correct |
33 |
Correct |
2 ms |
5212 KB |
Output is correct |
34 |
Correct |
2 ms |
5212 KB |
Output is correct |
35 |
Correct |
4 ms |
5296 KB |
Output is correct |
36 |
Correct |
2 ms |
5212 KB |
Output is correct |
37 |
Correct |
2 ms |
5012 KB |
Output is correct |
38 |
Correct |
3 ms |
5212 KB |
Output is correct |
39 |
Correct |
3 ms |
5212 KB |
Output is correct |
40 |
Correct |
2 ms |
5020 KB |
Output is correct |
41 |
Correct |
3 ms |
5212 KB |
Output is correct |
42 |
Correct |
3 ms |
5212 KB |
Output is correct |
43 |
Correct |
3 ms |
5212 KB |
Output is correct |
44 |
Correct |
3 ms |
5212 KB |
Output is correct |
45 |
Correct |
3 ms |
5000 KB |
Output is correct |
46 |
Correct |
7 ms |
5212 KB |
Output is correct |
47 |
Correct |
7 ms |
5456 KB |
Output is correct |
48 |
Correct |
7 ms |
5468 KB |
Output is correct |
49 |
Correct |
6 ms |
5284 KB |
Output is correct |
50 |
Correct |
9 ms |
5440 KB |
Output is correct |
51 |
Correct |
7 ms |
5468 KB |
Output is correct |
52 |
Correct |
7 ms |
5468 KB |
Output is correct |
53 |
Correct |
7 ms |
5532 KB |
Output is correct |
54 |
Correct |
7 ms |
5464 KB |
Output is correct |
55 |
Correct |
5 ms |
5212 KB |
Output is correct |
56 |
Correct |
5 ms |
5212 KB |
Output is correct |
57 |
Correct |
5 ms |
5416 KB |
Output is correct |
58 |
Correct |
7 ms |
5464 KB |
Output is correct |
59 |
Correct |
5 ms |
5468 KB |
Output is correct |
60 |
Correct |
5 ms |
5464 KB |
Output is correct |
61 |
Correct |
4 ms |
5208 KB |
Output is correct |
62 |
Correct |
5 ms |
5312 KB |
Output is correct |
63 |
Correct |
4 ms |
5212 KB |
Output is correct |
64 |
Correct |
4 ms |
5212 KB |
Output is correct |
65 |
Correct |
4 ms |
5212 KB |
Output is correct |
66 |
Correct |
4 ms |
5212 KB |
Output is correct |
67 |
Correct |
5 ms |
5212 KB |
Output is correct |
68 |
Correct |
4 ms |
5212 KB |
Output is correct |
69 |
Correct |
4 ms |
5212 KB |
Output is correct |
70 |
Correct |
4 ms |
5252 KB |
Output is correct |
71 |
Correct |
707 ms |
22680 KB |
Output is correct |
72 |
Correct |
746 ms |
23740 KB |
Output is correct |
73 |
Correct |
788 ms |
25020 KB |
Output is correct |
74 |
Correct |
836 ms |
26304 KB |
Output is correct |
75 |
Correct |
923 ms |
27536 KB |
Output is correct |
76 |
Correct |
976 ms |
28600 KB |
Output is correct |
77 |
Correct |
984 ms |
26288 KB |
Output is correct |
78 |
Correct |
1084 ms |
27352 KB |
Output is correct |
79 |
Correct |
1156 ms |
28544 KB |
Output is correct |
80 |
Correct |
403 ms |
21140 KB |
Output is correct |
81 |
Correct |
423 ms |
22208 KB |
Output is correct |
82 |
Correct |
484 ms |
23084 KB |
Output is correct |
83 |
Correct |
1141 ms |
27068 KB |
Output is correct |
84 |
Correct |
463 ms |
27064 KB |
Output is correct |
85 |
Correct |
423 ms |
27068 KB |
Output is correct |
86 |
Correct |
293 ms |
17576 KB |
Output is correct |
87 |
Correct |
220 ms |
14012 KB |
Output is correct |
88 |
Correct |
209 ms |
14104 KB |
Output is correct |
89 |
Correct |
213 ms |
14008 KB |
Output is correct |
90 |
Correct |
214 ms |
14100 KB |
Output is correct |
91 |
Correct |
213 ms |
14008 KB |
Output is correct |
92 |
Correct |
227 ms |
14100 KB |
Output is correct |
93 |
Correct |
221 ms |
14012 KB |
Output is correct |
94 |
Correct |
219 ms |
14152 KB |
Output is correct |
95 |
Correct |
236 ms |
14016 KB |
Output is correct |
96 |
Correct |
1752 ms |
48176 KB |
Output is correct |
97 |
Correct |
1705 ms |
47688 KB |
Output is correct |
98 |
Correct |
1843 ms |
48804 KB |
Output is correct |
99 |
Correct |
1845 ms |
50096 KB |
Output is correct |
100 |
Correct |
1894 ms |
51376 KB |
Output is correct |
101 |
Correct |
1951 ms |
52396 KB |
Output is correct |
102 |
Correct |
2027 ms |
54696 KB |
Output is correct |
103 |
Correct |
2105 ms |
55240 KB |
Output is correct |
104 |
Correct |
2203 ms |
55472 KB |
Output is correct |
105 |
Correct |
839 ms |
43592 KB |
Output is correct |
106 |
Correct |
900 ms |
44180 KB |
Output is correct |
107 |
Correct |
899 ms |
43972 KB |
Output is correct |
108 |
Correct |
1866 ms |
52652 KB |
Output is correct |
109 |
Correct |
1546 ms |
55108 KB |
Output is correct |
110 |
Correct |
1678 ms |
54848 KB |
Output is correct |
111 |
Correct |
563 ms |
45392 KB |
Output is correct |
112 |
Correct |
832 ms |
44044 KB |
Output is correct |
113 |
Correct |
789 ms |
43272 KB |
Output is correct |
114 |
Correct |
810 ms |
45008 KB |
Output is correct |
115 |
Correct |
804 ms |
43352 KB |
Output is correct |
116 |
Correct |
777 ms |
43384 KB |
Output is correct |
117 |
Correct |
778 ms |
44872 KB |
Output is correct |
118 |
Correct |
819 ms |
44908 KB |
Output is correct |
119 |
Correct |
782 ms |
43412 KB |
Output is correct |
120 |
Correct |
818 ms |
42972 KB |
Output is correct |