Submission #1079408

# Submission time Handle Problem Language Result Execution time Memory
1079408 2024-08-28T14:12:35 Z oscar1f Tiles (BOI24_tiles) C++17
100 / 100
91 ms 20536 KB
#include<bits/stdc++.h>
using namespace std;
 
#define int long long
 
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++) {
        //cout<<direc<<" "<<nbPris<<endl;
        posCour=(posMin+i)%nbPoints;
        if (points[nbPris-1].first==initPoint[posCour].first) {
            if (direc==0) {
                points[nbPris-1].second=initPoint[posCour].second;
                //cout<<0<<" "<<initPoint[posCour].first<<" "<<initPoint[posCour].second<<endl;
            }
            else {
                direc=0;
                points[nbPris]=initPoint[posCour];
                nbPris++;
            }
        }
        else {
            if (direc==1) {
                //cout<<1<<" "<<initPoint[posCour].first<<" "<<initPoint[posCour].second<<endl;
                points[nbPris-1].first=initPoint[posCour].first;
            }
            else {
                direc=1;
                points[nbPris]=initPoint[posCour];
                nbPris++;
            }
        }
    }
    nbPoints=nbPris;
    if (direc==0) {
        //cout<<"RETOURNE"<<endl;
        for (int i=0;i<nbPoints/2;i++) {
            swap(points[i],points[nbPoints-1-i]);
        }
    }
    /*for (int i=0;i<nbPoints;i++) {
        cout<<points[i].first<<" "<<points[i].second<<endl;
    }*/

    int rep=0;
    vector<tuple<int,int,int>> somTri;
    for (int i=0;i<nbPoints-1;i++) {
        somTri.push_back(make_tuple(points[i].first,points[i].second,i));
    }
    somTri.push_back(make_tuple(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) {
        //cout<<get<0>(somTri[i])<<" : "<<get<1>(somTri[i])<<" "<<get<1>(somTri[i+1])<<endl;
        if ((int)enCours[0].size()==2 and (i==0 or get<0>(somTri[i])!=get<0>(somTri[i-2]))) {
            if (get<0>(somTri[i])%2==0) {
                rep=max(rep,get<0>(somTri[i])-1);
            }
            else {
                rep=max(rep,get<0>(somTri[i]));
            }
        }
        if ((int)enCours[1].size()==2 and (i==0 or get<0>(somTri[i])!=get<0>(somTri[i-2]))) {
            if (get<0>(somTri[i])%2==0) {
                rep=max(rep,get<0>(somTri[i]));
            }
            else {
                rep=max(rep,get<0>(somTri[i])-1);
            }
        }
        if (get<2>(somTri[i])<get<2>(somTri[i+1])) {
            fusion(get<1>(somTri[i]),get<1>(somTri[i+1]),get<0>(somTri[i])%2);
        }
        else {
            if (intersecte(get<1>(somTri[i]),get<1>(somTri[i+1]),1-get<0>(somTri[i])%2)) {
                cout<<rep<<endl;
                return 0;
            }
            suppr(get<1>(somTri[i]),get<1>(somTri[i+1]),get<0>(somTri[i])%2);
        }
        if (get<0>(somTri[i])!=get<0>(somTri[i+2]) and nbImpair>0) {
            cout<<rep<<endl;
            return 0;
        } 
    }
    cout<<maxX<<endl;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 360 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 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 1 ms 348 KB Output is correct
11 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 1 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 360 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 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 1 ms 348 KB Output is correct
11 Correct 0 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 1 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 460 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 1 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 344 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 1 ms 348 KB Output is correct
31 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 7 ms 4048 KB Output is correct
3 Correct 40 ms 16324 KB Output is correct
4 Correct 19 ms 8728 KB Output is correct
5 Correct 19 ms 8744 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 38 ms 16832 KB Output is correct
9 Correct 25 ms 9412 KB Output is correct
10 Correct 38 ms 16828 KB Output is correct
11 Correct 18 ms 8140 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 40 ms 16704 KB Output is correct
14 Correct 1 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
# 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 0 ms 348 KB Output is correct
5 Correct 44 ms 14468 KB Output is correct
6 Correct 47 ms 14528 KB Output is correct
7 Correct 0 ms 344 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 1 ms 348 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 344 KB Output is correct
14 Correct 1 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 40 ms 14328 KB Output is correct
18 Correct 45 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 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 0 ms 348 KB Output is correct
30 Correct 1 ms 344 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 0 ms 348 KB Output is correct
35 Correct 0 ms 348 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 1 ms 344 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 0 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 38 ms 14532 KB Output is correct
50 Correct 39 ms 14276 KB Output is correct
51 Correct 47 ms 14412 KB Output is correct
52 Correct 43 ms 14540 KB Output is correct
53 Correct 1 ms 600 KB Output is correct
54 Correct 0 ms 344 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 0 ms 348 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 0 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 1 ms 604 KB Output is correct
65 Correct 0 ms 348 KB Output is correct
66 Correct 0 ms 480 KB Output is correct
67 Correct 0 ms 348 KB Output is correct
68 Correct 0 ms 348 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 612 KB Output is correct
72 Correct 0 ms 356 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 23 ms 8560 KB Output is correct
3 Correct 19 ms 8576 KB Output is correct
4 Correct 35 ms 14540 KB Output is correct
5 Correct 44 ms 14272 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 44 ms 16548 KB Output is correct
9 Correct 47 ms 16836 KB Output is correct
10 Correct 59 ms 16580 KB Output is correct
11 Correct 60 ms 16836 KB Output is correct
12 Correct 60 ms 16576 KB Output is correct
13 Correct 61 ms 16836 KB Output is correct
14 Correct 41 ms 16832 KB Output is correct
15 Correct 45 ms 16712 KB Output is correct
16 Correct 54 ms 16584 KB Output is correct
17 Correct 57 ms 16844 KB Output is correct
18 Correct 83 ms 16836 KB Output is correct
19 Correct 61 ms 16832 KB Output is correct
20 Correct 56 ms 16836 KB Output is correct
21 Correct 54 ms 16320 KB Output is correct
22 Correct 60 ms 16836 KB Output is correct
23 Correct 54 ms 17764 KB Output is correct
24 Correct 52 ms 17852 KB Output is correct
25 Correct 52 ms 17856 KB Output is correct
26 Correct 85 ms 19888 KB Output is correct
27 Correct 65 ms 20076 KB Output is correct
28 Correct 68 ms 20536 KB Output is correct
29 Correct 45 ms 16752 KB Output is correct
30 Correct 59 ms 16776 KB Output is correct
31 Correct 44 ms 16584 KB Output is correct
32 Correct 61 ms 16836 KB Output is correct
33 Correct 37 ms 16708 KB Output is correct
34 Correct 18 ms 8144 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 0 ms 344 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 1 ms 600 KB Output is correct
41 Correct 1 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 1 ms 344 KB Output is correct
45 Correct 0 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 89 ms 16840 KB Output is correct
50 Correct 0 ms 348 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 48 ms 15144 KB Output is correct
53 Correct 38 ms 14536 KB Output is correct
54 Correct 37 ms 14540 KB Output is correct
55 Correct 44 ms 14472 KB Output is correct
56 Correct 44 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 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 38 ms 16564 KB Output is correct
2 Correct 22 ms 8656 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 37 ms 16632 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 46 ms 16832 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 71 ms 16844 KB Output is correct
9 Correct 60 ms 16824 KB Output is correct
10 Correct 52 ms 16836 KB Output is correct
11 Correct 35 ms 16832 KB Output is correct
12 Correct 35 ms 16576 KB Output is correct
13 Correct 63 ms 16532 KB Output is correct
14 Correct 57 ms 16576 KB Output is correct
15 Correct 57 ms 16580 KB Output is correct
16 Correct 51 ms 17844 KB Output is correct
17 Correct 56 ms 17852 KB Output is correct
18 Correct 54 ms 17788 KB Output is correct
19 Correct 29 ms 8648 KB Output is correct
20 Correct 1 ms 348 KB Output is correct
21 Correct 40 ms 16796 KB Output is correct
22 Correct 23 ms 9424 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 1 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 464 KB Output is correct
31 Correct 0 ms 348 KB Output is correct
32 Correct 0 ms 600 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 348 KB Output is correct
36 Correct 27 ms 8668 KB Output is correct
37 Correct 43 ms 14312 KB Output is correct
38 Correct 40 ms 14532 KB Output is correct
39 Correct 44 ms 14528 KB Output is correct
40 Correct 43 ms 14528 KB Output is correct
41 Correct 0 ms 344 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 0 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 1 ms 604 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 360 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 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 1 ms 348 KB Output is correct
11 Correct 0 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 1 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 460 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 1 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 344 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 1 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 7 ms 4048 KB Output is correct
34 Correct 40 ms 16324 KB Output is correct
35 Correct 19 ms 8728 KB Output is correct
36 Correct 19 ms 8744 KB Output is correct
37 Correct 0 ms 344 KB Output is correct
38 Correct 1 ms 348 KB Output is correct
39 Correct 38 ms 16832 KB Output is correct
40 Correct 25 ms 9412 KB Output is correct
41 Correct 38 ms 16828 KB Output is correct
42 Correct 18 ms 8140 KB Output is correct
43 Correct 1 ms 348 KB Output is correct
44 Correct 40 ms 16704 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 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 0 ms 348 KB Output is correct
53 Correct 44 ms 14468 KB Output is correct
54 Correct 47 ms 14528 KB Output is correct
55 Correct 0 ms 344 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 1 ms 348 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 344 KB Output is correct
62 Correct 1 ms 348 KB Output is correct
63 Correct 0 ms 348 KB Output is correct
64 Correct 0 ms 348 KB Output is correct
65 Correct 40 ms 14328 KB Output is correct
66 Correct 45 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 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 0 ms 348 KB Output is correct
78 Correct 1 ms 344 KB Output is correct
79 Correct 0 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 348 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 1 ms 344 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 0 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 38 ms 14532 KB Output is correct
98 Correct 39 ms 14276 KB Output is correct
99 Correct 47 ms 14412 KB Output is correct
100 Correct 43 ms 14540 KB Output is correct
101 Correct 1 ms 600 KB Output is correct
102 Correct 0 ms 344 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 0 ms 348 KB Output is correct
108 Correct 0 ms 348 KB Output is correct
109 Correct 0 ms 348 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 348 KB Output is correct
114 Correct 0 ms 480 KB Output is correct
115 Correct 0 ms 348 KB Output is correct
116 Correct 0 ms 348 KB Output is correct
117 Correct 1 ms 348 KB Output is correct
118 Correct 0 ms 348 KB Output is correct
119 Correct 1 ms 612 KB Output is correct
120 Correct 0 ms 356 KB Output is correct
121 Correct 0 ms 344 KB Output is correct
122 Correct 23 ms 8560 KB Output is correct
123 Correct 19 ms 8576 KB Output is correct
124 Correct 35 ms 14540 KB Output is correct
125 Correct 44 ms 14272 KB Output is correct
126 Correct 1 ms 344 KB Output is correct
127 Correct 1 ms 348 KB Output is correct
128 Correct 44 ms 16548 KB Output is correct
129 Correct 47 ms 16836 KB Output is correct
130 Correct 59 ms 16580 KB Output is correct
131 Correct 60 ms 16836 KB Output is correct
132 Correct 60 ms 16576 KB Output is correct
133 Correct 61 ms 16836 KB Output is correct
134 Correct 41 ms 16832 KB Output is correct
135 Correct 45 ms 16712 KB Output is correct
136 Correct 54 ms 16584 KB Output is correct
137 Correct 57 ms 16844 KB Output is correct
138 Correct 83 ms 16836 KB Output is correct
139 Correct 61 ms 16832 KB Output is correct
140 Correct 56 ms 16836 KB Output is correct
141 Correct 54 ms 16320 KB Output is correct
142 Correct 60 ms 16836 KB Output is correct
143 Correct 54 ms 17764 KB Output is correct
144 Correct 52 ms 17852 KB Output is correct
145 Correct 52 ms 17856 KB Output is correct
146 Correct 85 ms 19888 KB Output is correct
147 Correct 65 ms 20076 KB Output is correct
148 Correct 68 ms 20536 KB Output is correct
149 Correct 45 ms 16752 KB Output is correct
150 Correct 59 ms 16776 KB Output is correct
151 Correct 44 ms 16584 KB Output is correct
152 Correct 61 ms 16836 KB Output is correct
153 Correct 37 ms 16708 KB Output is correct
154 Correct 18 ms 8144 KB Output is correct
155 Correct 0 ms 348 KB Output is correct
156 Correct 0 ms 344 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 1 ms 600 KB Output is correct
161 Correct 1 ms 348 KB Output is correct
162 Correct 0 ms 348 KB Output is correct
163 Correct 0 ms 348 KB Output is correct
164 Correct 1 ms 344 KB Output is correct
165 Correct 0 ms 348 KB Output is correct
166 Correct 0 ms 348 KB Output is correct
167 Correct 0 ms 348 KB Output is correct
168 Correct 0 ms 348 KB Output is correct
169 Correct 89 ms 16840 KB Output is correct
170 Correct 0 ms 348 KB Output is correct
171 Correct 0 ms 348 KB Output is correct
172 Correct 48 ms 15144 KB Output is correct
173 Correct 38 ms 14536 KB Output is correct
174 Correct 37 ms 14540 KB Output is correct
175 Correct 44 ms 14472 KB Output is correct
176 Correct 44 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 0 ms 348 KB Output is correct
180 Correct 38 ms 16564 KB Output is correct
181 Correct 22 ms 8656 KB Output is correct
182 Correct 1 ms 348 KB Output is correct
183 Correct 37 ms 16632 KB Output is correct
184 Correct 0 ms 348 KB Output is correct
185 Correct 46 ms 16832 KB Output is correct
186 Correct 1 ms 348 KB Output is correct
187 Correct 71 ms 16844 KB Output is correct
188 Correct 60 ms 16824 KB Output is correct
189 Correct 52 ms 16836 KB Output is correct
190 Correct 35 ms 16832 KB Output is correct
191 Correct 35 ms 16576 KB Output is correct
192 Correct 63 ms 16532 KB Output is correct
193 Correct 57 ms 16576 KB Output is correct
194 Correct 57 ms 16580 KB Output is correct
195 Correct 51 ms 17844 KB Output is correct
196 Correct 56 ms 17852 KB Output is correct
197 Correct 54 ms 17788 KB Output is correct
198 Correct 29 ms 8648 KB Output is correct
199 Correct 1 ms 348 KB Output is correct
200 Correct 40 ms 16796 KB Output is correct
201 Correct 23 ms 9424 KB Output is correct
202 Correct 1 ms 348 KB Output is correct
203 Correct 0 ms 348 KB Output is correct
204 Correct 0 ms 348 KB Output is correct
205 Correct 1 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 464 KB Output is correct
210 Correct 0 ms 348 KB Output is correct
211 Correct 0 ms 600 KB Output is correct
212 Correct 0 ms 348 KB Output is correct
213 Correct 0 ms 348 KB Output is correct
214 Correct 0 ms 348 KB Output is correct
215 Correct 27 ms 8668 KB Output is correct
216 Correct 43 ms 14312 KB Output is correct
217 Correct 40 ms 14532 KB Output is correct
218 Correct 44 ms 14528 KB Output is correct
219 Correct 43 ms 14528 KB Output is correct
220 Correct 0 ms 344 KB Output is correct
221 Correct 0 ms 348 KB Output is correct
222 Correct 0 ms 348 KB Output is correct
223 Correct 1 ms 348 KB Output is correct
224 Correct 0 ms 348 KB Output is correct
225 Correct 1 ms 604 KB Output is correct
226 Correct 63 ms 16624 KB Output is correct
227 Correct 37 ms 16720 KB Output is correct
228 Correct 57 ms 16652 KB Output is correct
229 Correct 48 ms 16576 KB Output is correct
230 Correct 86 ms 16832 KB Output is correct
231 Correct 38 ms 16576 KB Output is correct
232 Correct 59 ms 16328 KB Output is correct
233 Correct 28 ms 8528 KB Output is correct
234 Correct 40 ms 16580 KB Output is correct
235 Correct 44 ms 16672 KB Output is correct
236 Correct 91 ms 16836 KB Output is correct
237 Correct 40 ms 16580 KB Output is correct
238 Correct 45 ms 15044 KB Output is correct
239 Correct 91 ms 16832 KB Output is correct
240 Correct 64 ms 16836 KB Output is correct
241 Correct 42 ms 16832 KB Output is correct
242 Correct 25 ms 8648 KB Output is correct