Submission #751610

# Submission time Handle Problem Language Result Execution time Memory
751610 2023-06-01T01:11:04 Z lohacho From Hacks to Snitches (BOI21_watchmen) C++14
100 / 100
5717 ms 240596 KB
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#define mi(x, y) (x = min(x, y))
#define ma(x, y) (x = max(x, y))
using namespace std;

const int NS = 250004;

int n, m;
vector<int> way[NS];
vector<int> dp[NS];
int len[NS], fir[NS], col[NS];

struct Data{
    int x, t;
    Data(){}
    Data(int x, int t):x(x), t(t){}
    bool operator<(const Data&r)const{
        return t > r.t;
    }
};

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

    cin >> n >> m;
    for(int i = 0; i < m; ++i){
        int x, y;
        cin >> x >> y;
        --x, --y;
        way[x].push_back(y);
        way[y].push_back(x);
    }

    int k;
    cin >> k;
    for(int i = 0; i < k; ++i){
        int x;
        cin >> x;
        for(int j = 0; j < x; ++j){
            int y;
            cin >> y;
            --y;
            dp[y] = vector<int>(x, (int)1e9);
            len[y] = x;
            col[y] = i + 1;
            fir[y] = j;
        }
    }

    for(int i = 0; i < n; ++i){
        if(!(int)dp[i].size()){
            dp[i] = {(int)1e9};
        }
    }

    priority_queue<Data> pq;

    auto enq = [&](int x, int t){
        int md = (col[x] ? t % len[x] : 0);
        if((!col[x] || md != fir[x]) && t < dp[x][md]){
            pq.push(Data(x, t));
        }
    };

    auto gett = [&](int x, int t){
        if(t <= fir[x]) return fir[x];
        return ((t - fir[x] - 1) / len[x] + 1) * len[x] + fir[x];
    };

    enq(0, 0);
    while(!pq.empty()){
        int now = pq.top().x;
        int nt = pq.top().t;
        pq.pop();

        int md = (col[now] ? nt % len[now] : 0);
        if(dp[now][md] == nt){
            continue;
        }
        if(now == n - 1){
            cout << nt << '\n';
            return 0;
        }
        //cout << now + 1 << ' ' << nt << endl;

        dp[now][md] = nt;
        enq(now, nt + 1);
        for(int i = 0; i < (int)way[now].size(); ++i){
            int nxt = way[now][i];
            int f = 0;
            if(!col[now] || !(col[now] == col[nxt] && fir[now] == (fir[nxt] + 1) % len[now] && fir[nxt] == nt % len[now])){
                enq(nxt, nt + 1);
            }
            if((!col[now] && col[nxt]) || (col[now] && col[now] == col[nxt] && fir[now] != (fir[nxt] + 1) % len[now] && fir[nxt] != (fir[now] + 1) % len[nxt])){
                enq(nxt, gett(nxt, nt) + 1); f = 1;
            }
            if(col[now] && col[nxt] && col[now] != col[nxt]){
                int t2 = gett(nxt, nt);
                int t1 = gett(now, t2);
                if(t1 != t2){
                    enq(nxt, t2 + 1);
                    f = 1;
                }
                else{
                    int t3 = t1 + (len[now] * 2 - fir[now] + md) % len[now];
                    int t4 = gett(nxt, t3);
                    enq(nxt, t3 + 1);
                    if(gett(now, t4) != t4){
                        enq(nxt, t4 + 1);
                    }
                }
            }

            if(!col[now] || !col[nxt] || f){
                swap(way[now][i], way[now].back());
                way[now].pop_back();
                --i;
            }
        }
    }

    cout << "impossible\n";

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 30 ms 15284 KB Output is correct
2 Correct 82 ms 19324 KB Output is correct
3 Correct 77 ms 19888 KB Output is correct
4 Correct 75 ms 20456 KB Output is correct
5 Correct 8 ms 12152 KB Output is correct
6 Correct 69 ms 19900 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 24 ms 15300 KB Output is correct
2 Correct 73 ms 19308 KB Output is correct
3 Correct 80 ms 19884 KB Output is correct
4 Correct 93 ms 20476 KB Output is correct
5 Correct 8 ms 12116 KB Output is correct
6 Correct 66 ms 19804 KB Output is correct
7 Correct 60 ms 19788 KB Output is correct
8 Correct 61 ms 19792 KB Output is correct
9 Correct 69 ms 19872 KB Output is correct
10 Correct 78 ms 20172 KB Output is correct
11 Correct 74 ms 20080 KB Output is correct
12 Correct 65 ms 19772 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 24 ms 15300 KB Output is correct
2 Correct 73 ms 19308 KB Output is correct
3 Correct 80 ms 19884 KB Output is correct
4 Correct 93 ms 20476 KB Output is correct
5 Correct 8 ms 12116 KB Output is correct
6 Correct 66 ms 19804 KB Output is correct
7 Correct 60 ms 19788 KB Output is correct
8 Correct 61 ms 19792 KB Output is correct
9 Correct 69 ms 19872 KB Output is correct
10 Correct 78 ms 20172 KB Output is correct
11 Correct 74 ms 20080 KB Output is correct
12 Correct 65 ms 19772 KB Output is correct
13 Correct 23 ms 15736 KB Output is correct
14 Correct 67 ms 20300 KB Output is correct
15 Correct 73 ms 19916 KB Output is correct
16 Correct 83 ms 20420 KB Output is correct
17 Correct 9 ms 12116 KB Output is correct
18 Correct 75 ms 19788 KB Output is correct
19 Correct 74 ms 19816 KB Output is correct
20 Correct 78 ms 19872 KB Output is correct
21 Correct 76 ms 19932 KB Output is correct
22 Correct 81 ms 20148 KB Output is correct
23 Correct 82 ms 20136 KB Output is correct
24 Correct 73 ms 19812 KB Output is correct
25 Correct 2275 ms 94716 KB Output is correct
26 Correct 2036 ms 99544 KB Output is correct
27 Correct 1751 ms 95596 KB Output is correct
28 Correct 1469 ms 99760 KB Output is correct
29 Correct 2915 ms 122232 KB Output is correct
30 Correct 2964 ms 162552 KB Output is correct
31 Correct 2303 ms 136108 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 24 ms 15300 KB Output is correct
2 Correct 73 ms 19308 KB Output is correct
3 Correct 80 ms 19884 KB Output is correct
4 Correct 93 ms 20476 KB Output is correct
5 Correct 8 ms 12116 KB Output is correct
6 Correct 66 ms 19804 KB Output is correct
7 Correct 60 ms 19788 KB Output is correct
8 Correct 61 ms 19792 KB Output is correct
9 Correct 69 ms 19872 KB Output is correct
10 Correct 78 ms 20172 KB Output is correct
11 Correct 74 ms 20080 KB Output is correct
12 Correct 65 ms 19772 KB Output is correct
13 Correct 23 ms 15736 KB Output is correct
14 Correct 67 ms 20300 KB Output is correct
15 Correct 73 ms 19916 KB Output is correct
16 Correct 83 ms 20420 KB Output is correct
17 Correct 9 ms 12116 KB Output is correct
18 Correct 75 ms 19788 KB Output is correct
19 Correct 74 ms 19816 KB Output is correct
20 Correct 78 ms 19872 KB Output is correct
21 Correct 76 ms 19932 KB Output is correct
22 Correct 81 ms 20148 KB Output is correct
23 Correct 82 ms 20136 KB Output is correct
24 Correct 73 ms 19812 KB Output is correct
25 Correct 2275 ms 94716 KB Output is correct
26 Correct 2036 ms 99544 KB Output is correct
27 Correct 1751 ms 95596 KB Output is correct
28 Correct 1469 ms 99760 KB Output is correct
29 Correct 2915 ms 122232 KB Output is correct
30 Correct 2964 ms 162552 KB Output is correct
31 Correct 2303 ms 136108 KB Output is correct
32 Correct 23 ms 15752 KB Output is correct
33 Correct 71 ms 20352 KB Output is correct
34 Correct 83 ms 19916 KB Output is correct
35 Correct 84 ms 20460 KB Output is correct
36 Correct 11 ms 12068 KB Output is correct
37 Correct 93 ms 19892 KB Output is correct
38 Correct 70 ms 19992 KB Output is correct
39 Correct 69 ms 19792 KB Output is correct
40 Correct 87 ms 19944 KB Output is correct
41 Correct 81 ms 20056 KB Output is correct
42 Correct 79 ms 20044 KB Output is correct
43 Correct 63 ms 19852 KB Output is correct
44 Correct 2353 ms 132088 KB Output is correct
45 Correct 2130 ms 137020 KB Output is correct
46 Correct 1875 ms 133020 KB Output is correct
47 Correct 1621 ms 137196 KB Output is correct
48 Correct 3057 ms 160032 KB Output is correct
49 Correct 2943 ms 162520 KB Output is correct
50 Correct 2249 ms 136176 KB Output is correct
51 Correct 3180 ms 141884 KB Output is correct
52 Correct 3472 ms 152584 KB Output is correct
53 Correct 2725 ms 142660 KB Output is correct
54 Correct 1412 ms 129292 KB Output is correct
55 Correct 4630 ms 240596 KB Output is correct
56 Correct 4623 ms 232948 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 30 ms 15284 KB Output is correct
2 Correct 82 ms 19324 KB Output is correct
3 Correct 77 ms 19888 KB Output is correct
4 Correct 75 ms 20456 KB Output is correct
5 Correct 8 ms 12152 KB Output is correct
6 Correct 69 ms 19900 KB Output is correct
7 Correct 24 ms 15300 KB Output is correct
8 Correct 73 ms 19308 KB Output is correct
9 Correct 80 ms 19884 KB Output is correct
10 Correct 93 ms 20476 KB Output is correct
11 Correct 8 ms 12116 KB Output is correct
12 Correct 66 ms 19804 KB Output is correct
13 Correct 60 ms 19788 KB Output is correct
14 Correct 61 ms 19792 KB Output is correct
15 Correct 69 ms 19872 KB Output is correct
16 Correct 78 ms 20172 KB Output is correct
17 Correct 74 ms 20080 KB Output is correct
18 Correct 65 ms 19772 KB Output is correct
19 Correct 6 ms 11988 KB Output is correct
20 Correct 6 ms 11984 KB Output is correct
21 Correct 9 ms 11964 KB Output is correct
22 Correct 24 ms 15720 KB Output is correct
23 Correct 67 ms 20296 KB Output is correct
24 Correct 66 ms 19916 KB Output is correct
25 Correct 102 ms 20532 KB Output is correct
26 Correct 8 ms 12072 KB Output is correct
27 Correct 72 ms 19908 KB Output is correct
28 Correct 66 ms 19852 KB Output is correct
29 Correct 88 ms 19788 KB Output is correct
30 Correct 77 ms 19908 KB Output is correct
31 Correct 70 ms 20164 KB Output is correct
32 Correct 64 ms 20056 KB Output is correct
33 Correct 60 ms 19788 KB Output is correct
34 Correct 2208 ms 94328 KB Output is correct
35 Correct 2285 ms 90864 KB Output is correct
36 Correct 2404 ms 90844 KB Output is correct
37 Correct 2025 ms 134032 KB Output is correct
38 Correct 2239 ms 131560 KB Output is correct
39 Correct 2878 ms 160216 KB Output is correct
40 Correct 2805 ms 159920 KB Output is correct
41 Correct 2632 ms 160120 KB Output is correct
42 Correct 2104 ms 131620 KB Output is correct
43 Correct 2374 ms 134712 KB Output is correct
44 Correct 2276 ms 134680 KB Output is correct
45 Correct 2375 ms 130388 KB Output is correct
46 Correct 2197 ms 129436 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 30 ms 15284 KB Output is correct
2 Correct 82 ms 19324 KB Output is correct
3 Correct 77 ms 19888 KB Output is correct
4 Correct 75 ms 20456 KB Output is correct
5 Correct 8 ms 12152 KB Output is correct
6 Correct 69 ms 19900 KB Output is correct
7 Correct 24 ms 15300 KB Output is correct
8 Correct 73 ms 19308 KB Output is correct
9 Correct 80 ms 19884 KB Output is correct
10 Correct 93 ms 20476 KB Output is correct
11 Correct 8 ms 12116 KB Output is correct
12 Correct 66 ms 19804 KB Output is correct
13 Correct 60 ms 19788 KB Output is correct
14 Correct 61 ms 19792 KB Output is correct
15 Correct 69 ms 19872 KB Output is correct
16 Correct 78 ms 20172 KB Output is correct
17 Correct 74 ms 20080 KB Output is correct
18 Correct 65 ms 19772 KB Output is correct
19 Correct 23 ms 15736 KB Output is correct
20 Correct 67 ms 20300 KB Output is correct
21 Correct 73 ms 19916 KB Output is correct
22 Correct 83 ms 20420 KB Output is correct
23 Correct 9 ms 12116 KB Output is correct
24 Correct 75 ms 19788 KB Output is correct
25 Correct 74 ms 19816 KB Output is correct
26 Correct 78 ms 19872 KB Output is correct
27 Correct 76 ms 19932 KB Output is correct
28 Correct 81 ms 20148 KB Output is correct
29 Correct 82 ms 20136 KB Output is correct
30 Correct 73 ms 19812 KB Output is correct
31 Correct 2275 ms 94716 KB Output is correct
32 Correct 2036 ms 99544 KB Output is correct
33 Correct 1751 ms 95596 KB Output is correct
34 Correct 1469 ms 99760 KB Output is correct
35 Correct 2915 ms 122232 KB Output is correct
36 Correct 2964 ms 162552 KB Output is correct
37 Correct 2303 ms 136108 KB Output is correct
38 Correct 6 ms 11988 KB Output is correct
39 Correct 6 ms 11984 KB Output is correct
40 Correct 9 ms 11964 KB Output is correct
41 Correct 24 ms 15720 KB Output is correct
42 Correct 67 ms 20296 KB Output is correct
43 Correct 66 ms 19916 KB Output is correct
44 Correct 102 ms 20532 KB Output is correct
45 Correct 8 ms 12072 KB Output is correct
46 Correct 72 ms 19908 KB Output is correct
47 Correct 66 ms 19852 KB Output is correct
48 Correct 88 ms 19788 KB Output is correct
49 Correct 77 ms 19908 KB Output is correct
50 Correct 70 ms 20164 KB Output is correct
51 Correct 64 ms 20056 KB Output is correct
52 Correct 60 ms 19788 KB Output is correct
53 Correct 2208 ms 94328 KB Output is correct
54 Correct 2285 ms 90864 KB Output is correct
55 Correct 2404 ms 90844 KB Output is correct
56 Correct 2025 ms 134032 KB Output is correct
57 Correct 2239 ms 131560 KB Output is correct
58 Correct 2878 ms 160216 KB Output is correct
59 Correct 2805 ms 159920 KB Output is correct
60 Correct 2632 ms 160120 KB Output is correct
61 Correct 2104 ms 131620 KB Output is correct
62 Correct 2374 ms 134712 KB Output is correct
63 Correct 2276 ms 134680 KB Output is correct
64 Correct 2375 ms 130388 KB Output is correct
65 Correct 2197 ms 129436 KB Output is correct
66 Correct 7 ms 11988 KB Output is correct
67 Correct 7 ms 12072 KB Output is correct
68 Correct 7 ms 12004 KB Output is correct
69 Correct 25 ms 15724 KB Output is correct
70 Correct 69 ms 20300 KB Output is correct
71 Correct 70 ms 19788 KB Output is correct
72 Correct 74 ms 20492 KB Output is correct
73 Correct 8 ms 12116 KB Output is correct
74 Correct 66 ms 19904 KB Output is correct
75 Correct 60 ms 19816 KB Output is correct
76 Correct 61 ms 19872 KB Output is correct
77 Correct 62 ms 19916 KB Output is correct
78 Correct 70 ms 20108 KB Output is correct
79 Correct 82 ms 20096 KB Output is correct
80 Correct 71 ms 19804 KB Output is correct
81 Correct 2380 ms 127276 KB Output is correct
82 Correct 2015 ms 129632 KB Output is correct
83 Correct 1794 ms 123880 KB Output is correct
84 Correct 1474 ms 128104 KB Output is correct
85 Correct 2922 ms 148948 KB Output is correct
86 Correct 2918 ms 151192 KB Output is correct
87 Correct 2257 ms 122948 KB Output is correct
88 Correct 2155 ms 118268 KB Output is correct
89 Correct 2270 ms 111692 KB Output is correct
90 Correct 2182 ms 111376 KB Output is correct
91 Correct 2127 ms 117356 KB Output is correct
92 Correct 2100 ms 114740 KB Output is correct
93 Correct 2820 ms 142588 KB Output is correct
94 Correct 2804 ms 142808 KB Output is correct
95 Correct 2704 ms 142064 KB Output is correct
96 Correct 2075 ms 113524 KB Output is correct
97 Correct 2235 ms 116760 KB Output is correct
98 Correct 2206 ms 116360 KB Output is correct
99 Correct 2308 ms 111888 KB Output is correct
100 Correct 2003 ms 112900 KB Output is correct
101 Correct 2257 ms 114108 KB Output is correct
102 Correct 2102 ms 116244 KB Output is correct
103 Correct 2067 ms 113728 KB Output is correct
104 Correct 2974 ms 144444 KB Output is correct
105 Correct 2230 ms 113384 KB Output is correct
106 Correct 2527 ms 112448 KB Output is correct
107 Correct 2109 ms 113384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 30 ms 15284 KB Output is correct
2 Correct 82 ms 19324 KB Output is correct
3 Correct 77 ms 19888 KB Output is correct
4 Correct 75 ms 20456 KB Output is correct
5 Correct 8 ms 12152 KB Output is correct
6 Correct 69 ms 19900 KB Output is correct
7 Correct 24 ms 15300 KB Output is correct
8 Correct 73 ms 19308 KB Output is correct
9 Correct 80 ms 19884 KB Output is correct
10 Correct 93 ms 20476 KB Output is correct
11 Correct 8 ms 12116 KB Output is correct
12 Correct 66 ms 19804 KB Output is correct
13 Correct 60 ms 19788 KB Output is correct
14 Correct 61 ms 19792 KB Output is correct
15 Correct 69 ms 19872 KB Output is correct
16 Correct 78 ms 20172 KB Output is correct
17 Correct 74 ms 20080 KB Output is correct
18 Correct 65 ms 19772 KB Output is correct
19 Correct 23 ms 15736 KB Output is correct
20 Correct 67 ms 20300 KB Output is correct
21 Correct 73 ms 19916 KB Output is correct
22 Correct 83 ms 20420 KB Output is correct
23 Correct 9 ms 12116 KB Output is correct
24 Correct 75 ms 19788 KB Output is correct
25 Correct 74 ms 19816 KB Output is correct
26 Correct 78 ms 19872 KB Output is correct
27 Correct 76 ms 19932 KB Output is correct
28 Correct 81 ms 20148 KB Output is correct
29 Correct 82 ms 20136 KB Output is correct
30 Correct 73 ms 19812 KB Output is correct
31 Correct 2275 ms 94716 KB Output is correct
32 Correct 2036 ms 99544 KB Output is correct
33 Correct 1751 ms 95596 KB Output is correct
34 Correct 1469 ms 99760 KB Output is correct
35 Correct 2915 ms 122232 KB Output is correct
36 Correct 2964 ms 162552 KB Output is correct
37 Correct 2303 ms 136108 KB Output is correct
38 Correct 23 ms 15752 KB Output is correct
39 Correct 71 ms 20352 KB Output is correct
40 Correct 83 ms 19916 KB Output is correct
41 Correct 84 ms 20460 KB Output is correct
42 Correct 11 ms 12068 KB Output is correct
43 Correct 93 ms 19892 KB Output is correct
44 Correct 70 ms 19992 KB Output is correct
45 Correct 69 ms 19792 KB Output is correct
46 Correct 87 ms 19944 KB Output is correct
47 Correct 81 ms 20056 KB Output is correct
48 Correct 79 ms 20044 KB Output is correct
49 Correct 63 ms 19852 KB Output is correct
50 Correct 2353 ms 132088 KB Output is correct
51 Correct 2130 ms 137020 KB Output is correct
52 Correct 1875 ms 133020 KB Output is correct
53 Correct 1621 ms 137196 KB Output is correct
54 Correct 3057 ms 160032 KB Output is correct
55 Correct 2943 ms 162520 KB Output is correct
56 Correct 2249 ms 136176 KB Output is correct
57 Correct 3180 ms 141884 KB Output is correct
58 Correct 3472 ms 152584 KB Output is correct
59 Correct 2725 ms 142660 KB Output is correct
60 Correct 1412 ms 129292 KB Output is correct
61 Correct 4630 ms 240596 KB Output is correct
62 Correct 4623 ms 232948 KB Output is correct
63 Correct 6 ms 11988 KB Output is correct
64 Correct 6 ms 11984 KB Output is correct
65 Correct 9 ms 11964 KB Output is correct
66 Correct 24 ms 15720 KB Output is correct
67 Correct 67 ms 20296 KB Output is correct
68 Correct 66 ms 19916 KB Output is correct
69 Correct 102 ms 20532 KB Output is correct
70 Correct 8 ms 12072 KB Output is correct
71 Correct 72 ms 19908 KB Output is correct
72 Correct 66 ms 19852 KB Output is correct
73 Correct 88 ms 19788 KB Output is correct
74 Correct 77 ms 19908 KB Output is correct
75 Correct 70 ms 20164 KB Output is correct
76 Correct 64 ms 20056 KB Output is correct
77 Correct 60 ms 19788 KB Output is correct
78 Correct 2208 ms 94328 KB Output is correct
79 Correct 2285 ms 90864 KB Output is correct
80 Correct 2404 ms 90844 KB Output is correct
81 Correct 2025 ms 134032 KB Output is correct
82 Correct 2239 ms 131560 KB Output is correct
83 Correct 2878 ms 160216 KB Output is correct
84 Correct 2805 ms 159920 KB Output is correct
85 Correct 2632 ms 160120 KB Output is correct
86 Correct 2104 ms 131620 KB Output is correct
87 Correct 2374 ms 134712 KB Output is correct
88 Correct 2276 ms 134680 KB Output is correct
89 Correct 2375 ms 130388 KB Output is correct
90 Correct 2197 ms 129436 KB Output is correct
91 Correct 7 ms 11988 KB Output is correct
92 Correct 7 ms 12072 KB Output is correct
93 Correct 7 ms 12004 KB Output is correct
94 Correct 25 ms 15724 KB Output is correct
95 Correct 69 ms 20300 KB Output is correct
96 Correct 70 ms 19788 KB Output is correct
97 Correct 74 ms 20492 KB Output is correct
98 Correct 8 ms 12116 KB Output is correct
99 Correct 66 ms 19904 KB Output is correct
100 Correct 60 ms 19816 KB Output is correct
101 Correct 61 ms 19872 KB Output is correct
102 Correct 62 ms 19916 KB Output is correct
103 Correct 70 ms 20108 KB Output is correct
104 Correct 82 ms 20096 KB Output is correct
105 Correct 71 ms 19804 KB Output is correct
106 Correct 2380 ms 127276 KB Output is correct
107 Correct 2015 ms 129632 KB Output is correct
108 Correct 1794 ms 123880 KB Output is correct
109 Correct 1474 ms 128104 KB Output is correct
110 Correct 2922 ms 148948 KB Output is correct
111 Correct 2918 ms 151192 KB Output is correct
112 Correct 2257 ms 122948 KB Output is correct
113 Correct 2155 ms 118268 KB Output is correct
114 Correct 2270 ms 111692 KB Output is correct
115 Correct 2182 ms 111376 KB Output is correct
116 Correct 2127 ms 117356 KB Output is correct
117 Correct 2100 ms 114740 KB Output is correct
118 Correct 2820 ms 142588 KB Output is correct
119 Correct 2804 ms 142808 KB Output is correct
120 Correct 2704 ms 142064 KB Output is correct
121 Correct 2075 ms 113524 KB Output is correct
122 Correct 2235 ms 116760 KB Output is correct
123 Correct 2206 ms 116360 KB Output is correct
124 Correct 2308 ms 111888 KB Output is correct
125 Correct 2003 ms 112900 KB Output is correct
126 Correct 2257 ms 114108 KB Output is correct
127 Correct 2102 ms 116244 KB Output is correct
128 Correct 2067 ms 113728 KB Output is correct
129 Correct 2974 ms 144444 KB Output is correct
130 Correct 2230 ms 113384 KB Output is correct
131 Correct 2527 ms 112448 KB Output is correct
132 Correct 2109 ms 113384 KB Output is correct
133 Correct 6 ms 11988 KB Output is correct
134 Correct 6 ms 11988 KB Output is correct
135 Correct 6 ms 11988 KB Output is correct
136 Correct 23 ms 15776 KB Output is correct
137 Correct 66 ms 20312 KB Output is correct
138 Correct 66 ms 19916 KB Output is correct
139 Correct 74 ms 20436 KB Output is correct
140 Correct 8 ms 12116 KB Output is correct
141 Correct 72 ms 19836 KB Output is correct
142 Correct 61 ms 19880 KB Output is correct
143 Correct 63 ms 19900 KB Output is correct
144 Correct 73 ms 19872 KB Output is correct
145 Correct 70 ms 20140 KB Output is correct
146 Correct 66 ms 20136 KB Output is correct
147 Correct 66 ms 19788 KB Output is correct
148 Correct 2199 ms 112512 KB Output is correct
149 Correct 1959 ms 117320 KB Output is correct
150 Correct 1891 ms 113300 KB Output is correct
151 Correct 1496 ms 117304 KB Output is correct
152 Correct 2940 ms 140080 KB Output is correct
153 Correct 2884 ms 142552 KB Output is correct
154 Correct 2162 ms 115900 KB Output is correct
155 Correct 3029 ms 121616 KB Output is correct
156 Correct 3461 ms 132168 KB Output is correct
157 Correct 2712 ms 122252 KB Output is correct
158 Correct 1392 ms 108800 KB Output is correct
159 Correct 4692 ms 219924 KB Output is correct
160 Correct 4695 ms 211664 KB Output is correct
161 Correct 2162 ms 110160 KB Output is correct
162 Correct 2270 ms 106556 KB Output is correct
163 Correct 2322 ms 106448 KB Output is correct
164 Correct 1905 ms 112496 KB Output is correct
165 Correct 2124 ms 109536 KB Output is correct
166 Correct 2784 ms 137612 KB Output is correct
167 Correct 2779 ms 137164 KB Output is correct
168 Correct 2664 ms 136636 KB Output is correct
169 Correct 2064 ms 107876 KB Output is correct
170 Correct 2182 ms 111048 KB Output is correct
171 Correct 2236 ms 110552 KB Output is correct
172 Correct 2330 ms 105656 KB Output is correct
173 Correct 2113 ms 106516 KB Output is correct
174 Correct 2114 ms 107624 KB Output is correct
175 Correct 1886 ms 109564 KB Output is correct
176 Correct 2133 ms 106372 KB Output is correct
177 Correct 2969 ms 137000 KB Output is correct
178 Correct 2115 ms 105268 KB Output is correct
179 Correct 2318 ms 104288 KB Output is correct
180 Correct 2105 ms 105068 KB Output is correct
181 Correct 2141 ms 105820 KB Output is correct
182 Correct 2058 ms 108824 KB Output is correct
183 Correct 3020 ms 113796 KB Output is correct
184 Correct 5717 ms 209872 KB Output is correct
185 Correct 3773 ms 137924 KB Output is correct
186 Correct 2500 ms 132640 KB Output is correct
187 Correct 1853 ms 112780 KB Output is correct