답안 #751444

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
751444 2023-05-31T15:04:59 Z lohacho From Hacks to Snitches (BOI21_watchmen) C++14
80 / 100
6000 ms 240420 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];
            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]){
                enq(nxt, gett(nxt, nt) + 1);
            }
            int f = 0;
            if(col[now] && col[nxt] && (col[now] != col[nxt] || (fir[now] != (fir[nxt] + 1) % len[now] && fir[nxt] != (fir[now] + 1) % len[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;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 15184 KB Output is correct
2 Correct 67 ms 19180 KB Output is correct
3 Correct 62 ms 18720 KB Output is correct
4 Correct 106 ms 19296 KB Output is correct
5 Correct 7 ms 12116 KB Output is correct
6 Correct 60 ms 18692 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 15184 KB Output is correct
2 Correct 65 ms 19088 KB Output is correct
3 Correct 66 ms 18764 KB Output is correct
4 Correct 90 ms 19284 KB Output is correct
5 Correct 9 ms 12116 KB Output is correct
6 Correct 74 ms 18812 KB Output is correct
7 Correct 61 ms 18724 KB Output is correct
8 Correct 63 ms 18668 KB Output is correct
9 Correct 57 ms 18740 KB Output is correct
10 Correct 72 ms 18952 KB Output is correct
11 Correct 82 ms 18892 KB Output is correct
12 Correct 70 ms 18724 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 15184 KB Output is correct
2 Correct 65 ms 19088 KB Output is correct
3 Correct 66 ms 18764 KB Output is correct
4 Correct 90 ms 19284 KB Output is correct
5 Correct 9 ms 12116 KB Output is correct
6 Correct 74 ms 18812 KB Output is correct
7 Correct 61 ms 18724 KB Output is correct
8 Correct 63 ms 18668 KB Output is correct
9 Correct 57 ms 18740 KB Output is correct
10 Correct 72 ms 18952 KB Output is correct
11 Correct 82 ms 18892 KB Output is correct
12 Correct 70 ms 18724 KB Output is correct
13 Correct 21 ms 15172 KB Output is correct
14 Correct 60 ms 19136 KB Output is correct
15 Correct 86 ms 18688 KB Output is correct
16 Correct 92 ms 19264 KB Output is correct
17 Correct 7 ms 12052 KB Output is correct
18 Correct 73 ms 18740 KB Output is correct
19 Correct 58 ms 18672 KB Output is correct
20 Correct 64 ms 18736 KB Output is correct
21 Correct 61 ms 18688 KB Output is correct
22 Correct 65 ms 19028 KB Output is correct
23 Correct 64 ms 18892 KB Output is correct
24 Correct 75 ms 18632 KB Output is correct
25 Correct 2155 ms 93840 KB Output is correct
26 Correct 1999 ms 98476 KB Output is correct
27 Correct 1776 ms 94456 KB Output is correct
28 Correct 1420 ms 98832 KB Output is correct
29 Correct 3034 ms 121256 KB Output is correct
30 Correct 3031 ms 162644 KB Output is correct
31 Correct 2200 ms 136164 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 15184 KB Output is correct
2 Correct 65 ms 19088 KB Output is correct
3 Correct 66 ms 18764 KB Output is correct
4 Correct 90 ms 19284 KB Output is correct
5 Correct 9 ms 12116 KB Output is correct
6 Correct 74 ms 18812 KB Output is correct
7 Correct 61 ms 18724 KB Output is correct
8 Correct 63 ms 18668 KB Output is correct
9 Correct 57 ms 18740 KB Output is correct
10 Correct 72 ms 18952 KB Output is correct
11 Correct 82 ms 18892 KB Output is correct
12 Correct 70 ms 18724 KB Output is correct
13 Correct 21 ms 15172 KB Output is correct
14 Correct 60 ms 19136 KB Output is correct
15 Correct 86 ms 18688 KB Output is correct
16 Correct 92 ms 19264 KB Output is correct
17 Correct 7 ms 12052 KB Output is correct
18 Correct 73 ms 18740 KB Output is correct
19 Correct 58 ms 18672 KB Output is correct
20 Correct 64 ms 18736 KB Output is correct
21 Correct 61 ms 18688 KB Output is correct
22 Correct 65 ms 19028 KB Output is correct
23 Correct 64 ms 18892 KB Output is correct
24 Correct 75 ms 18632 KB Output is correct
25 Correct 2155 ms 93840 KB Output is correct
26 Correct 1999 ms 98476 KB Output is correct
27 Correct 1776 ms 94456 KB Output is correct
28 Correct 1420 ms 98832 KB Output is correct
29 Correct 3034 ms 121256 KB Output is correct
30 Correct 3031 ms 162644 KB Output is correct
31 Correct 2200 ms 136164 KB Output is correct
32 Correct 25 ms 15696 KB Output is correct
33 Correct 70 ms 20280 KB Output is correct
34 Correct 82 ms 19832 KB Output is correct
35 Correct 78 ms 20528 KB Output is correct
36 Correct 9 ms 12116 KB Output is correct
37 Correct 65 ms 19888 KB Output is correct
38 Correct 67 ms 19840 KB Output is correct
39 Correct 73 ms 19904 KB Output is correct
40 Correct 63 ms 19880 KB Output is correct
41 Correct 73 ms 20060 KB Output is correct
42 Correct 69 ms 20136 KB Output is correct
43 Correct 74 ms 19752 KB Output is correct
44 Correct 2182 ms 132388 KB Output is correct
45 Correct 1993 ms 137132 KB Output is correct
46 Correct 1888 ms 133052 KB Output is correct
47 Correct 1509 ms 137232 KB Output is correct
48 Correct 2894 ms 160028 KB Output is correct
49 Correct 3007 ms 162720 KB Output is correct
50 Correct 2339 ms 136476 KB Output is correct
51 Correct 3039 ms 142120 KB Output is correct
52 Correct 3331 ms 152636 KB Output is correct
53 Correct 2759 ms 142800 KB Output is correct
54 Correct 1424 ms 129256 KB Output is correct
55 Correct 5071 ms 240420 KB Output is correct
56 Correct 4792 ms 233212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 15184 KB Output is correct
2 Correct 67 ms 19180 KB Output is correct
3 Correct 62 ms 18720 KB Output is correct
4 Correct 106 ms 19296 KB Output is correct
5 Correct 7 ms 12116 KB Output is correct
6 Correct 60 ms 18692 KB Output is correct
7 Correct 22 ms 15184 KB Output is correct
8 Correct 65 ms 19088 KB Output is correct
9 Correct 66 ms 18764 KB Output is correct
10 Correct 90 ms 19284 KB Output is correct
11 Correct 9 ms 12116 KB Output is correct
12 Correct 74 ms 18812 KB Output is correct
13 Correct 61 ms 18724 KB Output is correct
14 Correct 63 ms 18668 KB Output is correct
15 Correct 57 ms 18740 KB Output is correct
16 Correct 72 ms 18952 KB Output is correct
17 Correct 82 ms 18892 KB Output is correct
18 Correct 70 ms 18724 KB Output is correct
19 Correct 6 ms 11988 KB Output is correct
20 Correct 7 ms 11988 KB Output is correct
21 Correct 6 ms 12064 KB Output is correct
22 Correct 23 ms 15284 KB Output is correct
23 Correct 73 ms 19308 KB Output is correct
24 Correct 78 ms 18864 KB Output is correct
25 Correct 84 ms 19508 KB Output is correct
26 Correct 8 ms 12072 KB Output is correct
27 Correct 71 ms 18876 KB Output is correct
28 Correct 65 ms 18864 KB Output is correct
29 Correct 67 ms 18764 KB Output is correct
30 Correct 66 ms 18876 KB Output is correct
31 Correct 72 ms 19096 KB Output is correct
32 Correct 73 ms 19044 KB Output is correct
33 Correct 67 ms 18732 KB Output is correct
34 Correct 2182 ms 93364 KB Output is correct
35 Correct 2360 ms 89952 KB Output is correct
36 Correct 2371 ms 89788 KB Output is correct
37 Correct 2033 ms 134228 KB Output is correct
38 Correct 2372 ms 131692 KB Output is correct
39 Correct 2963 ms 160228 KB Output is correct
40 Correct 2935 ms 160100 KB Output is correct
41 Correct 2709 ms 159856 KB Output is correct
42 Correct 2183 ms 131548 KB Output is correct
43 Correct 2292 ms 134456 KB Output is correct
44 Correct 2385 ms 134680 KB Output is correct
45 Correct 2506 ms 130324 KB Output is correct
46 Correct 2238 ms 131524 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 15184 KB Output is correct
2 Correct 67 ms 19180 KB Output is correct
3 Correct 62 ms 18720 KB Output is correct
4 Correct 106 ms 19296 KB Output is correct
5 Correct 7 ms 12116 KB Output is correct
6 Correct 60 ms 18692 KB Output is correct
7 Correct 22 ms 15184 KB Output is correct
8 Correct 65 ms 19088 KB Output is correct
9 Correct 66 ms 18764 KB Output is correct
10 Correct 90 ms 19284 KB Output is correct
11 Correct 9 ms 12116 KB Output is correct
12 Correct 74 ms 18812 KB Output is correct
13 Correct 61 ms 18724 KB Output is correct
14 Correct 63 ms 18668 KB Output is correct
15 Correct 57 ms 18740 KB Output is correct
16 Correct 72 ms 18952 KB Output is correct
17 Correct 82 ms 18892 KB Output is correct
18 Correct 70 ms 18724 KB Output is correct
19 Correct 21 ms 15172 KB Output is correct
20 Correct 60 ms 19136 KB Output is correct
21 Correct 86 ms 18688 KB Output is correct
22 Correct 92 ms 19264 KB Output is correct
23 Correct 7 ms 12052 KB Output is correct
24 Correct 73 ms 18740 KB Output is correct
25 Correct 58 ms 18672 KB Output is correct
26 Correct 64 ms 18736 KB Output is correct
27 Correct 61 ms 18688 KB Output is correct
28 Correct 65 ms 19028 KB Output is correct
29 Correct 64 ms 18892 KB Output is correct
30 Correct 75 ms 18632 KB Output is correct
31 Correct 2155 ms 93840 KB Output is correct
32 Correct 1999 ms 98476 KB Output is correct
33 Correct 1776 ms 94456 KB Output is correct
34 Correct 1420 ms 98832 KB Output is correct
35 Correct 3034 ms 121256 KB Output is correct
36 Correct 3031 ms 162644 KB Output is correct
37 Correct 2200 ms 136164 KB Output is correct
38 Correct 6 ms 11988 KB Output is correct
39 Correct 7 ms 11988 KB Output is correct
40 Correct 6 ms 12064 KB Output is correct
41 Correct 23 ms 15284 KB Output is correct
42 Correct 73 ms 19308 KB Output is correct
43 Correct 78 ms 18864 KB Output is correct
44 Correct 84 ms 19508 KB Output is correct
45 Correct 8 ms 12072 KB Output is correct
46 Correct 71 ms 18876 KB Output is correct
47 Correct 65 ms 18864 KB Output is correct
48 Correct 67 ms 18764 KB Output is correct
49 Correct 66 ms 18876 KB Output is correct
50 Correct 72 ms 19096 KB Output is correct
51 Correct 73 ms 19044 KB Output is correct
52 Correct 67 ms 18732 KB Output is correct
53 Correct 2182 ms 93364 KB Output is correct
54 Correct 2360 ms 89952 KB Output is correct
55 Correct 2371 ms 89788 KB Output is correct
56 Correct 2033 ms 134228 KB Output is correct
57 Correct 2372 ms 131692 KB Output is correct
58 Correct 2963 ms 160228 KB Output is correct
59 Correct 2935 ms 160100 KB Output is correct
60 Correct 2709 ms 159856 KB Output is correct
61 Correct 2183 ms 131548 KB Output is correct
62 Correct 2292 ms 134456 KB Output is correct
63 Correct 2385 ms 134680 KB Output is correct
64 Correct 2506 ms 130324 KB Output is correct
65 Correct 2238 ms 131524 KB Output is correct
66 Correct 6 ms 11988 KB Output is correct
67 Correct 7 ms 11988 KB Output is correct
68 Correct 7 ms 12012 KB Output is correct
69 Correct 23 ms 15672 KB Output is correct
70 Correct 68 ms 20336 KB Output is correct
71 Correct 65 ms 19852 KB Output is correct
72 Correct 84 ms 20524 KB Output is correct
73 Correct 9 ms 12116 KB Output is correct
74 Correct 71 ms 19788 KB Output is correct
75 Correct 64 ms 19892 KB Output is correct
76 Correct 63 ms 19876 KB Output is correct
77 Correct 64 ms 19876 KB Output is correct
78 Correct 67 ms 20172 KB Output is correct
79 Correct 67 ms 20144 KB Output is correct
80 Correct 70 ms 19920 KB Output is correct
81 Correct 2224 ms 131904 KB Output is correct
82 Correct 2049 ms 136764 KB Output is correct
83 Correct 1848 ms 133008 KB Output is correct
84 Correct 1502 ms 137200 KB Output is correct
85 Correct 2974 ms 159564 KB Output is correct
86 Correct 3038 ms 162452 KB Output is correct
87 Correct 2415 ms 136188 KB Output is correct
88 Correct 2306 ms 131680 KB Output is correct
89 Correct 2386 ms 128004 KB Output is correct
90 Correct 2504 ms 128096 KB Output is correct
91 Correct 2057 ms 134064 KB Output is correct
92 Correct 2204 ms 131356 KB Output is correct
93 Correct 2979 ms 159788 KB Output is correct
94 Correct 2837 ms 159776 KB Output is correct
95 Correct 2772 ms 160068 KB Output is correct
96 Correct 2255 ms 131712 KB Output is correct
97 Correct 2197 ms 134372 KB Output is correct
98 Correct 2269 ms 134700 KB Output is correct
99 Correct 2426 ms 130144 KB Output is correct
100 Correct 2207 ms 131592 KB Output is correct
101 Correct 2240 ms 132796 KB Output is correct
102 Correct 2052 ms 135132 KB Output is correct
103 Correct 2161 ms 132672 KB Output is correct
104 Correct 3066 ms 163240 KB Output is correct
105 Correct 2232 ms 132832 KB Output is correct
106 Correct 2431 ms 131532 KB Output is correct
107 Correct 2303 ms 132552 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 15184 KB Output is correct
2 Correct 67 ms 19180 KB Output is correct
3 Correct 62 ms 18720 KB Output is correct
4 Correct 106 ms 19296 KB Output is correct
5 Correct 7 ms 12116 KB Output is correct
6 Correct 60 ms 18692 KB Output is correct
7 Correct 22 ms 15184 KB Output is correct
8 Correct 65 ms 19088 KB Output is correct
9 Correct 66 ms 18764 KB Output is correct
10 Correct 90 ms 19284 KB Output is correct
11 Correct 9 ms 12116 KB Output is correct
12 Correct 74 ms 18812 KB Output is correct
13 Correct 61 ms 18724 KB Output is correct
14 Correct 63 ms 18668 KB Output is correct
15 Correct 57 ms 18740 KB Output is correct
16 Correct 72 ms 18952 KB Output is correct
17 Correct 82 ms 18892 KB Output is correct
18 Correct 70 ms 18724 KB Output is correct
19 Correct 21 ms 15172 KB Output is correct
20 Correct 60 ms 19136 KB Output is correct
21 Correct 86 ms 18688 KB Output is correct
22 Correct 92 ms 19264 KB Output is correct
23 Correct 7 ms 12052 KB Output is correct
24 Correct 73 ms 18740 KB Output is correct
25 Correct 58 ms 18672 KB Output is correct
26 Correct 64 ms 18736 KB Output is correct
27 Correct 61 ms 18688 KB Output is correct
28 Correct 65 ms 19028 KB Output is correct
29 Correct 64 ms 18892 KB Output is correct
30 Correct 75 ms 18632 KB Output is correct
31 Correct 2155 ms 93840 KB Output is correct
32 Correct 1999 ms 98476 KB Output is correct
33 Correct 1776 ms 94456 KB Output is correct
34 Correct 1420 ms 98832 KB Output is correct
35 Correct 3034 ms 121256 KB Output is correct
36 Correct 3031 ms 162644 KB Output is correct
37 Correct 2200 ms 136164 KB Output is correct
38 Correct 25 ms 15696 KB Output is correct
39 Correct 70 ms 20280 KB Output is correct
40 Correct 82 ms 19832 KB Output is correct
41 Correct 78 ms 20528 KB Output is correct
42 Correct 9 ms 12116 KB Output is correct
43 Correct 65 ms 19888 KB Output is correct
44 Correct 67 ms 19840 KB Output is correct
45 Correct 73 ms 19904 KB Output is correct
46 Correct 63 ms 19880 KB Output is correct
47 Correct 73 ms 20060 KB Output is correct
48 Correct 69 ms 20136 KB Output is correct
49 Correct 74 ms 19752 KB Output is correct
50 Correct 2182 ms 132388 KB Output is correct
51 Correct 1993 ms 137132 KB Output is correct
52 Correct 1888 ms 133052 KB Output is correct
53 Correct 1509 ms 137232 KB Output is correct
54 Correct 2894 ms 160028 KB Output is correct
55 Correct 3007 ms 162720 KB Output is correct
56 Correct 2339 ms 136476 KB Output is correct
57 Correct 3039 ms 142120 KB Output is correct
58 Correct 3331 ms 152636 KB Output is correct
59 Correct 2759 ms 142800 KB Output is correct
60 Correct 1424 ms 129256 KB Output is correct
61 Correct 5071 ms 240420 KB Output is correct
62 Correct 4792 ms 233212 KB Output is correct
63 Correct 6 ms 11988 KB Output is correct
64 Correct 7 ms 11988 KB Output is correct
65 Correct 6 ms 12064 KB Output is correct
66 Correct 23 ms 15284 KB Output is correct
67 Correct 73 ms 19308 KB Output is correct
68 Correct 78 ms 18864 KB Output is correct
69 Correct 84 ms 19508 KB Output is correct
70 Correct 8 ms 12072 KB Output is correct
71 Correct 71 ms 18876 KB Output is correct
72 Correct 65 ms 18864 KB Output is correct
73 Correct 67 ms 18764 KB Output is correct
74 Correct 66 ms 18876 KB Output is correct
75 Correct 72 ms 19096 KB Output is correct
76 Correct 73 ms 19044 KB Output is correct
77 Correct 67 ms 18732 KB Output is correct
78 Correct 2182 ms 93364 KB Output is correct
79 Correct 2360 ms 89952 KB Output is correct
80 Correct 2371 ms 89788 KB Output is correct
81 Correct 2033 ms 134228 KB Output is correct
82 Correct 2372 ms 131692 KB Output is correct
83 Correct 2963 ms 160228 KB Output is correct
84 Correct 2935 ms 160100 KB Output is correct
85 Correct 2709 ms 159856 KB Output is correct
86 Correct 2183 ms 131548 KB Output is correct
87 Correct 2292 ms 134456 KB Output is correct
88 Correct 2385 ms 134680 KB Output is correct
89 Correct 2506 ms 130324 KB Output is correct
90 Correct 2238 ms 131524 KB Output is correct
91 Correct 6 ms 11988 KB Output is correct
92 Correct 7 ms 11988 KB Output is correct
93 Correct 7 ms 12012 KB Output is correct
94 Correct 23 ms 15672 KB Output is correct
95 Correct 68 ms 20336 KB Output is correct
96 Correct 65 ms 19852 KB Output is correct
97 Correct 84 ms 20524 KB Output is correct
98 Correct 9 ms 12116 KB Output is correct
99 Correct 71 ms 19788 KB Output is correct
100 Correct 64 ms 19892 KB Output is correct
101 Correct 63 ms 19876 KB Output is correct
102 Correct 64 ms 19876 KB Output is correct
103 Correct 67 ms 20172 KB Output is correct
104 Correct 67 ms 20144 KB Output is correct
105 Correct 70 ms 19920 KB Output is correct
106 Correct 2224 ms 131904 KB Output is correct
107 Correct 2049 ms 136764 KB Output is correct
108 Correct 1848 ms 133008 KB Output is correct
109 Correct 1502 ms 137200 KB Output is correct
110 Correct 2974 ms 159564 KB Output is correct
111 Correct 3038 ms 162452 KB Output is correct
112 Correct 2415 ms 136188 KB Output is correct
113 Correct 2306 ms 131680 KB Output is correct
114 Correct 2386 ms 128004 KB Output is correct
115 Correct 2504 ms 128096 KB Output is correct
116 Correct 2057 ms 134064 KB Output is correct
117 Correct 2204 ms 131356 KB Output is correct
118 Correct 2979 ms 159788 KB Output is correct
119 Correct 2837 ms 159776 KB Output is correct
120 Correct 2772 ms 160068 KB Output is correct
121 Correct 2255 ms 131712 KB Output is correct
122 Correct 2197 ms 134372 KB Output is correct
123 Correct 2269 ms 134700 KB Output is correct
124 Correct 2426 ms 130144 KB Output is correct
125 Correct 2207 ms 131592 KB Output is correct
126 Correct 2240 ms 132796 KB Output is correct
127 Correct 2052 ms 135132 KB Output is correct
128 Correct 2161 ms 132672 KB Output is correct
129 Correct 3066 ms 163240 KB Output is correct
130 Correct 2232 ms 132832 KB Output is correct
131 Correct 2431 ms 131532 KB Output is correct
132 Correct 2303 ms 132552 KB Output is correct
133 Correct 7 ms 12068 KB Output is correct
134 Correct 7 ms 12072 KB Output is correct
135 Correct 6 ms 12076 KB Output is correct
136 Correct 23 ms 15824 KB Output is correct
137 Correct 69 ms 20244 KB Output is correct
138 Correct 66 ms 19856 KB Output is correct
139 Correct 88 ms 20432 KB Output is correct
140 Correct 7 ms 12116 KB Output is correct
141 Correct 69 ms 19904 KB Output is correct
142 Correct 65 ms 19896 KB Output is correct
143 Correct 62 ms 19884 KB Output is correct
144 Correct 59 ms 19916 KB Output is correct
145 Correct 73 ms 20112 KB Output is correct
146 Correct 75 ms 20060 KB Output is correct
147 Correct 72 ms 19808 KB Output is correct
148 Correct 2227 ms 132140 KB Output is correct
149 Correct 2220 ms 136912 KB Output is correct
150 Correct 1823 ms 132916 KB Output is correct
151 Correct 1467 ms 137220 KB Output is correct
152 Correct 2882 ms 159612 KB Output is correct
153 Correct 2995 ms 162364 KB Output is correct
154 Correct 2277 ms 136072 KB Output is correct
155 Correct 3258 ms 142056 KB Output is correct
156 Correct 3452 ms 152468 KB Output is correct
157 Correct 2905 ms 142644 KB Output is correct
158 Correct 1431 ms 129300 KB Output is correct
159 Correct 4805 ms 239652 KB Output is correct
160 Correct 4597 ms 232216 KB Output is correct
161 Correct 2215 ms 131916 KB Output is correct
162 Correct 2321 ms 128164 KB Output is correct
163 Correct 2292 ms 128020 KB Output is correct
164 Correct 2069 ms 133036 KB Output is correct
165 Correct 2359 ms 130924 KB Output is correct
166 Correct 3018 ms 158436 KB Output is correct
167 Correct 2856 ms 159144 KB Output is correct
168 Correct 2721 ms 159108 KB Output is correct
169 Correct 2328 ms 131504 KB Output is correct
170 Correct 2357 ms 133804 KB Output is correct
171 Correct 2301 ms 133996 KB Output is correct
172 Correct 2830 ms 129592 KB Output is correct
173 Correct 2255 ms 130704 KB Output is correct
174 Correct 2412 ms 132024 KB Output is correct
175 Correct 2226 ms 134344 KB Output is correct
176 Correct 2141 ms 131968 KB Output is correct
177 Correct 3018 ms 162028 KB Output is correct
178 Correct 2242 ms 132720 KB Output is correct
179 Correct 2399 ms 130748 KB Output is correct
180 Correct 2463 ms 132008 KB Output is correct
181 Correct 2283 ms 133068 KB Output is correct
182 Correct 2181 ms 136908 KB Output is correct
183 Correct 3282 ms 142000 KB Output is correct
184 Execution timed out 6074 ms 236672 KB Time limit exceeded
185 Halted 0 ms 0 KB -