# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1079427 |
2024-08-28T14:26:31 Z |
oscar1f |
Tiles (BOI24_tiles) |
C++17 |
|
97 ms |
17600 KB |
#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) {
enCours[pari].insert({deb,fin});
nbImpair+=(fin-deb)%2;
auto 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) {
auto 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) {
auto it=enCours[pari].lower_bound({fin,-INFINI});
it--;
return (*it).second>deb;
}
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;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
600 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
428 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 |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
600 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
428 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 |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
1 ms |
348 KB |
Output is correct |
12 |
Correct |
1 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 |
0 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 |
0 ms |
348 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 |
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 |
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 |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
7 ms |
3284 KB |
Output is correct |
3 |
Correct |
45 ms |
12700 KB |
Output is correct |
4 |
Correct |
21 ms |
6608 KB |
Output is correct |
5 |
Correct |
20 ms |
6772 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
58 ms |
12996 KB |
Output is correct |
9 |
Correct |
33 ms |
7264 KB |
Output is correct |
10 |
Correct |
51 ms |
12916 KB |
Output is correct |
11 |
Correct |
18 ms |
6352 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
64 ms |
12928 KB |
Output is correct |
14 |
Correct |
0 ms |
344 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
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 |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
41 ms |
12972 KB |
Output is correct |
6 |
Correct |
49 ms |
13000 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
1 ms |
344 KB |
Output is correct |
10 |
Correct |
1 ms |
604 KB |
Output is correct |
11 |
Correct |
0 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 |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
348 KB |
Output is correct |
16 |
Correct |
1 ms |
396 KB |
Output is correct |
17 |
Correct |
40 ms |
14440 KB |
Output is correct |
18 |
Correct |
63 ms |
14316 KB |
Output is correct |
19 |
Correct |
1 ms |
604 KB |
Output is correct |
20 |
Correct |
1 ms |
420 KB |
Output is correct |
21 |
Correct |
1 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 |
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 |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
1 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 |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
348 KB |
Output is correct |
35 |
Correct |
1 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 |
1 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 |
344 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
1 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
348 KB |
Output is correct |
46 |
Correct |
1 ms |
348 KB |
Output is correct |
47 |
Correct |
0 ms |
348 KB |
Output is correct |
48 |
Correct |
1 ms |
348 KB |
Output is correct |
49 |
Correct |
40 ms |
14372 KB |
Output is correct |
50 |
Correct |
41 ms |
14284 KB |
Output is correct |
51 |
Correct |
47 ms |
14452 KB |
Output is correct |
52 |
Correct |
47 ms |
14532 KB |
Output is correct |
53 |
Correct |
1 ms |
348 KB |
Output is correct |
54 |
Correct |
0 ms |
348 KB |
Output is correct |
55 |
Correct |
1 ms |
604 KB |
Output is correct |
56 |
Correct |
2 ms |
604 KB |
Output is correct |
57 |
Correct |
1 ms |
604 KB |
Output is correct |
58 |
Correct |
0 ms |
348 KB |
Output is correct |
59 |
Correct |
1 ms |
348 KB |
Output is correct |
60 |
Correct |
1 ms |
348 KB |
Output is correct |
61 |
Correct |
0 ms |
352 KB |
Output is correct |
62 |
Correct |
0 ms |
352 KB |
Output is correct |
63 |
Correct |
2 ms |
604 KB |
Output is correct |
64 |
Correct |
2 ms |
612 KB |
Output is correct |
65 |
Correct |
0 ms |
360 KB |
Output is correct |
66 |
Correct |
0 ms |
360 KB |
Output is correct |
67 |
Correct |
0 ms |
360 KB |
Output is correct |
68 |
Correct |
0 ms |
360 KB |
Output is correct |
69 |
Correct |
0 ms |
360 KB |
Output is correct |
70 |
Correct |
1 ms |
360 KB |
Output is correct |
71 |
Correct |
1 ms |
616 KB |
Output is correct |
72 |
Correct |
0 ms |
360 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
360 KB |
Output is correct |
2 |
Correct |
22 ms |
6604 KB |
Output is correct |
3 |
Correct |
21 ms |
6608 KB |
Output is correct |
4 |
Correct |
37 ms |
12996 KB |
Output is correct |
5 |
Correct |
48 ms |
13004 KB |
Output is correct |
6 |
Correct |
1 ms |
344 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
56 ms |
12988 KB |
Output is correct |
9 |
Correct |
53 ms |
12904 KB |
Output is correct |
10 |
Correct |
70 ms |
12948 KB |
Output is correct |
11 |
Correct |
66 ms |
12824 KB |
Output is correct |
12 |
Correct |
65 ms |
12904 KB |
Output is correct |
13 |
Correct |
67 ms |
13004 KB |
Output is correct |
14 |
Correct |
39 ms |
12968 KB |
Output is correct |
15 |
Correct |
45 ms |
13004 KB |
Output is correct |
16 |
Correct |
55 ms |
12872 KB |
Output is correct |
17 |
Correct |
62 ms |
12856 KB |
Output is correct |
18 |
Correct |
89 ms |
12908 KB |
Output is correct |
19 |
Correct |
67 ms |
12996 KB |
Output is correct |
20 |
Correct |
55 ms |
12960 KB |
Output is correct |
21 |
Correct |
51 ms |
12980 KB |
Output is correct |
22 |
Correct |
69 ms |
13012 KB |
Output is correct |
23 |
Correct |
61 ms |
14380 KB |
Output is correct |
24 |
Correct |
69 ms |
14496 KB |
Output is correct |
25 |
Correct |
69 ms |
14480 KB |
Output is correct |
26 |
Correct |
91 ms |
17588 KB |
Output is correct |
27 |
Correct |
87 ms |
17564 KB |
Output is correct |
28 |
Correct |
67 ms |
17580 KB |
Output is correct |
29 |
Correct |
47 ms |
12992 KB |
Output is correct |
30 |
Correct |
60 ms |
12992 KB |
Output is correct |
31 |
Correct |
48 ms |
12996 KB |
Output is correct |
32 |
Correct |
62 ms |
12948 KB |
Output is correct |
33 |
Correct |
44 ms |
12780 KB |
Output is correct |
34 |
Correct |
19 ms |
6348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
1 ms |
348 KB |
Output is correct |
39 |
Correct |
1 ms |
348 KB |
Output is correct |
40 |
Correct |
1 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 |
1 ms |
348 KB |
Output is correct |
44 |
Correct |
1 ms |
348 KB |
Output is correct |
45 |
Correct |
0 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
344 KB |
Output is correct |
47 |
Correct |
0 ms |
348 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
96 ms |
12816 KB |
Output is correct |
50 |
Correct |
0 ms |
348 KB |
Output is correct |
51 |
Correct |
0 ms |
348 KB |
Output is correct |
52 |
Correct |
49 ms |
12952 KB |
Output is correct |
53 |
Correct |
41 ms |
12996 KB |
Output is correct |
54 |
Correct |
38 ms |
13000 KB |
Output is correct |
55 |
Correct |
44 ms |
12992 KB |
Output is correct |
56 |
Correct |
57 ms |
13004 KB |
Output is correct |
57 |
Correct |
1 ms |
348 KB |
Output is correct |
58 |
Correct |
0 ms |
360 KB |
Output is correct |
59 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
52 ms |
12672 KB |
Output is correct |
2 |
Correct |
21 ms |
6604 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
38 ms |
12992 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
47 ms |
12928 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
67 ms |
16196 KB |
Output is correct |
9 |
Correct |
61 ms |
16324 KB |
Output is correct |
10 |
Correct |
53 ms |
16320 KB |
Output is correct |
11 |
Correct |
41 ms |
16320 KB |
Output is correct |
12 |
Correct |
39 ms |
16044 KB |
Output is correct |
13 |
Correct |
64 ms |
16068 KB |
Output is correct |
14 |
Correct |
61 ms |
16084 KB |
Output is correct |
15 |
Correct |
61 ms |
16064 KB |
Output is correct |
16 |
Correct |
58 ms |
17584 KB |
Output is correct |
17 |
Correct |
59 ms |
17600 KB |
Output is correct |
18 |
Correct |
60 ms |
17584 KB |
Output is correct |
19 |
Correct |
29 ms |
8400 KB |
Output is correct |
20 |
Correct |
1 ms |
344 KB |
Output is correct |
21 |
Correct |
40 ms |
16252 KB |
Output is correct |
22 |
Correct |
28 ms |
9156 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 |
456 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
344 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 |
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 |
1 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
28 ms |
8392 KB |
Output is correct |
37 |
Correct |
41 ms |
14540 KB |
Output is correct |
38 |
Correct |
39 ms |
14384 KB |
Output is correct |
39 |
Correct |
46 ms |
14540 KB |
Output is correct |
40 |
Correct |
46 ms |
14540 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
1 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 |
1 ms |
476 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
600 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
428 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 |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
1 ms |
348 KB |
Output is correct |
12 |
Correct |
1 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 |
0 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 |
0 ms |
348 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 |
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 |
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 |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
348 KB |
Output is correct |
33 |
Correct |
7 ms |
3284 KB |
Output is correct |
34 |
Correct |
45 ms |
12700 KB |
Output is correct |
35 |
Correct |
21 ms |
6608 KB |
Output is correct |
36 |
Correct |
20 ms |
6772 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
58 ms |
12996 KB |
Output is correct |
40 |
Correct |
33 ms |
7264 KB |
Output is correct |
41 |
Correct |
51 ms |
12916 KB |
Output is correct |
42 |
Correct |
18 ms |
6352 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
64 ms |
12928 KB |
Output is correct |
45 |
Correct |
0 ms |
344 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 |
0 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
348 KB |
Output is correct |
51 |
Correct |
0 ms |
348 KB |
Output is correct |
52 |
Correct |
1 ms |
348 KB |
Output is correct |
53 |
Correct |
41 ms |
12972 KB |
Output is correct |
54 |
Correct |
49 ms |
13000 KB |
Output is correct |
55 |
Correct |
0 ms |
348 KB |
Output is correct |
56 |
Correct |
0 ms |
348 KB |
Output is correct |
57 |
Correct |
1 ms |
344 KB |
Output is correct |
58 |
Correct |
1 ms |
604 KB |
Output is correct |
59 |
Correct |
0 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 |
1 ms |
348 KB |
Output is correct |
63 |
Correct |
1 ms |
348 KB |
Output is correct |
64 |
Correct |
1 ms |
396 KB |
Output is correct |
65 |
Correct |
40 ms |
14440 KB |
Output is correct |
66 |
Correct |
63 ms |
14316 KB |
Output is correct |
67 |
Correct |
1 ms |
604 KB |
Output is correct |
68 |
Correct |
1 ms |
420 KB |
Output is correct |
69 |
Correct |
1 ms |
348 KB |
Output is correct |
70 |
Correct |
0 ms |
348 KB |
Output is correct |
71 |
Correct |
1 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 |
348 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 |
348 KB |
Output is correct |
79 |
Correct |
0 ms |
348 KB |
Output is correct |
80 |
Correct |
1 ms |
348 KB |
Output is correct |
81 |
Correct |
0 ms |
348 KB |
Output is correct |
82 |
Correct |
1 ms |
348 KB |
Output is correct |
83 |
Correct |
1 ms |
344 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 |
1 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 |
1 ms |
344 KB |
Output is correct |
91 |
Correct |
0 ms |
348 KB |
Output is correct |
92 |
Correct |
1 ms |
348 KB |
Output is correct |
93 |
Correct |
1 ms |
348 KB |
Output is correct |
94 |
Correct |
1 ms |
348 KB |
Output is correct |
95 |
Correct |
0 ms |
348 KB |
Output is correct |
96 |
Correct |
1 ms |
348 KB |
Output is correct |
97 |
Correct |
40 ms |
14372 KB |
Output is correct |
98 |
Correct |
41 ms |
14284 KB |
Output is correct |
99 |
Correct |
47 ms |
14452 KB |
Output is correct |
100 |
Correct |
47 ms |
14532 KB |
Output is correct |
101 |
Correct |
1 ms |
348 KB |
Output is correct |
102 |
Correct |
0 ms |
348 KB |
Output is correct |
103 |
Correct |
1 ms |
604 KB |
Output is correct |
104 |
Correct |
2 ms |
604 KB |
Output is correct |
105 |
Correct |
1 ms |
604 KB |
Output is correct |
106 |
Correct |
0 ms |
348 KB |
Output is correct |
107 |
Correct |
1 ms |
348 KB |
Output is correct |
108 |
Correct |
1 ms |
348 KB |
Output is correct |
109 |
Correct |
0 ms |
352 KB |
Output is correct |
110 |
Correct |
0 ms |
352 KB |
Output is correct |
111 |
Correct |
2 ms |
604 KB |
Output is correct |
112 |
Correct |
2 ms |
612 KB |
Output is correct |
113 |
Correct |
0 ms |
360 KB |
Output is correct |
114 |
Correct |
0 ms |
360 KB |
Output is correct |
115 |
Correct |
0 ms |
360 KB |
Output is correct |
116 |
Correct |
0 ms |
360 KB |
Output is correct |
117 |
Correct |
0 ms |
360 KB |
Output is correct |
118 |
Correct |
1 ms |
360 KB |
Output is correct |
119 |
Correct |
1 ms |
616 KB |
Output is correct |
120 |
Correct |
0 ms |
360 KB |
Output is correct |
121 |
Correct |
0 ms |
360 KB |
Output is correct |
122 |
Correct |
22 ms |
6604 KB |
Output is correct |
123 |
Correct |
21 ms |
6608 KB |
Output is correct |
124 |
Correct |
37 ms |
12996 KB |
Output is correct |
125 |
Correct |
48 ms |
13004 KB |
Output is correct |
126 |
Correct |
1 ms |
344 KB |
Output is correct |
127 |
Correct |
0 ms |
348 KB |
Output is correct |
128 |
Correct |
56 ms |
12988 KB |
Output is correct |
129 |
Correct |
53 ms |
12904 KB |
Output is correct |
130 |
Correct |
70 ms |
12948 KB |
Output is correct |
131 |
Correct |
66 ms |
12824 KB |
Output is correct |
132 |
Correct |
65 ms |
12904 KB |
Output is correct |
133 |
Correct |
67 ms |
13004 KB |
Output is correct |
134 |
Correct |
39 ms |
12968 KB |
Output is correct |
135 |
Correct |
45 ms |
13004 KB |
Output is correct |
136 |
Correct |
55 ms |
12872 KB |
Output is correct |
137 |
Correct |
62 ms |
12856 KB |
Output is correct |
138 |
Correct |
89 ms |
12908 KB |
Output is correct |
139 |
Correct |
67 ms |
12996 KB |
Output is correct |
140 |
Correct |
55 ms |
12960 KB |
Output is correct |
141 |
Correct |
51 ms |
12980 KB |
Output is correct |
142 |
Correct |
69 ms |
13012 KB |
Output is correct |
143 |
Correct |
61 ms |
14380 KB |
Output is correct |
144 |
Correct |
69 ms |
14496 KB |
Output is correct |
145 |
Correct |
69 ms |
14480 KB |
Output is correct |
146 |
Correct |
91 ms |
17588 KB |
Output is correct |
147 |
Correct |
87 ms |
17564 KB |
Output is correct |
148 |
Correct |
67 ms |
17580 KB |
Output is correct |
149 |
Correct |
47 ms |
12992 KB |
Output is correct |
150 |
Correct |
60 ms |
12992 KB |
Output is correct |
151 |
Correct |
48 ms |
12996 KB |
Output is correct |
152 |
Correct |
62 ms |
12948 KB |
Output is correct |
153 |
Correct |
44 ms |
12780 KB |
Output is correct |
154 |
Correct |
19 ms |
6348 KB |
Output is correct |
155 |
Correct |
0 ms |
348 KB |
Output is correct |
156 |
Correct |
0 ms |
348 KB |
Output is correct |
157 |
Correct |
1 ms |
348 KB |
Output is correct |
158 |
Correct |
1 ms |
348 KB |
Output is correct |
159 |
Correct |
1 ms |
348 KB |
Output is correct |
160 |
Correct |
1 ms |
348 KB |
Output is correct |
161 |
Correct |
0 ms |
348 KB |
Output is correct |
162 |
Correct |
0 ms |
348 KB |
Output is correct |
163 |
Correct |
1 ms |
348 KB |
Output is correct |
164 |
Correct |
1 ms |
348 KB |
Output is correct |
165 |
Correct |
0 ms |
348 KB |
Output is correct |
166 |
Correct |
0 ms |
344 KB |
Output is correct |
167 |
Correct |
0 ms |
348 KB |
Output is correct |
168 |
Correct |
0 ms |
348 KB |
Output is correct |
169 |
Correct |
96 ms |
12816 KB |
Output is correct |
170 |
Correct |
0 ms |
348 KB |
Output is correct |
171 |
Correct |
0 ms |
348 KB |
Output is correct |
172 |
Correct |
49 ms |
12952 KB |
Output is correct |
173 |
Correct |
41 ms |
12996 KB |
Output is correct |
174 |
Correct |
38 ms |
13000 KB |
Output is correct |
175 |
Correct |
44 ms |
12992 KB |
Output is correct |
176 |
Correct |
57 ms |
13004 KB |
Output is correct |
177 |
Correct |
1 ms |
348 KB |
Output is correct |
178 |
Correct |
0 ms |
360 KB |
Output is correct |
179 |
Correct |
0 ms |
348 KB |
Output is correct |
180 |
Correct |
52 ms |
12672 KB |
Output is correct |
181 |
Correct |
21 ms |
6604 KB |
Output is correct |
182 |
Correct |
0 ms |
348 KB |
Output is correct |
183 |
Correct |
38 ms |
12992 KB |
Output is correct |
184 |
Correct |
0 ms |
348 KB |
Output is correct |
185 |
Correct |
47 ms |
12928 KB |
Output is correct |
186 |
Correct |
0 ms |
348 KB |
Output is correct |
187 |
Correct |
67 ms |
16196 KB |
Output is correct |
188 |
Correct |
61 ms |
16324 KB |
Output is correct |
189 |
Correct |
53 ms |
16320 KB |
Output is correct |
190 |
Correct |
41 ms |
16320 KB |
Output is correct |
191 |
Correct |
39 ms |
16044 KB |
Output is correct |
192 |
Correct |
64 ms |
16068 KB |
Output is correct |
193 |
Correct |
61 ms |
16084 KB |
Output is correct |
194 |
Correct |
61 ms |
16064 KB |
Output is correct |
195 |
Correct |
58 ms |
17584 KB |
Output is correct |
196 |
Correct |
59 ms |
17600 KB |
Output is correct |
197 |
Correct |
60 ms |
17584 KB |
Output is correct |
198 |
Correct |
29 ms |
8400 KB |
Output is correct |
199 |
Correct |
1 ms |
344 KB |
Output is correct |
200 |
Correct |
40 ms |
16252 KB |
Output is correct |
201 |
Correct |
28 ms |
9156 KB |
Output is correct |
202 |
Correct |
0 ms |
348 KB |
Output is correct |
203 |
Correct |
0 ms |
348 KB |
Output is correct |
204 |
Correct |
0 ms |
456 KB |
Output is correct |
205 |
Correct |
0 ms |
348 KB |
Output is correct |
206 |
Correct |
0 ms |
344 KB |
Output is correct |
207 |
Correct |
0 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 |
348 KB |
Output is correct |
213 |
Correct |
1 ms |
348 KB |
Output is correct |
214 |
Correct |
1 ms |
348 KB |
Output is correct |
215 |
Correct |
28 ms |
8392 KB |
Output is correct |
216 |
Correct |
41 ms |
14540 KB |
Output is correct |
217 |
Correct |
39 ms |
14384 KB |
Output is correct |
218 |
Correct |
46 ms |
14540 KB |
Output is correct |
219 |
Correct |
46 ms |
14540 KB |
Output is correct |
220 |
Correct |
0 ms |
348 KB |
Output is correct |
221 |
Correct |
0 ms |
348 KB |
Output is correct |
222 |
Correct |
1 ms |
348 KB |
Output is correct |
223 |
Correct |
0 ms |
348 KB |
Output is correct |
224 |
Correct |
0 ms |
348 KB |
Output is correct |
225 |
Correct |
1 ms |
476 KB |
Output is correct |
226 |
Correct |
64 ms |
16064 KB |
Output is correct |
227 |
Correct |
40 ms |
16316 KB |
Output is correct |
228 |
Correct |
60 ms |
16220 KB |
Output is correct |
229 |
Correct |
48 ms |
15848 KB |
Output is correct |
230 |
Correct |
92 ms |
16324 KB |
Output is correct |
231 |
Correct |
43 ms |
16068 KB |
Output is correct |
232 |
Correct |
58 ms |
16064 KB |
Output is correct |
233 |
Correct |
28 ms |
8400 KB |
Output is correct |
234 |
Correct |
44 ms |
15872 KB |
Output is correct |
235 |
Correct |
47 ms |
16064 KB |
Output is correct |
236 |
Correct |
97 ms |
16064 KB |
Output is correct |
237 |
Correct |
41 ms |
16072 KB |
Output is correct |
238 |
Correct |
44 ms |
15052 KB |
Output is correct |
239 |
Correct |
89 ms |
16320 KB |
Output is correct |
240 |
Correct |
65 ms |
16324 KB |
Output is correct |
241 |
Correct |
43 ms |
16316 KB |
Output is correct |
242 |
Correct |
25 ms |
8556 KB |
Output is correct |