#include<bits/stdc++.h>
using namespace std;
#define int long long
struct sommet {
int x,y,ordreParc;
bool operator < (const sommet& autre) const {
if (x!=autre.x) {
return (x<autre.x);
}
return (y<autre.y);
}
};
const int INFINI=1000*1000*1000+6,TAILLE_MAX=200*1000+5,COORD_MAX=1000+5;
int nbPoints,maxX,nbImpair;
pair<int,int> initPoint[TAILLE_MAX];
pair<int,int> points[TAILLE_MAX];
int cumu[COORD_MAX][COORD_MAX];
int emboite[TAILLE_MAX];
set<pair<int,int>> enCours[2];
void fusion(int deb,int fin,int pari) {
set<pair<int,int>>::iterator it;
enCours[pari].insert({deb,fin});
nbImpair+=(fin-deb)%2;
it=enCours[pari].lower_bound({fin,-INFINI});
int nouvDeb,nouvFin;
if ((*it).first==fin) {
nbImpair-=((*it).second-(*it).first)%2;
nbImpair-=(fin-deb)%2;
nouvFin=(*it).second;
enCours[pari].erase(it);
it=enCours[pari].lower_bound({deb,fin});
enCours[pari].erase(it);
fin=nouvFin;
enCours[pari].insert({deb,fin});
nbImpair+=(fin-deb)%2;
}
it=enCours[pari].lower_bound({deb,fin});
it--;
if ((*it).second==deb) {
nbImpair-=((*it).second-(*it).first)%2;
nbImpair-=(fin-deb)%2;
nouvDeb=(*it).first;
enCours[pari].erase(it);
it=enCours[pari].lower_bound({deb,fin});
enCours[pari].erase(it);
deb=nouvDeb;
enCours[pari].insert({deb,fin});
nbImpair+=(fin-deb)%2;
}
}
void suppr(int deb,int fin,int pari) {
set<pair<int,int>>::iterator it=enCours[pari].lower_bound({deb,fin});
if ((*it).first==deb) {
if ((*it).second==fin) {
nbImpair-=(fin-deb)%2;
enCours[pari].erase(it);
}
else {
nbImpair-=((*it).second-deb)%2;
deb=fin;
fin=(*it).second;
enCours[pari].erase(it);
nbImpair+=(fin-deb)%2;
enCours[pari].insert({deb,fin});
}
}
else {
it--;
if ((*it).second==fin) {
nbImpair-=(fin-(*it).first)%2;
fin=deb;
deb=(*it).first;
enCours[pari].erase(it);
nbImpair+=(fin-deb)%2;
enCours[pari].insert({deb,fin});
}
else {
int premDeb=(*it).first,dernFin=(*it).second;
nbImpair-=(dernFin-premDeb)%2;
enCours[pari].erase(it);
enCours[pari].insert({premDeb,deb});
enCours[pari].insert({fin,dernFin});
nbImpair+=(deb-premDeb)%2;
nbImpair+=(dernFin-fin)%2;
}
}
}
bool intersecte(int deb,int fin,int pari) {
set<pair<int,int>>::iterator it=enCours[pari].lower_bound({fin,-INFINI});
it--;
if ((*it).second>deb) {
return true;
}
return false;
}
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
cin>>nbPoints>>maxX;
int xNouv,yNouv,posMin=0,xMin=INFINI,yMin=INFINI,maxY=0,somX=0;
for (int i=0;i<nbPoints;i++) {
cin>>xNouv>>yNouv;
if (xNouv<xMin or (xNouv==xMin and yNouv<yMin)) {
posMin=i;
xMin=xNouv;
yMin=yNouv;
}
maxY=max(maxY,yNouv);
somX+=xNouv%2;
initPoint[i]={xNouv,yNouv};
}
int posCour,direc=-1,nbPris=1;
points[0]={xMin,yMin};
for (int i=1;i<=nbPoints;i++) {
posCour=(posMin+i)%nbPoints;
if (points[nbPris-1].first==initPoint[posCour].first) {
if (direc==0) {
points[nbPris-1].second=initPoint[posCour].second;
}
else {
direc=0;
points[nbPris]=initPoint[posCour];
nbPris++;
}
}
else {
if (direc==1) {
points[nbPris-1].first=initPoint[posCour].first;
}
else {
direc=1;
points[nbPris]=initPoint[posCour];
nbPris++;
}
}
}
nbPoints=nbPris;
if (direc==0) {
for (int i=0;i<nbPoints/2;i++) {
swap(points[i],points[nbPoints-1-i]);
}
}
int rep=0;
vector<sommet> somTri;
for (int i=0;i<nbPoints-1;i++) {
somTri.push_back({points[i].first,points[i].second,i});
}
somTri.push_back({INFINI,INFINI,nbPoints});
sort(somTri.begin(),somTri.end());
for (int i=0;i<2;i++) {
enCours[i].insert({-INFINI,-42});
enCours[i].insert({INFINI,42});
}
for (int i=0;i<nbPoints-1;i+=2) {
if ((int)enCours[0].size()==2 and (i==0 or somTri[i].x!=somTri[i-2].x)) {
if (somTri[i].x%2==0) {
rep=max(rep,somTri[i].x-1);
}
else {
rep=max(rep,somTri[i].x);
}
}
if ((int)enCours[1].size()==2 and (i==0 or somTri[i].x!=somTri[i-2].x)) {
if (somTri[i].x%2==0) {
rep=max(rep,somTri[i].x);
}
else {
rep=max(rep,somTri[i].x-1);
}
}
if (somTri[i].ordreParc<somTri[i+1].ordreParc) {
fusion(somTri[i].y,somTri[i+1].y,somTri[i].x%2);
}
else {
if (intersecte(somTri[i].y,somTri[i+1].y,1-somTri[i].x%2)) {
cout<<rep<<endl;
return 0;
}
suppr(somTri[i].y,somTri[i+1].y,somTri[i].x%2);
}
if (somTri[i].x!=somTri[i+2].x and nbImpair>0) {
cout<<rep<<endl;
return 0;
}
}
cout<<maxX<<endl;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
460 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
460 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
1 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
344 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
1 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
604 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
1 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
9 ms |
3796 KB |
Output is correct |
3 |
Correct |
51 ms |
16324 KB |
Output is correct |
4 |
Correct |
24 ms |
8656 KB |
Output is correct |
5 |
Correct |
21 ms |
8648 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
44 ms |
16724 KB |
Output is correct |
9 |
Correct |
33 ms |
9416 KB |
Output is correct |
10 |
Correct |
43 ms |
16648 KB |
Output is correct |
11 |
Correct |
22 ms |
8132 KB |
Output is correct |
12 |
Correct |
1 ms |
348 KB |
Output is correct |
13 |
Correct |
46 ms |
16792 KB |
Output is correct |
14 |
Correct |
1 ms |
344 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
1 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
420 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
38 ms |
14528 KB |
Output is correct |
6 |
Correct |
47 ms |
14288 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
364 KB |
Output is correct |
9 |
Correct |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
2 ms |
604 KB |
Output is correct |
11 |
Correct |
1 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
1 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
40 ms |
14456 KB |
Output is correct |
18 |
Correct |
51 ms |
14540 KB |
Output is correct |
19 |
Correct |
2 ms |
600 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
1 ms |
472 KB |
Output is correct |
22 |
Correct |
0 ms |
344 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
464 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
1 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
344 KB |
Output is correct |
31 |
Correct |
1 ms |
344 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
352 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
0 ms |
348 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
39 ms |
14540 KB |
Output is correct |
50 |
Correct |
39 ms |
14440 KB |
Output is correct |
51 |
Correct |
47 ms |
14432 KB |
Output is correct |
52 |
Correct |
46 ms |
14540 KB |
Output is correct |
53 |
Correct |
0 ms |
344 KB |
Output is correct |
54 |
Correct |
0 ms |
348 KB |
Output is correct |
55 |
Correct |
2 ms |
604 KB |
Output is correct |
56 |
Correct |
2 ms |
616 KB |
Output is correct |
57 |
Correct |
1 ms |
600 KB |
Output is correct |
58 |
Correct |
0 ms |
344 KB |
Output is correct |
59 |
Correct |
1 ms |
600 KB |
Output is correct |
60 |
Correct |
0 ms |
348 KB |
Output is correct |
61 |
Correct |
0 ms |
344 KB |
Output is correct |
62 |
Correct |
0 ms |
348 KB |
Output is correct |
63 |
Correct |
1 ms |
604 KB |
Output is correct |
64 |
Correct |
1 ms |
604 KB |
Output is correct |
65 |
Correct |
0 ms |
344 KB |
Output is correct |
66 |
Correct |
0 ms |
348 KB |
Output is correct |
67 |
Correct |
0 ms |
348 KB |
Output is correct |
68 |
Correct |
0 ms |
464 KB |
Output is correct |
69 |
Correct |
0 ms |
348 KB |
Output is correct |
70 |
Correct |
0 ms |
348 KB |
Output is correct |
71 |
Correct |
1 ms |
604 KB |
Output is correct |
72 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
23 ms |
8656 KB |
Output is correct |
3 |
Correct |
21 ms |
8672 KB |
Output is correct |
4 |
Correct |
38 ms |
14528 KB |
Output is correct |
5 |
Correct |
44 ms |
14540 KB |
Output is correct |
6 |
Correct |
0 ms |
344 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
49 ms |
16576 KB |
Output is correct |
9 |
Correct |
50 ms |
16696 KB |
Output is correct |
10 |
Correct |
60 ms |
16576 KB |
Output is correct |
11 |
Correct |
61 ms |
16832 KB |
Output is correct |
12 |
Correct |
66 ms |
16392 KB |
Output is correct |
13 |
Correct |
78 ms |
16820 KB |
Output is correct |
14 |
Correct |
42 ms |
16836 KB |
Output is correct |
15 |
Correct |
62 ms |
16632 KB |
Output is correct |
16 |
Correct |
56 ms |
16576 KB |
Output is correct |
17 |
Correct |
59 ms |
16808 KB |
Output is correct |
18 |
Correct |
88 ms |
16832 KB |
Output is correct |
19 |
Correct |
61 ms |
16836 KB |
Output is correct |
20 |
Correct |
55 ms |
16832 KB |
Output is correct |
21 |
Correct |
52 ms |
16324 KB |
Output is correct |
22 |
Correct |
59 ms |
16872 KB |
Output is correct |
23 |
Correct |
59 ms |
17856 KB |
Output is correct |
24 |
Correct |
60 ms |
17832 KB |
Output is correct |
25 |
Correct |
59 ms |
17856 KB |
Output is correct |
26 |
Correct |
90 ms |
19888 KB |
Output is correct |
27 |
Correct |
70 ms |
19888 KB |
Output is correct |
28 |
Correct |
65 ms |
20752 KB |
Output is correct |
29 |
Correct |
48 ms |
16836 KB |
Output is correct |
30 |
Correct |
62 ms |
16836 KB |
Output is correct |
31 |
Correct |
47 ms |
16548 KB |
Output is correct |
32 |
Correct |
62 ms |
16704 KB |
Output is correct |
33 |
Correct |
38 ms |
16832 KB |
Output is correct |
34 |
Correct |
19 ms |
8204 KB |
Output is correct |
35 |
Correct |
0 ms |
344 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
0 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
1 ms |
348 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
91 ms |
16884 KB |
Output is correct |
50 |
Correct |
1 ms |
348 KB |
Output is correct |
51 |
Correct |
0 ms |
348 KB |
Output is correct |
52 |
Correct |
49 ms |
15044 KB |
Output is correct |
53 |
Correct |
38 ms |
14532 KB |
Output is correct |
54 |
Correct |
38 ms |
14272 KB |
Output is correct |
55 |
Correct |
50 ms |
14528 KB |
Output is correct |
56 |
Correct |
45 ms |
14540 KB |
Output is correct |
57 |
Correct |
0 ms |
348 KB |
Output is correct |
58 |
Correct |
0 ms |
348 KB |
Output is correct |
59 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
42 ms |
16364 KB |
Output is correct |
2 |
Correct |
21 ms |
8656 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
40 ms |
16780 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
50 ms |
16660 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
68 ms |
16856 KB |
Output is correct |
9 |
Correct |
59 ms |
16828 KB |
Output is correct |
10 |
Correct |
52 ms |
16836 KB |
Output is correct |
11 |
Correct |
38 ms |
16832 KB |
Output is correct |
12 |
Correct |
41 ms |
16576 KB |
Output is correct |
13 |
Correct |
65 ms |
16576 KB |
Output is correct |
14 |
Correct |
61 ms |
16576 KB |
Output is correct |
15 |
Correct |
61 ms |
16576 KB |
Output is correct |
16 |
Correct |
55 ms |
17848 KB |
Output is correct |
17 |
Correct |
57 ms |
17836 KB |
Output is correct |
18 |
Correct |
63 ms |
17856 KB |
Output is correct |
19 |
Correct |
28 ms |
8656 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
40 ms |
16864 KB |
Output is correct |
22 |
Correct |
26 ms |
9412 KB |
Output is correct |
23 |
Correct |
0 ms |
344 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
1 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
344 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
464 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
344 KB |
Output is correct |
36 |
Correct |
28 ms |
8784 KB |
Output is correct |
37 |
Correct |
40 ms |
14324 KB |
Output is correct |
38 |
Correct |
39 ms |
14540 KB |
Output is correct |
39 |
Correct |
45 ms |
14440 KB |
Output is correct |
40 |
Correct |
46 ms |
14540 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
348 KB |
Output is correct |
46 |
Correct |
1 ms |
604 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
460 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
1 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
344 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
1 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
604 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
1 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
344 KB |
Output is correct |
33 |
Correct |
9 ms |
3796 KB |
Output is correct |
34 |
Correct |
51 ms |
16324 KB |
Output is correct |
35 |
Correct |
24 ms |
8656 KB |
Output is correct |
36 |
Correct |
21 ms |
8648 KB |
Output is correct |
37 |
Correct |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
44 ms |
16724 KB |
Output is correct |
40 |
Correct |
33 ms |
9416 KB |
Output is correct |
41 |
Correct |
43 ms |
16648 KB |
Output is correct |
42 |
Correct |
22 ms |
8132 KB |
Output is correct |
43 |
Correct |
1 ms |
348 KB |
Output is correct |
44 |
Correct |
46 ms |
16792 KB |
Output is correct |
45 |
Correct |
1 ms |
344 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
1 ms |
348 KB |
Output is correct |
48 |
Correct |
0 ms |
420 KB |
Output is correct |
49 |
Correct |
0 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
348 KB |
Output is correct |
51 |
Correct |
1 ms |
348 KB |
Output is correct |
52 |
Correct |
1 ms |
348 KB |
Output is correct |
53 |
Correct |
38 ms |
14528 KB |
Output is correct |
54 |
Correct |
47 ms |
14288 KB |
Output is correct |
55 |
Correct |
0 ms |
348 KB |
Output is correct |
56 |
Correct |
0 ms |
364 KB |
Output is correct |
57 |
Correct |
1 ms |
348 KB |
Output is correct |
58 |
Correct |
2 ms |
604 KB |
Output is correct |
59 |
Correct |
1 ms |
348 KB |
Output is correct |
60 |
Correct |
0 ms |
348 KB |
Output is correct |
61 |
Correct |
1 ms |
348 KB |
Output is correct |
62 |
Correct |
0 ms |
348 KB |
Output is correct |
63 |
Correct |
1 ms |
604 KB |
Output is correct |
64 |
Correct |
0 ms |
348 KB |
Output is correct |
65 |
Correct |
40 ms |
14456 KB |
Output is correct |
66 |
Correct |
51 ms |
14540 KB |
Output is correct |
67 |
Correct |
2 ms |
600 KB |
Output is correct |
68 |
Correct |
0 ms |
348 KB |
Output is correct |
69 |
Correct |
1 ms |
472 KB |
Output is correct |
70 |
Correct |
0 ms |
344 KB |
Output is correct |
71 |
Correct |
0 ms |
348 KB |
Output is correct |
72 |
Correct |
0 ms |
348 KB |
Output is correct |
73 |
Correct |
0 ms |
348 KB |
Output is correct |
74 |
Correct |
0 ms |
348 KB |
Output is correct |
75 |
Correct |
0 ms |
464 KB |
Output is correct |
76 |
Correct |
0 ms |
348 KB |
Output is correct |
77 |
Correct |
1 ms |
348 KB |
Output is correct |
78 |
Correct |
0 ms |
344 KB |
Output is correct |
79 |
Correct |
1 ms |
344 KB |
Output is correct |
80 |
Correct |
0 ms |
348 KB |
Output is correct |
81 |
Correct |
0 ms |
348 KB |
Output is correct |
82 |
Correct |
0 ms |
348 KB |
Output is correct |
83 |
Correct |
0 ms |
352 KB |
Output is correct |
84 |
Correct |
0 ms |
348 KB |
Output is correct |
85 |
Correct |
0 ms |
348 KB |
Output is correct |
86 |
Correct |
0 ms |
348 KB |
Output is correct |
87 |
Correct |
0 ms |
348 KB |
Output is correct |
88 |
Correct |
0 ms |
348 KB |
Output is correct |
89 |
Correct |
0 ms |
348 KB |
Output is correct |
90 |
Correct |
0 ms |
348 KB |
Output is correct |
91 |
Correct |
0 ms |
348 KB |
Output is correct |
92 |
Correct |
0 ms |
348 KB |
Output is correct |
93 |
Correct |
1 ms |
348 KB |
Output is correct |
94 |
Correct |
0 ms |
348 KB |
Output is correct |
95 |
Correct |
0 ms |
348 KB |
Output is correct |
96 |
Correct |
0 ms |
348 KB |
Output is correct |
97 |
Correct |
39 ms |
14540 KB |
Output is correct |
98 |
Correct |
39 ms |
14440 KB |
Output is correct |
99 |
Correct |
47 ms |
14432 KB |
Output is correct |
100 |
Correct |
46 ms |
14540 KB |
Output is correct |
101 |
Correct |
0 ms |
344 KB |
Output is correct |
102 |
Correct |
0 ms |
348 KB |
Output is correct |
103 |
Correct |
2 ms |
604 KB |
Output is correct |
104 |
Correct |
2 ms |
616 KB |
Output is correct |
105 |
Correct |
1 ms |
600 KB |
Output is correct |
106 |
Correct |
0 ms |
344 KB |
Output is correct |
107 |
Correct |
1 ms |
600 KB |
Output is correct |
108 |
Correct |
0 ms |
348 KB |
Output is correct |
109 |
Correct |
0 ms |
344 KB |
Output is correct |
110 |
Correct |
0 ms |
348 KB |
Output is correct |
111 |
Correct |
1 ms |
604 KB |
Output is correct |
112 |
Correct |
1 ms |
604 KB |
Output is correct |
113 |
Correct |
0 ms |
344 KB |
Output is correct |
114 |
Correct |
0 ms |
348 KB |
Output is correct |
115 |
Correct |
0 ms |
348 KB |
Output is correct |
116 |
Correct |
0 ms |
464 KB |
Output is correct |
117 |
Correct |
0 ms |
348 KB |
Output is correct |
118 |
Correct |
0 ms |
348 KB |
Output is correct |
119 |
Correct |
1 ms |
604 KB |
Output is correct |
120 |
Correct |
0 ms |
348 KB |
Output is correct |
121 |
Correct |
1 ms |
344 KB |
Output is correct |
122 |
Correct |
23 ms |
8656 KB |
Output is correct |
123 |
Correct |
21 ms |
8672 KB |
Output is correct |
124 |
Correct |
38 ms |
14528 KB |
Output is correct |
125 |
Correct |
44 ms |
14540 KB |
Output is correct |
126 |
Correct |
0 ms |
344 KB |
Output is correct |
127 |
Correct |
0 ms |
348 KB |
Output is correct |
128 |
Correct |
49 ms |
16576 KB |
Output is correct |
129 |
Correct |
50 ms |
16696 KB |
Output is correct |
130 |
Correct |
60 ms |
16576 KB |
Output is correct |
131 |
Correct |
61 ms |
16832 KB |
Output is correct |
132 |
Correct |
66 ms |
16392 KB |
Output is correct |
133 |
Correct |
78 ms |
16820 KB |
Output is correct |
134 |
Correct |
42 ms |
16836 KB |
Output is correct |
135 |
Correct |
62 ms |
16632 KB |
Output is correct |
136 |
Correct |
56 ms |
16576 KB |
Output is correct |
137 |
Correct |
59 ms |
16808 KB |
Output is correct |
138 |
Correct |
88 ms |
16832 KB |
Output is correct |
139 |
Correct |
61 ms |
16836 KB |
Output is correct |
140 |
Correct |
55 ms |
16832 KB |
Output is correct |
141 |
Correct |
52 ms |
16324 KB |
Output is correct |
142 |
Correct |
59 ms |
16872 KB |
Output is correct |
143 |
Correct |
59 ms |
17856 KB |
Output is correct |
144 |
Correct |
60 ms |
17832 KB |
Output is correct |
145 |
Correct |
59 ms |
17856 KB |
Output is correct |
146 |
Correct |
90 ms |
19888 KB |
Output is correct |
147 |
Correct |
70 ms |
19888 KB |
Output is correct |
148 |
Correct |
65 ms |
20752 KB |
Output is correct |
149 |
Correct |
48 ms |
16836 KB |
Output is correct |
150 |
Correct |
62 ms |
16836 KB |
Output is correct |
151 |
Correct |
47 ms |
16548 KB |
Output is correct |
152 |
Correct |
62 ms |
16704 KB |
Output is correct |
153 |
Correct |
38 ms |
16832 KB |
Output is correct |
154 |
Correct |
19 ms |
8204 KB |
Output is correct |
155 |
Correct |
0 ms |
344 KB |
Output is correct |
156 |
Correct |
0 ms |
348 KB |
Output is correct |
157 |
Correct |
0 ms |
348 KB |
Output is correct |
158 |
Correct |
0 ms |
348 KB |
Output is correct |
159 |
Correct |
0 ms |
348 KB |
Output is correct |
160 |
Correct |
0 ms |
348 KB |
Output is correct |
161 |
Correct |
0 ms |
348 KB |
Output is correct |
162 |
Correct |
1 ms |
348 KB |
Output is correct |
163 |
Correct |
0 ms |
348 KB |
Output is correct |
164 |
Correct |
0 ms |
348 KB |
Output is correct |
165 |
Correct |
0 ms |
348 KB |
Output is correct |
166 |
Correct |
0 ms |
348 KB |
Output is correct |
167 |
Correct |
1 ms |
348 KB |
Output is correct |
168 |
Correct |
0 ms |
348 KB |
Output is correct |
169 |
Correct |
91 ms |
16884 KB |
Output is correct |
170 |
Correct |
1 ms |
348 KB |
Output is correct |
171 |
Correct |
0 ms |
348 KB |
Output is correct |
172 |
Correct |
49 ms |
15044 KB |
Output is correct |
173 |
Correct |
38 ms |
14532 KB |
Output is correct |
174 |
Correct |
38 ms |
14272 KB |
Output is correct |
175 |
Correct |
50 ms |
14528 KB |
Output is correct |
176 |
Correct |
45 ms |
14540 KB |
Output is correct |
177 |
Correct |
0 ms |
348 KB |
Output is correct |
178 |
Correct |
0 ms |
348 KB |
Output is correct |
179 |
Correct |
1 ms |
348 KB |
Output is correct |
180 |
Correct |
42 ms |
16364 KB |
Output is correct |
181 |
Correct |
21 ms |
8656 KB |
Output is correct |
182 |
Correct |
0 ms |
348 KB |
Output is correct |
183 |
Correct |
40 ms |
16780 KB |
Output is correct |
184 |
Correct |
0 ms |
348 KB |
Output is correct |
185 |
Correct |
50 ms |
16660 KB |
Output is correct |
186 |
Correct |
1 ms |
348 KB |
Output is correct |
187 |
Correct |
68 ms |
16856 KB |
Output is correct |
188 |
Correct |
59 ms |
16828 KB |
Output is correct |
189 |
Correct |
52 ms |
16836 KB |
Output is correct |
190 |
Correct |
38 ms |
16832 KB |
Output is correct |
191 |
Correct |
41 ms |
16576 KB |
Output is correct |
192 |
Correct |
65 ms |
16576 KB |
Output is correct |
193 |
Correct |
61 ms |
16576 KB |
Output is correct |
194 |
Correct |
61 ms |
16576 KB |
Output is correct |
195 |
Correct |
55 ms |
17848 KB |
Output is correct |
196 |
Correct |
57 ms |
17836 KB |
Output is correct |
197 |
Correct |
63 ms |
17856 KB |
Output is correct |
198 |
Correct |
28 ms |
8656 KB |
Output is correct |
199 |
Correct |
0 ms |
348 KB |
Output is correct |
200 |
Correct |
40 ms |
16864 KB |
Output is correct |
201 |
Correct |
26 ms |
9412 KB |
Output is correct |
202 |
Correct |
0 ms |
344 KB |
Output is correct |
203 |
Correct |
0 ms |
348 KB |
Output is correct |
204 |
Correct |
0 ms |
348 KB |
Output is correct |
205 |
Correct |
0 ms |
348 KB |
Output is correct |
206 |
Correct |
0 ms |
348 KB |
Output is correct |
207 |
Correct |
1 ms |
348 KB |
Output is correct |
208 |
Correct |
0 ms |
348 KB |
Output is correct |
209 |
Correct |
0 ms |
348 KB |
Output is correct |
210 |
Correct |
0 ms |
344 KB |
Output is correct |
211 |
Correct |
0 ms |
348 KB |
Output is correct |
212 |
Correct |
0 ms |
464 KB |
Output is correct |
213 |
Correct |
0 ms |
348 KB |
Output is correct |
214 |
Correct |
0 ms |
344 KB |
Output is correct |
215 |
Correct |
28 ms |
8784 KB |
Output is correct |
216 |
Correct |
40 ms |
14324 KB |
Output is correct |
217 |
Correct |
39 ms |
14540 KB |
Output is correct |
218 |
Correct |
45 ms |
14440 KB |
Output is correct |
219 |
Correct |
46 ms |
14540 KB |
Output is correct |
220 |
Correct |
0 ms |
348 KB |
Output is correct |
221 |
Correct |
1 ms |
348 KB |
Output is correct |
222 |
Correct |
0 ms |
348 KB |
Output is correct |
223 |
Correct |
0 ms |
348 KB |
Output is correct |
224 |
Correct |
1 ms |
348 KB |
Output is correct |
225 |
Correct |
1 ms |
604 KB |
Output is correct |
226 |
Correct |
61 ms |
16588 KB |
Output is correct |
227 |
Correct |
41 ms |
16832 KB |
Output is correct |
228 |
Correct |
66 ms |
16684 KB |
Output is correct |
229 |
Correct |
51 ms |
16676 KB |
Output is correct |
230 |
Correct |
98 ms |
16832 KB |
Output is correct |
231 |
Correct |
70 ms |
16576 KB |
Output is correct |
232 |
Correct |
58 ms |
16188 KB |
Output is correct |
233 |
Correct |
30 ms |
8656 KB |
Output is correct |
234 |
Correct |
57 ms |
16580 KB |
Output is correct |
235 |
Correct |
47 ms |
16740 KB |
Output is correct |
236 |
Correct |
92 ms |
16836 KB |
Output is correct |
237 |
Correct |
46 ms |
16836 KB |
Output is correct |
238 |
Correct |
47 ms |
15128 KB |
Output is correct |
239 |
Correct |
98 ms |
16812 KB |
Output is correct |
240 |
Correct |
65 ms |
16836 KB |
Output is correct |
241 |
Correct |
44 ms |
16836 KB |
Output is correct |
242 |
Correct |
35 ms |
8656 KB |
Output is correct |