Submission #801307

# Submission time Handle Problem Language Result Execution time Memory
801307 2023-08-02T05:31:56 Z 이동현(#10092) IOI Fever (JOI21_fever) C++17
100 / 100
1495 ms 250040 KB
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#define int long long
using namespace std;

int wx[4] = {0, 1, 0, -1};
int wy[4] = {1, 0, -1, 0};

void rot(array<int, 3>&x){
    (x[2] += 1) %= 4;
    swap(x[0], x[1]);
    x[1] *= -1;
}

void rot(array<int, 4>&x){
    (x[2] += 1) %= 4;
    swap(x[0], x[1]);
    x[1] *= -1;
}

struct Node{
    int nxt, nxtdist, ton;
    Node(){
        nxt = -1;
        nxtdist = 0;
        ton = -1;
    }
};
const int NS = (int)1e5 + 4, SZ = (int)6e6 + 4;
vector<vector<int>> linecoord, lineid;
vector<array<int, 2>> toline[NS];
Node gr[SZ];
int tn;

signed main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    int n;
    cin >> n;
    vector<array<int, 4>> a(n);
    for(int i = 0; i < n; ++i){
        cin >> a[i][0] >> a[i][1];
        a[i][0] *= 2;
        a[i][1] *= 2;
        a[i][3] = i;
    }

    tn = 0;

    auto makeway = [&](){
        for(int i = 0; i < NS; ++i) toline[i].clear();
        linecoord.clear(), lineid.clear();
        tn = 0;
        for(int i = 0; i < SZ; ++i) gr[i] = Node();
        
        for(int rep1 = 0; rep1 < 4; ++rep1){
            for(int rep2 = 0; rep2 < 2; ++rep2){
                sort(a.begin(), a.end(), [&](array<int, 4>&x, array<int, 4>&y){
                    return x[0] + x[1] < y[0] + y[1] || (x[0] + x[1] == y[0] + y[1] && x[0] < y[0]);
                });

                // cout << a[0][0] << ' ' << a[0][1] << ' ' << a[0][2] << ' ' << a[0][3] << endl;
                // cout << a[1][0] << ' ' << a[1][1] << ' ' << a[1][2] << ' ' << a[1][3] << endl;
                for(int i = 0; i < n;){
                    vector<int> ncoord, nid;
                    int lst = -1;
                    int j = i;
                    for(; j < n && a[i][0] + a[i][1] == a[j][0] + a[j][1]; ++j){
                        if(a[j][2] == 1){
                            ++tn;
                            gr[tn].ton = a[j][3];
                            if(lst != -1){
                                gr[tn].nxt = lst, gr[tn].nxtdist = a[j][0] - ncoord.back();
                            }

                            ncoord.push_back(a[j][0]);
                            nid.push_back(tn);

                            lst = tn;
                        }
                        else if(a[j][2] == 0){
                            // cout << a[j][3] << ' ' << (int)linecoord.size() << ' ' << (int)ncoord.size() << endl;
                            toline[a[j][3]].push_back({(int)linecoord.size(), a[j][0]});
                        }
                    }

                    linecoord.push_back(ncoord);
                    lineid.push_back(nid);

                    i = j;
                }

                for(int i = 0; i < n; ++i){
                    a[i][0] *= -1;
                    if(a[i][2] % 2) a[i][2] = 4 - a[i][2];
                }
            }

            sort(a.begin(), a.end(), [&](array<int, 4>&x, array<int, 4>&y){
                return x[0] < y[0] || (x[0] == y[0] && x[1] < y[1]);
            });

            for(int i = 0; i < n;){
                vector<int> ncoord, nid;
                int lst = -1;
                int j = i;
                for(; j < n && a[i][0] == a[j][0]; ++j){
                    if(a[j][2] == 0){
                        ++tn;
                        gr[tn].ton = a[j][3];
                        if(lst != -1){
                            gr[tn].nxt = lst, gr[tn].nxtdist = a[j][1] / 2 - ncoord.back();
                        }

                        ncoord.push_back(a[j][1] / 2);
                        nid.push_back(tn);

                        lst = tn;
                    }
                    else if(a[j][2] == 2){
                        toline[a[j][3]].push_back({(int)linecoord.size(), a[j][1] / 2});
                    }
                }

                linecoord.push_back(ncoord);
                lineid.push_back(nid);

                i = j;
            }

            for(int i = 0; i < n; ++i){
                rot(a[i]);
            }
        }

        sort(a.begin(), a.end(), [&](array<int, 4>&x, array<int, 4>&y){return x[3] < y[3];});
    };
    
    int ans = 0;

    auto sol = [&](){
        vector<int> chk(n, -1);
        vector<int> chk2(tn + 1, -1);
        priority_queue<array<int, 3>> pq;

        // cout << "SOL" << endl;

        pq.push({0, 0, 0});
        while(!pq.empty()){
            int nt = -pq.top()[0], id = pq.top()[1], type = pq.top()[2];
            pq.pop();

            if(!type){
                if(chk[id] != -1) continue;
                chk[id] = nt;

                for(auto&[lid, mec]:toline[id]){
                    int p = lower_bound(linecoord[lid].begin(), linecoord[lid].end(), mec - nt + 1) - linecoord[lid].begin() - 1;
                    if(p >= 0){
                        pq.push({-(mec - linecoord[lid][p]), lineid[lid][p], 1});
                    }
                }
            }
            else{
                if(chk2[id] != -1) continue;
                chk2[id] = nt;

                // cout << id << ' ' << gr[id].ton << endl;

                pq.push({-nt, gr[id].ton, 0});
                if(gr[id].nxt != -1){
                    // cout << id << ' ' << gr[id].nxt << endl;

                    pq.push({-(nt + gr[id].nxtdist), gr[id].nxt, 1});
                }
            }
        }

        int nans = 0;
        for(int i = 0; i < n; ++i){
            // cout << i << ' ' << chk[i] << endl;
            if(chk[i] != -1){
                ++nans;
            }
        }

        ans = max(ans, nans);
    };

    for(int rep = 0; rep < 4; ++rep){
        a[0][2] = 0;

        for(int i = 1; i < n; ++i){
            int pi = a[i][0] + a[i][1], mi = a[i][0] - a[i][1];
            int pz = a[0][0] + a[0][1], mz = a[0][0] - a[0][1];
            if(pi == pz){
                a[i][2] = a[i][0] > a[0][0] ? 0 : 1;
            }
            else if(mi == mz){
                a[i][2] = a[i][0] > a[0][0] ? 3 : 0;
            }
            else if(pi > pz && mi < mz){
                a[i][2] = 2;
            }
            else if(pi < pz && mi > mz){
                a[i][2] = 0;
            }
            else{
                a[i][2] = pi > pz ? 3 : 1;
            }
        }

        makeway();

        sol();

        for(int i = 0; i < n; ++i){
            rot(a[i]);
        }
    }

    cout << ans << '\n';
    
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 96 ms 143508 KB Output is correct
2 Correct 106 ms 143516 KB Output is correct
3 Correct 101 ms 143556 KB Output is correct
4 Correct 99 ms 143436 KB Output is correct
5 Correct 97 ms 143532 KB Output is correct
6 Correct 97 ms 143436 KB Output is correct
7 Correct 97 ms 143436 KB Output is correct
8 Correct 109 ms 143544 KB Output is correct
9 Correct 113 ms 143520 KB Output is correct
10 Correct 97 ms 143428 KB Output is correct
11 Correct 98 ms 143552 KB Output is correct
12 Correct 100 ms 143548 KB Output is correct
13 Correct 101 ms 143472 KB Output is correct
14 Correct 96 ms 143536 KB Output is correct
15 Correct 99 ms 143556 KB Output is correct
16 Correct 104 ms 143480 KB Output is correct
17 Correct 100 ms 143548 KB Output is correct
18 Correct 98 ms 143652 KB Output is correct
19 Correct 98 ms 143556 KB Output is correct
20 Correct 100 ms 143560 KB Output is correct
21 Correct 114 ms 143544 KB Output is correct
22 Correct 99 ms 143548 KB Output is correct
23 Correct 104 ms 143676 KB Output is correct
24 Correct 97 ms 143552 KB Output is correct
25 Correct 107 ms 143552 KB Output is correct
26 Correct 98 ms 143548 KB Output is correct
27 Correct 110 ms 143540 KB Output is correct
28 Correct 111 ms 143672 KB Output is correct
29 Correct 101 ms 143504 KB Output is correct
30 Correct 98 ms 143548 KB Output is correct
31 Correct 98 ms 143472 KB Output is correct
32 Correct 100 ms 143552 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 96 ms 143508 KB Output is correct
2 Correct 106 ms 143516 KB Output is correct
3 Correct 101 ms 143556 KB Output is correct
4 Correct 99 ms 143436 KB Output is correct
5 Correct 97 ms 143532 KB Output is correct
6 Correct 97 ms 143436 KB Output is correct
7 Correct 97 ms 143436 KB Output is correct
8 Correct 109 ms 143544 KB Output is correct
9 Correct 113 ms 143520 KB Output is correct
10 Correct 97 ms 143428 KB Output is correct
11 Correct 98 ms 143552 KB Output is correct
12 Correct 100 ms 143548 KB Output is correct
13 Correct 101 ms 143472 KB Output is correct
14 Correct 96 ms 143536 KB Output is correct
15 Correct 99 ms 143556 KB Output is correct
16 Correct 104 ms 143480 KB Output is correct
17 Correct 100 ms 143548 KB Output is correct
18 Correct 98 ms 143652 KB Output is correct
19 Correct 98 ms 143556 KB Output is correct
20 Correct 100 ms 143560 KB Output is correct
21 Correct 114 ms 143544 KB Output is correct
22 Correct 99 ms 143548 KB Output is correct
23 Correct 104 ms 143676 KB Output is correct
24 Correct 97 ms 143552 KB Output is correct
25 Correct 107 ms 143552 KB Output is correct
26 Correct 98 ms 143548 KB Output is correct
27 Correct 110 ms 143540 KB Output is correct
28 Correct 111 ms 143672 KB Output is correct
29 Correct 101 ms 143504 KB Output is correct
30 Correct 98 ms 143548 KB Output is correct
31 Correct 98 ms 143472 KB Output is correct
32 Correct 100 ms 143552 KB Output is correct
33 Correct 104 ms 143648 KB Output is correct
34 Correct 111 ms 143572 KB Output is correct
35 Correct 100 ms 143568 KB Output is correct
36 Correct 99 ms 143476 KB Output is correct
37 Correct 96 ms 143464 KB Output is correct
38 Correct 100 ms 143592 KB Output is correct
39 Correct 97 ms 143544 KB Output is correct
40 Correct 100 ms 143544 KB Output is correct
41 Correct 103 ms 143448 KB Output is correct
42 Correct 99 ms 143556 KB Output is correct
43 Correct 101 ms 143556 KB Output is correct
44 Correct 99 ms 143564 KB Output is correct
45 Correct 102 ms 143544 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 101 ms 143640 KB Output is correct
2 Correct 99 ms 143588 KB Output is correct
3 Correct 106 ms 143544 KB Output is correct
4 Correct 112 ms 143640 KB Output is correct
5 Correct 111 ms 143712 KB Output is correct
6 Correct 100 ms 143552 KB Output is correct
7 Correct 100 ms 143564 KB Output is correct
8 Correct 99 ms 143636 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 96 ms 143508 KB Output is correct
2 Correct 106 ms 143516 KB Output is correct
3 Correct 101 ms 143556 KB Output is correct
4 Correct 99 ms 143436 KB Output is correct
5 Correct 97 ms 143532 KB Output is correct
6 Correct 97 ms 143436 KB Output is correct
7 Correct 97 ms 143436 KB Output is correct
8 Correct 109 ms 143544 KB Output is correct
9 Correct 113 ms 143520 KB Output is correct
10 Correct 97 ms 143428 KB Output is correct
11 Correct 98 ms 143552 KB Output is correct
12 Correct 100 ms 143548 KB Output is correct
13 Correct 101 ms 143472 KB Output is correct
14 Correct 96 ms 143536 KB Output is correct
15 Correct 99 ms 143556 KB Output is correct
16 Correct 104 ms 143480 KB Output is correct
17 Correct 100 ms 143548 KB Output is correct
18 Correct 98 ms 143652 KB Output is correct
19 Correct 98 ms 143556 KB Output is correct
20 Correct 100 ms 143560 KB Output is correct
21 Correct 114 ms 143544 KB Output is correct
22 Correct 99 ms 143548 KB Output is correct
23 Correct 104 ms 143676 KB Output is correct
24 Correct 97 ms 143552 KB Output is correct
25 Correct 107 ms 143552 KB Output is correct
26 Correct 98 ms 143548 KB Output is correct
27 Correct 110 ms 143540 KB Output is correct
28 Correct 111 ms 143672 KB Output is correct
29 Correct 101 ms 143504 KB Output is correct
30 Correct 98 ms 143548 KB Output is correct
31 Correct 98 ms 143472 KB Output is correct
32 Correct 100 ms 143552 KB Output is correct
33 Correct 104 ms 143648 KB Output is correct
34 Correct 111 ms 143572 KB Output is correct
35 Correct 100 ms 143568 KB Output is correct
36 Correct 99 ms 143476 KB Output is correct
37 Correct 96 ms 143464 KB Output is correct
38 Correct 100 ms 143592 KB Output is correct
39 Correct 97 ms 143544 KB Output is correct
40 Correct 100 ms 143544 KB Output is correct
41 Correct 103 ms 143448 KB Output is correct
42 Correct 99 ms 143556 KB Output is correct
43 Correct 101 ms 143556 KB Output is correct
44 Correct 99 ms 143564 KB Output is correct
45 Correct 102 ms 143544 KB Output is correct
46 Correct 101 ms 143640 KB Output is correct
47 Correct 99 ms 143588 KB Output is correct
48 Correct 106 ms 143544 KB Output is correct
49 Correct 112 ms 143640 KB Output is correct
50 Correct 111 ms 143712 KB Output is correct
51 Correct 100 ms 143552 KB Output is correct
52 Correct 100 ms 143564 KB Output is correct
53 Correct 99 ms 143636 KB Output is correct
54 Correct 97 ms 143544 KB Output is correct
55 Correct 101 ms 143644 KB Output is correct
56 Correct 100 ms 143672 KB Output is correct
57 Correct 99 ms 143628 KB Output is correct
58 Correct 102 ms 143644 KB Output is correct
59 Correct 100 ms 143644 KB Output is correct
60 Correct 99 ms 143632 KB Output is correct
61 Correct 113 ms 143588 KB Output is correct
62 Correct 96 ms 143656 KB Output is correct
63 Correct 97 ms 143548 KB Output is correct
64 Correct 102 ms 143640 KB Output is correct
65 Correct 96 ms 143644 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 96 ms 143508 KB Output is correct
2 Correct 106 ms 143516 KB Output is correct
3 Correct 101 ms 143556 KB Output is correct
4 Correct 99 ms 143436 KB Output is correct
5 Correct 97 ms 143532 KB Output is correct
6 Correct 97 ms 143436 KB Output is correct
7 Correct 97 ms 143436 KB Output is correct
8 Correct 109 ms 143544 KB Output is correct
9 Correct 113 ms 143520 KB Output is correct
10 Correct 97 ms 143428 KB Output is correct
11 Correct 98 ms 143552 KB Output is correct
12 Correct 100 ms 143548 KB Output is correct
13 Correct 101 ms 143472 KB Output is correct
14 Correct 96 ms 143536 KB Output is correct
15 Correct 99 ms 143556 KB Output is correct
16 Correct 104 ms 143480 KB Output is correct
17 Correct 100 ms 143548 KB Output is correct
18 Correct 98 ms 143652 KB Output is correct
19 Correct 98 ms 143556 KB Output is correct
20 Correct 100 ms 143560 KB Output is correct
21 Correct 114 ms 143544 KB Output is correct
22 Correct 99 ms 143548 KB Output is correct
23 Correct 104 ms 143676 KB Output is correct
24 Correct 97 ms 143552 KB Output is correct
25 Correct 107 ms 143552 KB Output is correct
26 Correct 98 ms 143548 KB Output is correct
27 Correct 110 ms 143540 KB Output is correct
28 Correct 111 ms 143672 KB Output is correct
29 Correct 101 ms 143504 KB Output is correct
30 Correct 98 ms 143548 KB Output is correct
31 Correct 98 ms 143472 KB Output is correct
32 Correct 100 ms 143552 KB Output is correct
33 Correct 104 ms 143648 KB Output is correct
34 Correct 111 ms 143572 KB Output is correct
35 Correct 100 ms 143568 KB Output is correct
36 Correct 99 ms 143476 KB Output is correct
37 Correct 96 ms 143464 KB Output is correct
38 Correct 100 ms 143592 KB Output is correct
39 Correct 97 ms 143544 KB Output is correct
40 Correct 100 ms 143544 KB Output is correct
41 Correct 103 ms 143448 KB Output is correct
42 Correct 99 ms 143556 KB Output is correct
43 Correct 101 ms 143556 KB Output is correct
44 Correct 99 ms 143564 KB Output is correct
45 Correct 102 ms 143544 KB Output is correct
46 Correct 101 ms 143640 KB Output is correct
47 Correct 99 ms 143588 KB Output is correct
48 Correct 106 ms 143544 KB Output is correct
49 Correct 112 ms 143640 KB Output is correct
50 Correct 111 ms 143712 KB Output is correct
51 Correct 100 ms 143552 KB Output is correct
52 Correct 100 ms 143564 KB Output is correct
53 Correct 99 ms 143636 KB Output is correct
54 Correct 97 ms 143544 KB Output is correct
55 Correct 101 ms 143644 KB Output is correct
56 Correct 100 ms 143672 KB Output is correct
57 Correct 99 ms 143628 KB Output is correct
58 Correct 102 ms 143644 KB Output is correct
59 Correct 100 ms 143644 KB Output is correct
60 Correct 99 ms 143632 KB Output is correct
61 Correct 113 ms 143588 KB Output is correct
62 Correct 96 ms 143656 KB Output is correct
63 Correct 97 ms 143548 KB Output is correct
64 Correct 102 ms 143640 KB Output is correct
65 Correct 96 ms 143644 KB Output is correct
66 Correct 117 ms 145808 KB Output is correct
67 Correct 113 ms 145860 KB Output is correct
68 Correct 120 ms 146696 KB Output is correct
69 Correct 126 ms 144284 KB Output is correct
70 Correct 119 ms 144480 KB Output is correct
71 Correct 118 ms 144728 KB Output is correct
72 Correct 136 ms 145644 KB Output is correct
73 Correct 119 ms 146740 KB Output is correct
74 Correct 109 ms 145468 KB Output is correct
75 Correct 109 ms 145604 KB Output is correct
76 Correct 134 ms 145992 KB Output is correct
77 Correct 125 ms 145648 KB Output is correct
78 Correct 123 ms 145980 KB Output is correct
79 Correct 122 ms 145916 KB Output is correct
80 Correct 134 ms 146780 KB Output is correct
81 Correct 119 ms 146024 KB Output is correct
82 Correct 128 ms 145960 KB Output is correct
83 Correct 127 ms 145928 KB Output is correct
84 Correct 124 ms 145088 KB Output is correct
85 Correct 120 ms 144360 KB Output is correct
86 Correct 124 ms 144288 KB Output is correct
87 Correct 117 ms 144600 KB Output is correct
88 Correct 122 ms 145576 KB Output is correct
89 Correct 121 ms 145820 KB Output is correct
90 Correct 115 ms 145720 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 96 ms 143508 KB Output is correct
2 Correct 106 ms 143516 KB Output is correct
3 Correct 101 ms 143556 KB Output is correct
4 Correct 99 ms 143436 KB Output is correct
5 Correct 97 ms 143532 KB Output is correct
6 Correct 97 ms 143436 KB Output is correct
7 Correct 97 ms 143436 KB Output is correct
8 Correct 109 ms 143544 KB Output is correct
9 Correct 113 ms 143520 KB Output is correct
10 Correct 97 ms 143428 KB Output is correct
11 Correct 98 ms 143552 KB Output is correct
12 Correct 100 ms 143548 KB Output is correct
13 Correct 101 ms 143472 KB Output is correct
14 Correct 96 ms 143536 KB Output is correct
15 Correct 99 ms 143556 KB Output is correct
16 Correct 104 ms 143480 KB Output is correct
17 Correct 100 ms 143548 KB Output is correct
18 Correct 98 ms 143652 KB Output is correct
19 Correct 98 ms 143556 KB Output is correct
20 Correct 100 ms 143560 KB Output is correct
21 Correct 114 ms 143544 KB Output is correct
22 Correct 99 ms 143548 KB Output is correct
23 Correct 104 ms 143676 KB Output is correct
24 Correct 97 ms 143552 KB Output is correct
25 Correct 107 ms 143552 KB Output is correct
26 Correct 98 ms 143548 KB Output is correct
27 Correct 110 ms 143540 KB Output is correct
28 Correct 111 ms 143672 KB Output is correct
29 Correct 101 ms 143504 KB Output is correct
30 Correct 98 ms 143548 KB Output is correct
31 Correct 98 ms 143472 KB Output is correct
32 Correct 100 ms 143552 KB Output is correct
33 Correct 104 ms 143648 KB Output is correct
34 Correct 111 ms 143572 KB Output is correct
35 Correct 100 ms 143568 KB Output is correct
36 Correct 99 ms 143476 KB Output is correct
37 Correct 96 ms 143464 KB Output is correct
38 Correct 100 ms 143592 KB Output is correct
39 Correct 97 ms 143544 KB Output is correct
40 Correct 100 ms 143544 KB Output is correct
41 Correct 103 ms 143448 KB Output is correct
42 Correct 99 ms 143556 KB Output is correct
43 Correct 101 ms 143556 KB Output is correct
44 Correct 99 ms 143564 KB Output is correct
45 Correct 102 ms 143544 KB Output is correct
46 Correct 101 ms 143640 KB Output is correct
47 Correct 99 ms 143588 KB Output is correct
48 Correct 106 ms 143544 KB Output is correct
49 Correct 112 ms 143640 KB Output is correct
50 Correct 111 ms 143712 KB Output is correct
51 Correct 100 ms 143552 KB Output is correct
52 Correct 100 ms 143564 KB Output is correct
53 Correct 99 ms 143636 KB Output is correct
54 Correct 97 ms 143544 KB Output is correct
55 Correct 101 ms 143644 KB Output is correct
56 Correct 100 ms 143672 KB Output is correct
57 Correct 99 ms 143628 KB Output is correct
58 Correct 102 ms 143644 KB Output is correct
59 Correct 100 ms 143644 KB Output is correct
60 Correct 99 ms 143632 KB Output is correct
61 Correct 113 ms 143588 KB Output is correct
62 Correct 96 ms 143656 KB Output is correct
63 Correct 97 ms 143548 KB Output is correct
64 Correct 102 ms 143640 KB Output is correct
65 Correct 96 ms 143644 KB Output is correct
66 Correct 982 ms 208168 KB Output is correct
67 Correct 1160 ms 222088 KB Output is correct
68 Correct 1200 ms 243620 KB Output is correct
69 Correct 607 ms 211392 KB Output is correct
70 Correct 651 ms 209340 KB Output is correct
71 Correct 1210 ms 246136 KB Output is correct
72 Correct 1152 ms 245084 KB Output is correct
73 Correct 956 ms 210140 KB Output is correct
74 Correct 1213 ms 245836 KB Output is correct
75 Correct 1129 ms 245380 KB Output is correct
76 Correct 863 ms 209456 KB Output is correct
77 Correct 1241 ms 245920 KB Output is correct
78 Correct 1078 ms 218580 KB Output is correct
79 Correct 1091 ms 218696 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 96 ms 143508 KB Output is correct
2 Correct 106 ms 143516 KB Output is correct
3 Correct 101 ms 143556 KB Output is correct
4 Correct 99 ms 143436 KB Output is correct
5 Correct 97 ms 143532 KB Output is correct
6 Correct 97 ms 143436 KB Output is correct
7 Correct 97 ms 143436 KB Output is correct
8 Correct 109 ms 143544 KB Output is correct
9 Correct 113 ms 143520 KB Output is correct
10 Correct 97 ms 143428 KB Output is correct
11 Correct 98 ms 143552 KB Output is correct
12 Correct 100 ms 143548 KB Output is correct
13 Correct 101 ms 143472 KB Output is correct
14 Correct 96 ms 143536 KB Output is correct
15 Correct 99 ms 143556 KB Output is correct
16 Correct 104 ms 143480 KB Output is correct
17 Correct 100 ms 143548 KB Output is correct
18 Correct 98 ms 143652 KB Output is correct
19 Correct 98 ms 143556 KB Output is correct
20 Correct 100 ms 143560 KB Output is correct
21 Correct 114 ms 143544 KB Output is correct
22 Correct 99 ms 143548 KB Output is correct
23 Correct 104 ms 143676 KB Output is correct
24 Correct 97 ms 143552 KB Output is correct
25 Correct 107 ms 143552 KB Output is correct
26 Correct 98 ms 143548 KB Output is correct
27 Correct 110 ms 143540 KB Output is correct
28 Correct 111 ms 143672 KB Output is correct
29 Correct 101 ms 143504 KB Output is correct
30 Correct 98 ms 143548 KB Output is correct
31 Correct 98 ms 143472 KB Output is correct
32 Correct 100 ms 143552 KB Output is correct
33 Correct 104 ms 143648 KB Output is correct
34 Correct 111 ms 143572 KB Output is correct
35 Correct 100 ms 143568 KB Output is correct
36 Correct 99 ms 143476 KB Output is correct
37 Correct 96 ms 143464 KB Output is correct
38 Correct 100 ms 143592 KB Output is correct
39 Correct 97 ms 143544 KB Output is correct
40 Correct 100 ms 143544 KB Output is correct
41 Correct 103 ms 143448 KB Output is correct
42 Correct 99 ms 143556 KB Output is correct
43 Correct 101 ms 143556 KB Output is correct
44 Correct 99 ms 143564 KB Output is correct
45 Correct 102 ms 143544 KB Output is correct
46 Correct 101 ms 143640 KB Output is correct
47 Correct 99 ms 143588 KB Output is correct
48 Correct 106 ms 143544 KB Output is correct
49 Correct 112 ms 143640 KB Output is correct
50 Correct 111 ms 143712 KB Output is correct
51 Correct 100 ms 143552 KB Output is correct
52 Correct 100 ms 143564 KB Output is correct
53 Correct 99 ms 143636 KB Output is correct
54 Correct 97 ms 143544 KB Output is correct
55 Correct 101 ms 143644 KB Output is correct
56 Correct 100 ms 143672 KB Output is correct
57 Correct 99 ms 143628 KB Output is correct
58 Correct 102 ms 143644 KB Output is correct
59 Correct 100 ms 143644 KB Output is correct
60 Correct 99 ms 143632 KB Output is correct
61 Correct 113 ms 143588 KB Output is correct
62 Correct 96 ms 143656 KB Output is correct
63 Correct 97 ms 143548 KB Output is correct
64 Correct 102 ms 143640 KB Output is correct
65 Correct 96 ms 143644 KB Output is correct
66 Correct 117 ms 145808 KB Output is correct
67 Correct 113 ms 145860 KB Output is correct
68 Correct 120 ms 146696 KB Output is correct
69 Correct 126 ms 144284 KB Output is correct
70 Correct 119 ms 144480 KB Output is correct
71 Correct 118 ms 144728 KB Output is correct
72 Correct 136 ms 145644 KB Output is correct
73 Correct 119 ms 146740 KB Output is correct
74 Correct 109 ms 145468 KB Output is correct
75 Correct 109 ms 145604 KB Output is correct
76 Correct 134 ms 145992 KB Output is correct
77 Correct 125 ms 145648 KB Output is correct
78 Correct 123 ms 145980 KB Output is correct
79 Correct 122 ms 145916 KB Output is correct
80 Correct 134 ms 146780 KB Output is correct
81 Correct 119 ms 146024 KB Output is correct
82 Correct 128 ms 145960 KB Output is correct
83 Correct 127 ms 145928 KB Output is correct
84 Correct 124 ms 145088 KB Output is correct
85 Correct 120 ms 144360 KB Output is correct
86 Correct 124 ms 144288 KB Output is correct
87 Correct 117 ms 144600 KB Output is correct
88 Correct 122 ms 145576 KB Output is correct
89 Correct 121 ms 145820 KB Output is correct
90 Correct 115 ms 145720 KB Output is correct
91 Correct 982 ms 208168 KB Output is correct
92 Correct 1160 ms 222088 KB Output is correct
93 Correct 1200 ms 243620 KB Output is correct
94 Correct 607 ms 211392 KB Output is correct
95 Correct 651 ms 209340 KB Output is correct
96 Correct 1210 ms 246136 KB Output is correct
97 Correct 1152 ms 245084 KB Output is correct
98 Correct 956 ms 210140 KB Output is correct
99 Correct 1213 ms 245836 KB Output is correct
100 Correct 1129 ms 245380 KB Output is correct
101 Correct 863 ms 209456 KB Output is correct
102 Correct 1241 ms 245920 KB Output is correct
103 Correct 1078 ms 218580 KB Output is correct
104 Correct 1091 ms 218696 KB Output is correct
105 Correct 854 ms 159876 KB Output is correct
106 Correct 1081 ms 164404 KB Output is correct
107 Correct 1495 ms 165108 KB Output is correct
108 Correct 1345 ms 166412 KB Output is correct
109 Correct 1054 ms 175132 KB Output is correct
110 Correct 1242 ms 214648 KB Output is correct
111 Correct 1219 ms 244336 KB Output is correct
112 Correct 1327 ms 247412 KB Output is correct
113 Correct 1264 ms 247324 KB Output is correct
114 Correct 1253 ms 188356 KB Output is correct
115 Correct 1008 ms 211700 KB Output is correct
116 Correct 1337 ms 247448 KB Output is correct
117 Correct 1282 ms 248140 KB Output is correct
118 Correct 1339 ms 204148 KB Output is correct
119 Correct 1145 ms 211352 KB Output is correct
120 Correct 1342 ms 247236 KB Output is correct
121 Correct 1341 ms 248496 KB Output is correct
122 Correct 1364 ms 250040 KB Output is correct
123 Correct 698 ms 220340 KB Output is correct
124 Correct 741 ms 222984 KB Output is correct
125 Correct 620 ms 191184 KB Output is correct
126 Correct 667 ms 169624 KB Output is correct
127 Correct 707 ms 165236 KB Output is correct
128 Correct 695 ms 165740 KB Output is correct
129 Correct 585 ms 177572 KB Output is correct