#include <bits/stdc++.h>
using namespace std;
#define f first
#define s second
#define pb push_back
#define ar array
#define all(x) x.begin(), x.end()
#define siz(x) (int) x.size()
#define uid(a, b) uniform_int_distribution<int>(a, b)(rng)
#define FOR(i, a, b) for(int i=(a); i<(b); i++)
#define ROF(i, a, b) for(int i=(b-1); i>=(a); i--)
#define F0R(i, n) FOR(i, 0, n)
#define R0F(i, n) ROF(i, 0, n)
#define trav(x, y) for(auto&x:y)
using ll=long long;
using ld=long double;
using pii=pair<int, int>;
using pll=pair<ll, ll>;
using pli=pair<ll, int>;
using vi=vector<int>;
using vl=vector<ll>;
using vpii=vector<pii>;
template<class T> inline bool ckmin(T&a, const T&b) {return b<a?a=b,1:0;}
template<class T> inline bool ckmax(T&a, const T&b) {return b>a?a=b,1:0;}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const char nl='\n';
const int mxN=1<<17;
const int MOD=1e9+7;
const ll infLL=1e18;
const ld eps=1e-6;
int m, n, p[mxN];
vector<ar<int, 3>> v;
vpii v2;
int Find(int u){
return p[u]=(u==p[u]?u:Find(p[u]));
}
void comb(int e1, int e2){
e1=Find(e1); e2=Find(e2);
if(e1!=e2)
p[e2]=e1;
}
struct segment{
int val[2*mxN], mset[2*mxN];
segment() {memset(mset, -1, sizeof mset);}
void set(int L, int R, int v, int i=1, int lo=0, int hi=mxN){
if(lo>=R||L>=hi) return;
if(L<=lo&&hi<=R){
mset[i]=v;
val[i]=v*(hi-lo);
return;
}
push(i, lo, hi);
int m=(lo+hi)/2;
set(L, R, v, i*2, lo, m);
set(L, R, v, i*2+1, m, hi);
val[i]=val[2*i]+val[2*i+1];
}
int query(int L, int R, int i=1, int lo=0, int hi=mxN){
if(lo>=R||L>=hi) return 0;
if(L<=lo&&hi<=R)
return val[i];
push(i, lo, hi);
int m=(lo+hi)/2;
return query(L, R, i*2, lo, m)+query(L, R, i*2+1, m, hi);
}
void push(int i, int lo, int hi){
int m=(lo+hi)/2;
if(mset[i]!=-1){
set(lo, m, mset[i], i*2, lo, m);
set(m, hi, mset[i], i*2+1, m, hi);
mset[i]=-1;
}
}
} st[2];
set<pii> vals;
vi r;
vector<vi> pts;
void se(int l, int r, int t){
if(r>=m){
st[t].set(0, r+1-m, 1);
st[t].set(l, m, 1);
}
else
st[t].set(l, r+1, 1);
}
int qq(int l, int r, int t){
int res=0;
if(r>=m){
res+=st[t].query(0, r+1-m);
res+=st[t].query(l, m);
}
else
res+=st[t].query(l, r+1);
return res;
}
void proc(int v, int t){
se(v2[v].f, v2[v].s, t);
for(auto q:pts[v])
se(v2[q].f, v2[q].s, t^1);
}
int sz(int l, int r){
if(r>=m)
return r+1-m+(m-l);
return r-l+1;
}
int32_t main(){
cin.tie(0)->sync_with_stdio(0);
cin >> m >> n;
pts.resize(n);
F0R(i, n) p[i]=i;
F0R(i, n){
int l, r; cin >> l >> r;
l--; r--;
if(r<l) v.pb({l, r+m, i});
else v.pb({l, r, i}), v.pb({l+m, r+m, i});
if(r>=l)
v2.pb({l, r});
else
v2.pb({l, r+m});
se(v2[i].f, v2[i].s, 0);
}
if(st[0].query(0, m)!=m){
cout << "impossible\n";
return 0;
}
st[0].set(0, m, 0);
sort(all(v), [&](ar<int, 3> A, ar<int, 3> B){
if(A[0]==B[0]) return A[1]>B[1];
return A[0]<B[0];
});
for(auto[x, y, i]:v){
auto it=vals.lower_bound({y, -MOD});
if(i==Find(i)&&it!=vals.end()){
comb(it->s, i);
}
vals.insert({y, i});
}
F0R(i, n){
if(Find(i)!=i)
pts[Find(i)].pb(i);
else
r.pb(i);
}
sort(all(r), [&](int e1, int e2){
return v2[e1]<v2[e2];
});
int R=siz(r);
if(R==1){
proc(r[0], 0);
if(qq(0, m-1, 0)!=m||qq(0, m-1, 1)!=m){
cout << "impossible\n";
}
else{
F0R(i, n){
if(i==r[0]) cout << 1;
else cout << 0;
}
cout << nl;
}
return 0;
}
F0R(i, R){
int lb=r[(i-1+R)%R], mb=r[i], rb=r[(i+1)%R];
proc(lb, 0); proc(mb, 1); proc(rb, 0);
if(qq(v2[mb].f, v2[mb].s, 0)!=sz(v2[mb].f, v2[mb].s)){
cout << "impossible\n";
return 0;
}
st[0].set(0, m, 0);
st[1].set(0, m, 0);
}
if(R&1){
F0R(i, R){
int lb=r[(i-1+R)%R], mb1=r[i], mb2=r[(i+1)%R], rb=r[(i+2)%R];
proc(lb, 0); proc(mb1, 1); proc(mb2, 1); proc(rb, 0);
if(v2[mb1].s>=v2[mb2].f-1&&qq(v2[mb1].f, v2[mb1].s, 0)==sz(v2[mb1].f, v2[mb1].s)&&qq(v2[mb2].f, v2[mb2].s, 0)==sz(v2[mb2].f, v2[mb2].s)){
vi ans(n, -1);
int x=0;
F0R(j, R){
ans[r[j]]=j&1^x;
trav(v, pts[r[j]]) ans[v]=j&1^1^x;
if(j==i)
x=1;
}
F0R(i, n) cout << ans[i];
cout << nl;
return 0;
}
st[0].set(0, m, 0); st[1].set(0, m, 0);
}
cout << "impossible\n";
}
else{
vi ans(n, -1);
F0R(i, R){
ans[r[i]]=i&1;
trav(v, pts[r[i]]) ans[v]=i&1^1;
}
F0R(i, n) cout << ans[i];
cout << nl;
}
}
Compilation message
alternating.cpp: In function 'int32_t main()':
alternating.cpp:185:32: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
185 | ans[r[j]]=j&1^x;
| ~^~
alternating.cpp:186:48: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
186 | trav(v, pts[r[j]]) ans[v]=j&1^1^x;
| ~^~
alternating.cpp:202:40: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
202 | trav(v, pts[r[i]]) ans[v]=i&1^1;
| ~^~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
2380 KB |
Output is correct |
2 |
Correct |
1 ms |
2380 KB |
Output is correct |
3 |
Correct |
2 ms |
2380 KB |
Output is correct |
4 |
Correct |
2 ms |
2380 KB |
Output is correct |
5 |
Correct |
1 ms |
2380 KB |
Output is correct |
6 |
Correct |
1 ms |
2380 KB |
Output is correct |
7 |
Correct |
1 ms |
2380 KB |
Output is correct |
8 |
Correct |
1 ms |
2380 KB |
Output is correct |
9 |
Correct |
2 ms |
2380 KB |
Output is correct |
10 |
Correct |
2 ms |
2380 KB |
Output is correct |
11 |
Correct |
2 ms |
2380 KB |
Output is correct |
12 |
Correct |
1 ms |
2380 KB |
Output is correct |
13 |
Correct |
1 ms |
2380 KB |
Output is correct |
14 |
Correct |
2 ms |
2380 KB |
Output is correct |
15 |
Correct |
2 ms |
2380 KB |
Output is correct |
16 |
Correct |
2 ms |
2380 KB |
Output is correct |
17 |
Correct |
2 ms |
2380 KB |
Output is correct |
18 |
Correct |
2 ms |
2380 KB |
Output is correct |
19 |
Correct |
2 ms |
2380 KB |
Output is correct |
20 |
Correct |
2 ms |
2380 KB |
Output is correct |
21 |
Correct |
1 ms |
2380 KB |
Output is correct |
22 |
Correct |
1 ms |
2380 KB |
Output is correct |
23 |
Correct |
2 ms |
2380 KB |
Output is correct |
24 |
Correct |
2 ms |
2380 KB |
Output is correct |
25 |
Correct |
1 ms |
2380 KB |
Output is correct |
26 |
Correct |
1 ms |
2380 KB |
Output is correct |
27 |
Correct |
1 ms |
2384 KB |
Output is correct |
28 |
Correct |
1 ms |
2380 KB |
Output is correct |
29 |
Correct |
2 ms |
2380 KB |
Output is correct |
30 |
Correct |
2 ms |
2380 KB |
Output is correct |
31 |
Correct |
2 ms |
2380 KB |
Output is correct |
32 |
Correct |
2 ms |
2380 KB |
Output is correct |
33 |
Correct |
2 ms |
2380 KB |
Output is correct |
34 |
Correct |
2 ms |
2380 KB |
Output is correct |
35 |
Correct |
2 ms |
2380 KB |
Output is correct |
36 |
Correct |
1 ms |
2380 KB |
Output is correct |
37 |
Correct |
2 ms |
2380 KB |
Output is correct |
38 |
Correct |
1 ms |
2380 KB |
Output is correct |
39 |
Correct |
1 ms |
2380 KB |
Output is correct |
40 |
Correct |
2 ms |
2380 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
2380 KB |
Output is correct |
2 |
Correct |
1 ms |
2380 KB |
Output is correct |
3 |
Correct |
2 ms |
2380 KB |
Output is correct |
4 |
Correct |
2 ms |
2380 KB |
Output is correct |
5 |
Correct |
1 ms |
2380 KB |
Output is correct |
6 |
Correct |
1 ms |
2380 KB |
Output is correct |
7 |
Correct |
1 ms |
2380 KB |
Output is correct |
8 |
Correct |
1 ms |
2380 KB |
Output is correct |
9 |
Correct |
2 ms |
2380 KB |
Output is correct |
10 |
Correct |
2 ms |
2380 KB |
Output is correct |
11 |
Correct |
2 ms |
2380 KB |
Output is correct |
12 |
Correct |
1 ms |
2380 KB |
Output is correct |
13 |
Correct |
1 ms |
2380 KB |
Output is correct |
14 |
Correct |
2 ms |
2380 KB |
Output is correct |
15 |
Correct |
2 ms |
2380 KB |
Output is correct |
16 |
Correct |
2 ms |
2380 KB |
Output is correct |
17 |
Correct |
2 ms |
2380 KB |
Output is correct |
18 |
Correct |
2 ms |
2380 KB |
Output is correct |
19 |
Correct |
2 ms |
2380 KB |
Output is correct |
20 |
Correct |
2 ms |
2380 KB |
Output is correct |
21 |
Correct |
1 ms |
2380 KB |
Output is correct |
22 |
Correct |
1 ms |
2380 KB |
Output is correct |
23 |
Correct |
2 ms |
2380 KB |
Output is correct |
24 |
Correct |
2 ms |
2380 KB |
Output is correct |
25 |
Correct |
1 ms |
2380 KB |
Output is correct |
26 |
Correct |
1 ms |
2380 KB |
Output is correct |
27 |
Correct |
1 ms |
2384 KB |
Output is correct |
28 |
Correct |
1 ms |
2380 KB |
Output is correct |
29 |
Correct |
2 ms |
2380 KB |
Output is correct |
30 |
Correct |
2 ms |
2380 KB |
Output is correct |
31 |
Correct |
2 ms |
2380 KB |
Output is correct |
32 |
Correct |
2 ms |
2380 KB |
Output is correct |
33 |
Correct |
2 ms |
2380 KB |
Output is correct |
34 |
Correct |
2 ms |
2380 KB |
Output is correct |
35 |
Correct |
2 ms |
2380 KB |
Output is correct |
36 |
Correct |
1 ms |
2380 KB |
Output is correct |
37 |
Correct |
2 ms |
2380 KB |
Output is correct |
38 |
Correct |
1 ms |
2380 KB |
Output is correct |
39 |
Correct |
1 ms |
2380 KB |
Output is correct |
40 |
Correct |
2 ms |
2380 KB |
Output is correct |
41 |
Correct |
2 ms |
2384 KB |
Output is correct |
42 |
Correct |
1 ms |
2380 KB |
Output is correct |
43 |
Correct |
2 ms |
2380 KB |
Output is correct |
44 |
Correct |
2 ms |
2380 KB |
Output is correct |
45 |
Correct |
2 ms |
2380 KB |
Output is correct |
46 |
Correct |
2 ms |
2380 KB |
Output is correct |
47 |
Correct |
2 ms |
2380 KB |
Output is correct |
48 |
Correct |
2 ms |
2380 KB |
Output is correct |
49 |
Correct |
2 ms |
2380 KB |
Output is correct |
50 |
Correct |
2 ms |
2380 KB |
Output is correct |
51 |
Correct |
1 ms |
2380 KB |
Output is correct |
52 |
Correct |
2 ms |
2380 KB |
Output is correct |
53 |
Correct |
2 ms |
2380 KB |
Output is correct |
54 |
Correct |
2 ms |
2380 KB |
Output is correct |
55 |
Correct |
2 ms |
2380 KB |
Output is correct |
56 |
Correct |
2 ms |
2380 KB |
Output is correct |
57 |
Correct |
2 ms |
2380 KB |
Output is correct |
58 |
Correct |
2 ms |
2380 KB |
Output is correct |
59 |
Correct |
2 ms |
2380 KB |
Output is correct |
60 |
Correct |
2 ms |
2380 KB |
Output is correct |
61 |
Correct |
2 ms |
2380 KB |
Output is correct |
62 |
Correct |
2 ms |
2380 KB |
Output is correct |
63 |
Correct |
2 ms |
2380 KB |
Output is correct |
64 |
Correct |
2 ms |
2380 KB |
Output is correct |
65 |
Correct |
1 ms |
2380 KB |
Output is correct |
66 |
Correct |
2 ms |
2380 KB |
Output is correct |
67 |
Correct |
2 ms |
2380 KB |
Output is correct |
68 |
Correct |
2 ms |
2380 KB |
Output is correct |
69 |
Correct |
2 ms |
2380 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
2380 KB |
Output is correct |
2 |
Correct |
1 ms |
2380 KB |
Output is correct |
3 |
Correct |
2 ms |
2380 KB |
Output is correct |
4 |
Correct |
2 ms |
2380 KB |
Output is correct |
5 |
Correct |
1 ms |
2380 KB |
Output is correct |
6 |
Correct |
1 ms |
2380 KB |
Output is correct |
7 |
Correct |
1 ms |
2380 KB |
Output is correct |
8 |
Correct |
1 ms |
2380 KB |
Output is correct |
9 |
Correct |
2 ms |
2380 KB |
Output is correct |
10 |
Correct |
2 ms |
2380 KB |
Output is correct |
11 |
Correct |
2 ms |
2380 KB |
Output is correct |
12 |
Correct |
1 ms |
2380 KB |
Output is correct |
13 |
Correct |
1 ms |
2380 KB |
Output is correct |
14 |
Correct |
2 ms |
2380 KB |
Output is correct |
15 |
Correct |
2 ms |
2380 KB |
Output is correct |
16 |
Correct |
2 ms |
2380 KB |
Output is correct |
17 |
Correct |
2 ms |
2380 KB |
Output is correct |
18 |
Correct |
2 ms |
2380 KB |
Output is correct |
19 |
Correct |
2 ms |
2380 KB |
Output is correct |
20 |
Correct |
2 ms |
2380 KB |
Output is correct |
21 |
Correct |
1 ms |
2380 KB |
Output is correct |
22 |
Correct |
1 ms |
2380 KB |
Output is correct |
23 |
Correct |
2 ms |
2380 KB |
Output is correct |
24 |
Correct |
2 ms |
2380 KB |
Output is correct |
25 |
Correct |
1 ms |
2380 KB |
Output is correct |
26 |
Correct |
1 ms |
2380 KB |
Output is correct |
27 |
Correct |
1 ms |
2384 KB |
Output is correct |
28 |
Correct |
1 ms |
2380 KB |
Output is correct |
29 |
Correct |
2 ms |
2380 KB |
Output is correct |
30 |
Correct |
2 ms |
2380 KB |
Output is correct |
31 |
Correct |
2 ms |
2380 KB |
Output is correct |
32 |
Correct |
2 ms |
2380 KB |
Output is correct |
33 |
Correct |
2 ms |
2380 KB |
Output is correct |
34 |
Correct |
2 ms |
2380 KB |
Output is correct |
35 |
Correct |
2 ms |
2380 KB |
Output is correct |
36 |
Correct |
1 ms |
2380 KB |
Output is correct |
37 |
Correct |
2 ms |
2380 KB |
Output is correct |
38 |
Correct |
1 ms |
2380 KB |
Output is correct |
39 |
Correct |
1 ms |
2380 KB |
Output is correct |
40 |
Correct |
2 ms |
2380 KB |
Output is correct |
41 |
Correct |
2 ms |
2384 KB |
Output is correct |
42 |
Correct |
1 ms |
2380 KB |
Output is correct |
43 |
Correct |
2 ms |
2380 KB |
Output is correct |
44 |
Correct |
2 ms |
2380 KB |
Output is correct |
45 |
Correct |
2 ms |
2380 KB |
Output is correct |
46 |
Correct |
2 ms |
2380 KB |
Output is correct |
47 |
Correct |
2 ms |
2380 KB |
Output is correct |
48 |
Correct |
2 ms |
2380 KB |
Output is correct |
49 |
Correct |
2 ms |
2380 KB |
Output is correct |
50 |
Correct |
2 ms |
2380 KB |
Output is correct |
51 |
Correct |
1 ms |
2380 KB |
Output is correct |
52 |
Correct |
2 ms |
2380 KB |
Output is correct |
53 |
Correct |
2 ms |
2380 KB |
Output is correct |
54 |
Correct |
2 ms |
2380 KB |
Output is correct |
55 |
Correct |
2 ms |
2380 KB |
Output is correct |
56 |
Correct |
2 ms |
2380 KB |
Output is correct |
57 |
Correct |
2 ms |
2380 KB |
Output is correct |
58 |
Correct |
2 ms |
2380 KB |
Output is correct |
59 |
Correct |
2 ms |
2380 KB |
Output is correct |
60 |
Correct |
2 ms |
2380 KB |
Output is correct |
61 |
Correct |
2 ms |
2380 KB |
Output is correct |
62 |
Correct |
2 ms |
2380 KB |
Output is correct |
63 |
Correct |
2 ms |
2380 KB |
Output is correct |
64 |
Correct |
2 ms |
2380 KB |
Output is correct |
65 |
Correct |
1 ms |
2380 KB |
Output is correct |
66 |
Correct |
2 ms |
2380 KB |
Output is correct |
67 |
Correct |
2 ms |
2380 KB |
Output is correct |
68 |
Correct |
2 ms |
2380 KB |
Output is correct |
69 |
Correct |
2 ms |
2380 KB |
Output is correct |
70 |
Correct |
3 ms |
2508 KB |
Output is correct |
71 |
Correct |
5 ms |
2508 KB |
Output is correct |
72 |
Correct |
2 ms |
2428 KB |
Output is correct |
73 |
Correct |
2 ms |
2380 KB |
Output is correct |
74 |
Correct |
2 ms |
2440 KB |
Output is correct |
75 |
Correct |
2 ms |
2380 KB |
Output is correct |
76 |
Correct |
3 ms |
2508 KB |
Output is correct |
77 |
Correct |
3 ms |
2508 KB |
Output is correct |
78 |
Correct |
2 ms |
2380 KB |
Output is correct |
79 |
Correct |
2 ms |
2380 KB |
Output is correct |
80 |
Correct |
3 ms |
2508 KB |
Output is correct |
81 |
Correct |
2 ms |
2508 KB |
Output is correct |
82 |
Correct |
2 ms |
2380 KB |
Output is correct |
83 |
Correct |
3 ms |
2512 KB |
Output is correct |
84 |
Correct |
3 ms |
2636 KB |
Output is correct |
85 |
Correct |
2 ms |
2380 KB |
Output is correct |
86 |
Correct |
2 ms |
2380 KB |
Output is correct |
87 |
Correct |
4 ms |
2568 KB |
Output is correct |
88 |
Correct |
2 ms |
2384 KB |
Output is correct |
89 |
Correct |
3 ms |
2512 KB |
Output is correct |
90 |
Correct |
4 ms |
2604 KB |
Output is correct |
91 |
Correct |
2 ms |
2380 KB |
Output is correct |
92 |
Correct |
4 ms |
2508 KB |
Output is correct |
93 |
Correct |
1 ms |
2384 KB |
Output is correct |
94 |
Correct |
1 ms |
2380 KB |
Output is correct |
95 |
Correct |
2 ms |
2380 KB |
Output is correct |
96 |
Correct |
4 ms |
2636 KB |
Output is correct |
97 |
Correct |
4 ms |
2508 KB |
Output is correct |
98 |
Correct |
4 ms |
2636 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
117 ms |
18628 KB |
Output is correct |
2 |
Correct |
2 ms |
2380 KB |
Output is correct |
3 |
Correct |
92 ms |
12036 KB |
Output is correct |
4 |
Correct |
92 ms |
12036 KB |
Output is correct |
5 |
Correct |
275 ms |
20172 KB |
Output is correct |
6 |
Correct |
171 ms |
19584 KB |
Output is correct |
7 |
Correct |
201 ms |
18908 KB |
Output is correct |
8 |
Correct |
10 ms |
4428 KB |
Output is correct |
9 |
Correct |
5 ms |
4044 KB |
Output is correct |
10 |
Correct |
272 ms |
21012 KB |
Output is correct |
11 |
Correct |
185 ms |
16416 KB |
Output is correct |
12 |
Correct |
168 ms |
18572 KB |
Output is correct |
13 |
Correct |
2 ms |
2508 KB |
Output is correct |
14 |
Correct |
2 ms |
2508 KB |
Output is correct |
15 |
Correct |
226 ms |
20184 KB |
Output is correct |
16 |
Correct |
174 ms |
12080 KB |
Output is correct |
17 |
Correct |
433 ms |
20504 KB |
Output is correct |
18 |
Correct |
414 ms |
18712 KB |
Output is correct |
19 |
Correct |
7 ms |
3660 KB |
Output is correct |
20 |
Correct |
247 ms |
20736 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
2380 KB |
Output is correct |
2 |
Correct |
1 ms |
2380 KB |
Output is correct |
3 |
Correct |
2 ms |
2380 KB |
Output is correct |
4 |
Correct |
2 ms |
2380 KB |
Output is correct |
5 |
Correct |
1 ms |
2380 KB |
Output is correct |
6 |
Correct |
1 ms |
2380 KB |
Output is correct |
7 |
Correct |
1 ms |
2380 KB |
Output is correct |
8 |
Correct |
1 ms |
2380 KB |
Output is correct |
9 |
Correct |
2 ms |
2380 KB |
Output is correct |
10 |
Correct |
2 ms |
2380 KB |
Output is correct |
11 |
Correct |
2 ms |
2380 KB |
Output is correct |
12 |
Correct |
1 ms |
2380 KB |
Output is correct |
13 |
Correct |
1 ms |
2380 KB |
Output is correct |
14 |
Correct |
2 ms |
2380 KB |
Output is correct |
15 |
Correct |
2 ms |
2380 KB |
Output is correct |
16 |
Correct |
2 ms |
2380 KB |
Output is correct |
17 |
Correct |
2 ms |
2380 KB |
Output is correct |
18 |
Correct |
2 ms |
2380 KB |
Output is correct |
19 |
Correct |
2 ms |
2380 KB |
Output is correct |
20 |
Correct |
2 ms |
2380 KB |
Output is correct |
21 |
Correct |
1 ms |
2380 KB |
Output is correct |
22 |
Correct |
1 ms |
2380 KB |
Output is correct |
23 |
Correct |
2 ms |
2380 KB |
Output is correct |
24 |
Correct |
2 ms |
2380 KB |
Output is correct |
25 |
Correct |
1 ms |
2380 KB |
Output is correct |
26 |
Correct |
1 ms |
2380 KB |
Output is correct |
27 |
Correct |
1 ms |
2384 KB |
Output is correct |
28 |
Correct |
1 ms |
2380 KB |
Output is correct |
29 |
Correct |
2 ms |
2380 KB |
Output is correct |
30 |
Correct |
2 ms |
2380 KB |
Output is correct |
31 |
Correct |
2 ms |
2380 KB |
Output is correct |
32 |
Correct |
2 ms |
2380 KB |
Output is correct |
33 |
Correct |
2 ms |
2380 KB |
Output is correct |
34 |
Correct |
2 ms |
2380 KB |
Output is correct |
35 |
Correct |
2 ms |
2380 KB |
Output is correct |
36 |
Correct |
1 ms |
2380 KB |
Output is correct |
37 |
Correct |
2 ms |
2380 KB |
Output is correct |
38 |
Correct |
1 ms |
2380 KB |
Output is correct |
39 |
Correct |
1 ms |
2380 KB |
Output is correct |
40 |
Correct |
2 ms |
2380 KB |
Output is correct |
41 |
Correct |
2 ms |
2384 KB |
Output is correct |
42 |
Correct |
1 ms |
2380 KB |
Output is correct |
43 |
Correct |
2 ms |
2380 KB |
Output is correct |
44 |
Correct |
2 ms |
2380 KB |
Output is correct |
45 |
Correct |
2 ms |
2380 KB |
Output is correct |
46 |
Correct |
2 ms |
2380 KB |
Output is correct |
47 |
Correct |
2 ms |
2380 KB |
Output is correct |
48 |
Correct |
2 ms |
2380 KB |
Output is correct |
49 |
Correct |
2 ms |
2380 KB |
Output is correct |
50 |
Correct |
2 ms |
2380 KB |
Output is correct |
51 |
Correct |
1 ms |
2380 KB |
Output is correct |
52 |
Correct |
2 ms |
2380 KB |
Output is correct |
53 |
Correct |
2 ms |
2380 KB |
Output is correct |
54 |
Correct |
2 ms |
2380 KB |
Output is correct |
55 |
Correct |
2 ms |
2380 KB |
Output is correct |
56 |
Correct |
2 ms |
2380 KB |
Output is correct |
57 |
Correct |
2 ms |
2380 KB |
Output is correct |
58 |
Correct |
2 ms |
2380 KB |
Output is correct |
59 |
Correct |
2 ms |
2380 KB |
Output is correct |
60 |
Correct |
2 ms |
2380 KB |
Output is correct |
61 |
Correct |
2 ms |
2380 KB |
Output is correct |
62 |
Correct |
2 ms |
2380 KB |
Output is correct |
63 |
Correct |
2 ms |
2380 KB |
Output is correct |
64 |
Correct |
2 ms |
2380 KB |
Output is correct |
65 |
Correct |
1 ms |
2380 KB |
Output is correct |
66 |
Correct |
2 ms |
2380 KB |
Output is correct |
67 |
Correct |
2 ms |
2380 KB |
Output is correct |
68 |
Correct |
2 ms |
2380 KB |
Output is correct |
69 |
Correct |
2 ms |
2380 KB |
Output is correct |
70 |
Correct |
3 ms |
2508 KB |
Output is correct |
71 |
Correct |
5 ms |
2508 KB |
Output is correct |
72 |
Correct |
2 ms |
2428 KB |
Output is correct |
73 |
Correct |
2 ms |
2380 KB |
Output is correct |
74 |
Correct |
2 ms |
2440 KB |
Output is correct |
75 |
Correct |
2 ms |
2380 KB |
Output is correct |
76 |
Correct |
3 ms |
2508 KB |
Output is correct |
77 |
Correct |
3 ms |
2508 KB |
Output is correct |
78 |
Correct |
2 ms |
2380 KB |
Output is correct |
79 |
Correct |
2 ms |
2380 KB |
Output is correct |
80 |
Correct |
3 ms |
2508 KB |
Output is correct |
81 |
Correct |
2 ms |
2508 KB |
Output is correct |
82 |
Correct |
2 ms |
2380 KB |
Output is correct |
83 |
Correct |
3 ms |
2512 KB |
Output is correct |
84 |
Correct |
3 ms |
2636 KB |
Output is correct |
85 |
Correct |
2 ms |
2380 KB |
Output is correct |
86 |
Correct |
2 ms |
2380 KB |
Output is correct |
87 |
Correct |
4 ms |
2568 KB |
Output is correct |
88 |
Correct |
2 ms |
2384 KB |
Output is correct |
89 |
Correct |
3 ms |
2512 KB |
Output is correct |
90 |
Correct |
4 ms |
2604 KB |
Output is correct |
91 |
Correct |
2 ms |
2380 KB |
Output is correct |
92 |
Correct |
4 ms |
2508 KB |
Output is correct |
93 |
Correct |
1 ms |
2384 KB |
Output is correct |
94 |
Correct |
1 ms |
2380 KB |
Output is correct |
95 |
Correct |
2 ms |
2380 KB |
Output is correct |
96 |
Correct |
4 ms |
2636 KB |
Output is correct |
97 |
Correct |
4 ms |
2508 KB |
Output is correct |
98 |
Correct |
4 ms |
2636 KB |
Output is correct |
99 |
Correct |
117 ms |
18628 KB |
Output is correct |
100 |
Correct |
2 ms |
2380 KB |
Output is correct |
101 |
Correct |
92 ms |
12036 KB |
Output is correct |
102 |
Correct |
92 ms |
12036 KB |
Output is correct |
103 |
Correct |
275 ms |
20172 KB |
Output is correct |
104 |
Correct |
171 ms |
19584 KB |
Output is correct |
105 |
Correct |
201 ms |
18908 KB |
Output is correct |
106 |
Correct |
10 ms |
4428 KB |
Output is correct |
107 |
Correct |
5 ms |
4044 KB |
Output is correct |
108 |
Correct |
272 ms |
21012 KB |
Output is correct |
109 |
Correct |
185 ms |
16416 KB |
Output is correct |
110 |
Correct |
168 ms |
18572 KB |
Output is correct |
111 |
Correct |
2 ms |
2508 KB |
Output is correct |
112 |
Correct |
2 ms |
2508 KB |
Output is correct |
113 |
Correct |
226 ms |
20184 KB |
Output is correct |
114 |
Correct |
174 ms |
12080 KB |
Output is correct |
115 |
Correct |
433 ms |
20504 KB |
Output is correct |
116 |
Correct |
414 ms |
18712 KB |
Output is correct |
117 |
Correct |
7 ms |
3660 KB |
Output is correct |
118 |
Correct |
247 ms |
20736 KB |
Output is correct |
119 |
Correct |
2 ms |
3276 KB |
Output is correct |
120 |
Correct |
296 ms |
15788 KB |
Output is correct |
121 |
Correct |
153 ms |
11352 KB |
Output is correct |
122 |
Correct |
1 ms |
2380 KB |
Output is correct |
123 |
Correct |
10 ms |
4168 KB |
Output is correct |
124 |
Correct |
62 ms |
9340 KB |
Output is correct |
125 |
Correct |
78 ms |
8644 KB |
Output is correct |
126 |
Correct |
3 ms |
3788 KB |
Output is correct |
127 |
Correct |
22 ms |
5324 KB |
Output is correct |
128 |
Correct |
214 ms |
17332 KB |
Output is correct |
129 |
Correct |
115 ms |
11808 KB |
Output is correct |
130 |
Correct |
150 ms |
13596 KB |
Output is correct |
131 |
Correct |
2 ms |
3148 KB |
Output is correct |
132 |
Correct |
3 ms |
3404 KB |
Output is correct |
133 |
Correct |
357 ms |
17300 KB |
Output is correct |
134 |
Correct |
107 ms |
7680 KB |
Output is correct |
135 |
Correct |
2 ms |
2892 KB |
Output is correct |
136 |
Correct |
103 ms |
12688 KB |
Output is correct |
137 |
Correct |
175 ms |
16492 KB |
Output is correct |
138 |
Correct |
5 ms |
4172 KB |
Output is correct |