답안 #548377

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
548377 2022-04-13T07:40:00 Z topovik 분수 공원 (IOI21_parks) C++17
70 / 100
1181 ms 118444 KB
#include <bits/stdc++.h>
#include "parks.h"
#define pb push_back
#define f first
#define s second
#define pi acos(-1)

using namespace std;

typedef long long ll;
typedef long double ld;

const ll oo = 1e9;
const ld eps = (ld)1 / oo;
const ll N = 2e5 + 100;
const ll M = 1e6;

const int step[4][2] = {{0, 2}, {0, -2}, {2, 0}, {-2, 0}};

vector <pair<int, int> > ans;
int mrk[N];
map <int, int> mp[N];
map <int, int> mp1[N];
pair<int, int> coord[N];

void Rec(int x)
{
    for (int i = 0; i < 4; i++)
    {
        int x1 = coord[x].f + step[i][0];
        int y1 = coord[x].s + step[i][1];
        if (mp[x1][y1] != 0)
        {
            int nm = mp[x1][y1] - 1;
            if (!mrk[nm])
            {
                ans.pb({x, nm});
                mrk[nm] = 1;
                Rec(nm);
            }
        }
    }
}

//void build(vector <int> u, vector <int> v, vector <int> a, vector <int> b)
//{
//    for (int i = 0; i < u.size(); i++) cout << u[i] << " " << v[i] << " " << a[i] << " " << b[i] << endl;
//}

set <pair<int, pair<int, int> > > ms;


int construct_roads (vector<int> x, vector<int> y) {
    std::vector<int> u, v, a, b;
    int n = x.size();
    for (int i = 0; i < n; i++) coord[i] = {x[i], y[i]};
    for (int i = 0; i < n; i++) mp[x[i]][y[i]] = i + 1;
    mrk[0] = 1;
    Rec(0);
    if (ans.size() != n - 1) return 0;
    a.resize(n - 1);
    b.resize(n - 1);
    u.resize(n - 1);
    v.resize(n - 1);
    for (int i = 0; i < N; i++) mp[i].clear();
    for (int i = 0; i < n - 1; i++)
    {
        int x1 = (x[ans[i].f] + x[ans[i].s]) / 2;
        int y1 = (y[ans[i].f] + y[ans[i].s]) / 2;
        for (int j = 0; j < 4; j++)
        {
            int x2 = x1 + step[j][0] / 2;
            int y2 = y1 + step[j][1] / 2;
            if ((x2 & 1) && (y2 & 1))
            {
                if (mp[x2][y2] != 0)
                {
                    ms.erase({mp[x2][y2], {x2, y2}});
                }
                mp[x2][y2]++;
                ms.insert({mp[x2][y2], {x2, y2}});
            }
        }
        mp1[x1][y1] = i + 1;
    }
    while (!ms.empty())
    {
        pair<int, pair<int, int> > c = *ms.begin();
        ms.erase(ms.begin());
        if (c.f == 0) continue;
        int x1 = c.s.f, y1 = c.s.s;
        mp[x1][y1] = 0;
        for (int i = 0; i < 4; i++)
        {
            int x2 = x1 + step[i][0] / 2;
            int y2 = y1 + step[i][1] / 2;
            if (mp1[x2][y2] != 0)
            {
                int nom = mp1[x2][y2] - 1;
                a[nom] = x1;
                b[nom] = y1;
                mp1[x2][y2] = 0;
                for (int j = 0; j < 4; j++)
                {
                    int x3 = x2 + step[j][0] / 2;
                    int y3 = y2 + step[j][1] / 2;
                    if ((x3 & 1) && (y3 & 1))
                    {
                        if (mp[x3][y3] != 0)
                        {
                           ms.erase({mp[x3][y3], {x3, y3}});
                           mp[x3][y3]--;
                           ms.insert({mp[x3][y3], {x3, y3}});
                        }
                    }
                }
                break;
            }
        }
    }
    for (int i = 0; i < n - 1; i++)
        if (a[i] == 0 || b[i] == 0) return 0;
    for (int i = 0; i < n - 1; i++)
    {
        u[i] = ans[i].f;
        v[i] = ans[i].s;
    }
    build(u, v, a, b);
    return 1;
}
/*
1
4
-100000 -100000 100000 -100000 -100000 100000
-100000 -100000 100000 -100000 -100000 100000
-100000 -100000 100000 -100000 -100000 100000
-100000 -100000 100000 -100000 -100000 100000
*/

Compilation message

parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:60:20: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   60 |     if (ans.size() != n - 1) return 0;
      |         ~~~~~~~~~~~^~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 19028 KB Output is correct
2 Correct 11 ms 19112 KB Output is correct
3 Correct 11 ms 19112 KB Output is correct
4 Correct 11 ms 19004 KB Output is correct
5 Correct 10 ms 19108 KB Output is correct
6 Correct 12 ms 19028 KB Output is correct
7 Correct 10 ms 19028 KB Output is correct
8 Correct 11 ms 19112 KB Output is correct
9 Correct 515 ms 67592 KB Output is correct
10 Correct 52 ms 24004 KB Output is correct
11 Correct 240 ms 45744 KB Output is correct
12 Correct 69 ms 26664 KB Output is correct
13 Correct 54 ms 29456 KB Output is correct
14 Correct 14 ms 19248 KB Output is correct
15 Correct 16 ms 19252 KB Output is correct
16 Correct 454 ms 62448 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 19028 KB Output is correct
2 Correct 11 ms 19112 KB Output is correct
3 Correct 11 ms 19112 KB Output is correct
4 Correct 11 ms 19004 KB Output is correct
5 Correct 10 ms 19108 KB Output is correct
6 Correct 12 ms 19028 KB Output is correct
7 Correct 10 ms 19028 KB Output is correct
8 Correct 11 ms 19112 KB Output is correct
9 Correct 515 ms 67592 KB Output is correct
10 Correct 52 ms 24004 KB Output is correct
11 Correct 240 ms 45744 KB Output is correct
12 Correct 69 ms 26664 KB Output is correct
13 Correct 54 ms 29456 KB Output is correct
14 Correct 14 ms 19248 KB Output is correct
15 Correct 16 ms 19252 KB Output is correct
16 Correct 454 ms 62448 KB Output is correct
17 Correct 13 ms 19028 KB Output is correct
18 Correct 14 ms 19028 KB Output is correct
19 Correct 12 ms 19028 KB Output is correct
20 Correct 12 ms 19108 KB Output is correct
21 Correct 11 ms 18996 KB Output is correct
22 Correct 12 ms 19116 KB Output is correct
23 Correct 1122 ms 106444 KB Output is correct
24 Correct 13 ms 19028 KB Output is correct
25 Correct 15 ms 19540 KB Output is correct
26 Correct 15 ms 19540 KB Output is correct
27 Correct 13 ms 19504 KB Output is correct
28 Correct 389 ms 54240 KB Output is correct
29 Correct 635 ms 71836 KB Output is correct
30 Correct 937 ms 89156 KB Output is correct
31 Correct 1181 ms 106472 KB Output is correct
32 Correct 12 ms 19028 KB Output is correct
33 Correct 12 ms 19028 KB Output is correct
34 Correct 11 ms 19112 KB Output is correct
35 Correct 10 ms 19112 KB Output is correct
36 Correct 13 ms 19028 KB Output is correct
37 Correct 13 ms 19108 KB Output is correct
38 Correct 14 ms 19060 KB Output is correct
39 Correct 12 ms 19108 KB Output is correct
40 Correct 13 ms 19000 KB Output is correct
41 Correct 10 ms 19104 KB Output is correct
42 Correct 17 ms 19072 KB Output is correct
43 Correct 11 ms 19372 KB Output is correct
44 Correct 13 ms 19412 KB Output is correct
45 Correct 520 ms 57136 KB Output is correct
46 Correct 783 ms 74680 KB Output is correct
47 Correct 804 ms 73924 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 19028 KB Output is correct
2 Correct 11 ms 19112 KB Output is correct
3 Correct 11 ms 19112 KB Output is correct
4 Correct 11 ms 19004 KB Output is correct
5 Correct 10 ms 19108 KB Output is correct
6 Correct 12 ms 19028 KB Output is correct
7 Correct 10 ms 19028 KB Output is correct
8 Correct 11 ms 19112 KB Output is correct
9 Correct 515 ms 67592 KB Output is correct
10 Correct 52 ms 24004 KB Output is correct
11 Correct 240 ms 45744 KB Output is correct
12 Correct 69 ms 26664 KB Output is correct
13 Correct 54 ms 29456 KB Output is correct
14 Correct 14 ms 19248 KB Output is correct
15 Correct 16 ms 19252 KB Output is correct
16 Correct 454 ms 62448 KB Output is correct
17 Correct 13 ms 19028 KB Output is correct
18 Correct 14 ms 19028 KB Output is correct
19 Correct 12 ms 19028 KB Output is correct
20 Correct 12 ms 19108 KB Output is correct
21 Correct 11 ms 18996 KB Output is correct
22 Correct 12 ms 19116 KB Output is correct
23 Correct 1122 ms 106444 KB Output is correct
24 Correct 13 ms 19028 KB Output is correct
25 Correct 15 ms 19540 KB Output is correct
26 Correct 15 ms 19540 KB Output is correct
27 Correct 13 ms 19504 KB Output is correct
28 Correct 389 ms 54240 KB Output is correct
29 Correct 635 ms 71836 KB Output is correct
30 Correct 937 ms 89156 KB Output is correct
31 Correct 1181 ms 106472 KB Output is correct
32 Correct 12 ms 19028 KB Output is correct
33 Correct 12 ms 19028 KB Output is correct
34 Correct 11 ms 19112 KB Output is correct
35 Correct 10 ms 19112 KB Output is correct
36 Correct 13 ms 19028 KB Output is correct
37 Correct 13 ms 19108 KB Output is correct
38 Correct 14 ms 19060 KB Output is correct
39 Correct 12 ms 19108 KB Output is correct
40 Correct 13 ms 19000 KB Output is correct
41 Correct 10 ms 19104 KB Output is correct
42 Correct 17 ms 19072 KB Output is correct
43 Correct 11 ms 19372 KB Output is correct
44 Correct 13 ms 19412 KB Output is correct
45 Correct 520 ms 57136 KB Output is correct
46 Correct 783 ms 74680 KB Output is correct
47 Correct 804 ms 73924 KB Output is correct
48 Correct 11 ms 19052 KB Output is correct
49 Correct 11 ms 19028 KB Output is correct
50 Correct 11 ms 19012 KB Output is correct
51 Correct 11 ms 19028 KB Output is correct
52 Correct 14 ms 19108 KB Output is correct
53 Correct 15 ms 19064 KB Output is correct
54 Correct 14 ms 19084 KB Output is correct
55 Correct 1167 ms 96792 KB Output is correct
56 Correct 12 ms 19028 KB Output is correct
57 Correct 17 ms 19668 KB Output is correct
58 Correct 32 ms 21556 KB Output is correct
59 Correct 17 ms 20184 KB Output is correct
60 Correct 547 ms 60812 KB Output is correct
61 Correct 751 ms 75252 KB Output is correct
62 Correct 932 ms 83340 KB Output is correct
63 Correct 1138 ms 100360 KB Output is correct
64 Correct 12 ms 19028 KB Output is correct
65 Correct 12 ms 19028 KB Output is correct
66 Correct 12 ms 19108 KB Output is correct
67 Correct 1063 ms 110432 KB Output is correct
68 Correct 1100 ms 110800 KB Output is correct
69 Correct 1095 ms 113164 KB Output is correct
70 Correct 12 ms 19668 KB Output is correct
71 Correct 15 ms 20024 KB Output is correct
72 Correct 515 ms 52796 KB Output is correct
73 Correct 848 ms 72980 KB Output is correct
74 Correct 1139 ms 86772 KB Output is correct
75 Correct 1107 ms 104068 KB Output is correct
76 Correct 1035 ms 118004 KB Output is correct
77 Correct 14 ms 19788 KB Output is correct
78 Correct 15 ms 20276 KB Output is correct
79 Correct 505 ms 54628 KB Output is correct
80 Correct 791 ms 73460 KB Output is correct
81 Correct 1146 ms 91472 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 19028 KB Output is correct
2 Correct 11 ms 19112 KB Output is correct
3 Correct 11 ms 19112 KB Output is correct
4 Correct 11 ms 19004 KB Output is correct
5 Correct 10 ms 19108 KB Output is correct
6 Correct 12 ms 19028 KB Output is correct
7 Correct 10 ms 19028 KB Output is correct
8 Correct 11 ms 19112 KB Output is correct
9 Correct 515 ms 67592 KB Output is correct
10 Correct 52 ms 24004 KB Output is correct
11 Correct 240 ms 45744 KB Output is correct
12 Correct 69 ms 26664 KB Output is correct
13 Correct 54 ms 29456 KB Output is correct
14 Correct 14 ms 19248 KB Output is correct
15 Correct 16 ms 19252 KB Output is correct
16 Correct 454 ms 62448 KB Output is correct
17 Correct 11 ms 19028 KB Output is correct
18 Correct 15 ms 19028 KB Output is correct
19 Correct 10 ms 19028 KB Output is correct
20 Correct 610 ms 96488 KB Output is correct
21 Correct 571 ms 91428 KB Output is correct
22 Correct 598 ms 88632 KB Output is correct
23 Correct 608 ms 96188 KB Output is correct
24 Correct 147 ms 34804 KB Output is correct
25 Correct 135 ms 35544 KB Output is correct
26 Correct 130 ms 35632 KB Output is correct
27 Correct 725 ms 93224 KB Output is correct
28 Correct 650 ms 93176 KB Output is correct
29 Correct 840 ms 93280 KB Output is correct
30 Correct 746 ms 93144 KB Output is correct
31 Correct 14 ms 19028 KB Output is correct
32 Correct 56 ms 24420 KB Output is correct
33 Correct 54 ms 27296 KB Output is correct
34 Correct 451 ms 92696 KB Output is correct
35 Correct 15 ms 20180 KB Output is correct
36 Correct 35 ms 23864 KB Output is correct
37 Correct 62 ms 28204 KB Output is correct
38 Correct 324 ms 42508 KB Output is correct
39 Correct 420 ms 51096 KB Output is correct
40 Correct 561 ms 59864 KB Output is correct
41 Correct 711 ms 68100 KB Output is correct
42 Correct 826 ms 76572 KB Output is correct
43 Correct 12 ms 19028 KB Output is correct
44 Correct 12 ms 19028 KB Output is correct
45 Correct 12 ms 19028 KB Output is correct
46 Correct 11 ms 19028 KB Output is correct
47 Correct 13 ms 19028 KB Output is correct
48 Correct 12 ms 19028 KB Output is correct
49 Correct 12 ms 19060 KB Output is correct
50 Correct 11 ms 19108 KB Output is correct
51 Correct 11 ms 19108 KB Output is correct
52 Correct 11 ms 19028 KB Output is correct
53 Correct 12 ms 18996 KB Output is correct
54 Correct 11 ms 19332 KB Output is correct
55 Correct 12 ms 19400 KB Output is correct
56 Correct 441 ms 57164 KB Output is correct
57 Correct 640 ms 74996 KB Output is correct
58 Correct 631 ms 74212 KB Output is correct
59 Correct 11 ms 19028 KB Output is correct
60 Correct 12 ms 19028 KB Output is correct
61 Correct 10 ms 19028 KB Output is correct
62 Correct 932 ms 110748 KB Output is correct
63 Correct 925 ms 111180 KB Output is correct
64 Correct 888 ms 113472 KB Output is correct
65 Correct 13 ms 19668 KB Output is correct
66 Correct 15 ms 19924 KB Output is correct
67 Correct 444 ms 52852 KB Output is correct
68 Correct 705 ms 73160 KB Output is correct
69 Correct 935 ms 87236 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 19028 KB Output is correct
2 Correct 11 ms 19112 KB Output is correct
3 Correct 11 ms 19112 KB Output is correct
4 Correct 11 ms 19004 KB Output is correct
5 Correct 10 ms 19108 KB Output is correct
6 Correct 12 ms 19028 KB Output is correct
7 Correct 10 ms 19028 KB Output is correct
8 Correct 11 ms 19112 KB Output is correct
9 Correct 515 ms 67592 KB Output is correct
10 Correct 52 ms 24004 KB Output is correct
11 Correct 240 ms 45744 KB Output is correct
12 Correct 69 ms 26664 KB Output is correct
13 Correct 54 ms 29456 KB Output is correct
14 Correct 14 ms 19248 KB Output is correct
15 Correct 16 ms 19252 KB Output is correct
16 Correct 454 ms 62448 KB Output is correct
17 Correct 693 ms 118444 KB Output is correct
18 Correct 658 ms 108472 KB Output is correct
19 Correct 474 ms 97952 KB Output is correct
20 Correct 643 ms 89296 KB Output is correct
21 Correct 629 ms 88688 KB Output is correct
22 Correct 11 ms 19028 KB Output is correct
23 Correct 108 ms 29696 KB Output is correct
24 Correct 22 ms 21444 KB Output is correct
25 Correct 46 ms 26048 KB Output is correct
26 Correct 69 ms 30240 KB Output is correct
27 Correct 363 ms 54712 KB Output is correct
28 Correct 476 ms 63560 KB Output is correct
29 Correct 592 ms 72088 KB Output is correct
30 Correct 668 ms 80196 KB Output is correct
31 Correct 779 ms 89256 KB Output is correct
32 Correct 895 ms 104216 KB Output is correct
33 Correct 882 ms 117836 KB Output is correct
34 Correct 14 ms 19796 KB Output is correct
35 Correct 17 ms 20180 KB Output is correct
36 Correct 429 ms 54608 KB Output is correct
37 Correct 681 ms 73328 KB Output is correct
38 Correct 916 ms 91440 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 19028 KB Output is correct
2 Correct 11 ms 19112 KB Output is correct
3 Correct 11 ms 19112 KB Output is correct
4 Correct 11 ms 19004 KB Output is correct
5 Correct 10 ms 19108 KB Output is correct
6 Correct 12 ms 19028 KB Output is correct
7 Correct 10 ms 19028 KB Output is correct
8 Correct 11 ms 19112 KB Output is correct
9 Correct 515 ms 67592 KB Output is correct
10 Correct 52 ms 24004 KB Output is correct
11 Correct 240 ms 45744 KB Output is correct
12 Correct 69 ms 26664 KB Output is correct
13 Correct 54 ms 29456 KB Output is correct
14 Correct 14 ms 19248 KB Output is correct
15 Correct 16 ms 19252 KB Output is correct
16 Correct 454 ms 62448 KB Output is correct
17 Correct 13 ms 19028 KB Output is correct
18 Correct 14 ms 19028 KB Output is correct
19 Correct 12 ms 19028 KB Output is correct
20 Correct 12 ms 19108 KB Output is correct
21 Correct 11 ms 18996 KB Output is correct
22 Correct 12 ms 19116 KB Output is correct
23 Correct 1122 ms 106444 KB Output is correct
24 Correct 13 ms 19028 KB Output is correct
25 Correct 15 ms 19540 KB Output is correct
26 Correct 15 ms 19540 KB Output is correct
27 Correct 13 ms 19504 KB Output is correct
28 Correct 389 ms 54240 KB Output is correct
29 Correct 635 ms 71836 KB Output is correct
30 Correct 937 ms 89156 KB Output is correct
31 Correct 1181 ms 106472 KB Output is correct
32 Correct 12 ms 19028 KB Output is correct
33 Correct 12 ms 19028 KB Output is correct
34 Correct 11 ms 19112 KB Output is correct
35 Correct 10 ms 19112 KB Output is correct
36 Correct 13 ms 19028 KB Output is correct
37 Correct 13 ms 19108 KB Output is correct
38 Correct 14 ms 19060 KB Output is correct
39 Correct 12 ms 19108 KB Output is correct
40 Correct 13 ms 19000 KB Output is correct
41 Correct 10 ms 19104 KB Output is correct
42 Correct 17 ms 19072 KB Output is correct
43 Correct 11 ms 19372 KB Output is correct
44 Correct 13 ms 19412 KB Output is correct
45 Correct 520 ms 57136 KB Output is correct
46 Correct 783 ms 74680 KB Output is correct
47 Correct 804 ms 73924 KB Output is correct
48 Correct 11 ms 19052 KB Output is correct
49 Correct 11 ms 19028 KB Output is correct
50 Correct 11 ms 19012 KB Output is correct
51 Correct 11 ms 19028 KB Output is correct
52 Correct 14 ms 19108 KB Output is correct
53 Correct 15 ms 19064 KB Output is correct
54 Correct 14 ms 19084 KB Output is correct
55 Correct 1167 ms 96792 KB Output is correct
56 Correct 12 ms 19028 KB Output is correct
57 Correct 17 ms 19668 KB Output is correct
58 Correct 32 ms 21556 KB Output is correct
59 Correct 17 ms 20184 KB Output is correct
60 Correct 547 ms 60812 KB Output is correct
61 Correct 751 ms 75252 KB Output is correct
62 Correct 932 ms 83340 KB Output is correct
63 Correct 1138 ms 100360 KB Output is correct
64 Correct 12 ms 19028 KB Output is correct
65 Correct 12 ms 19028 KB Output is correct
66 Correct 12 ms 19108 KB Output is correct
67 Correct 1063 ms 110432 KB Output is correct
68 Correct 1100 ms 110800 KB Output is correct
69 Correct 1095 ms 113164 KB Output is correct
70 Correct 12 ms 19668 KB Output is correct
71 Correct 15 ms 20024 KB Output is correct
72 Correct 515 ms 52796 KB Output is correct
73 Correct 848 ms 72980 KB Output is correct
74 Correct 1139 ms 86772 KB Output is correct
75 Correct 1107 ms 104068 KB Output is correct
76 Correct 1035 ms 118004 KB Output is correct
77 Correct 14 ms 19788 KB Output is correct
78 Correct 15 ms 20276 KB Output is correct
79 Correct 505 ms 54628 KB Output is correct
80 Correct 791 ms 73460 KB Output is correct
81 Correct 1146 ms 91472 KB Output is correct
82 Correct 11 ms 19028 KB Output is correct
83 Correct 15 ms 19028 KB Output is correct
84 Correct 10 ms 19028 KB Output is correct
85 Correct 610 ms 96488 KB Output is correct
86 Correct 571 ms 91428 KB Output is correct
87 Correct 598 ms 88632 KB Output is correct
88 Correct 608 ms 96188 KB Output is correct
89 Correct 147 ms 34804 KB Output is correct
90 Correct 135 ms 35544 KB Output is correct
91 Correct 130 ms 35632 KB Output is correct
92 Correct 725 ms 93224 KB Output is correct
93 Correct 650 ms 93176 KB Output is correct
94 Correct 840 ms 93280 KB Output is correct
95 Correct 746 ms 93144 KB Output is correct
96 Correct 14 ms 19028 KB Output is correct
97 Correct 56 ms 24420 KB Output is correct
98 Correct 54 ms 27296 KB Output is correct
99 Correct 451 ms 92696 KB Output is correct
100 Correct 15 ms 20180 KB Output is correct
101 Correct 35 ms 23864 KB Output is correct
102 Correct 62 ms 28204 KB Output is correct
103 Correct 324 ms 42508 KB Output is correct
104 Correct 420 ms 51096 KB Output is correct
105 Correct 561 ms 59864 KB Output is correct
106 Correct 711 ms 68100 KB Output is correct
107 Correct 826 ms 76572 KB Output is correct
108 Correct 12 ms 19028 KB Output is correct
109 Correct 12 ms 19028 KB Output is correct
110 Correct 12 ms 19028 KB Output is correct
111 Correct 11 ms 19028 KB Output is correct
112 Correct 13 ms 19028 KB Output is correct
113 Correct 12 ms 19028 KB Output is correct
114 Correct 12 ms 19060 KB Output is correct
115 Correct 11 ms 19108 KB Output is correct
116 Correct 11 ms 19108 KB Output is correct
117 Correct 11 ms 19028 KB Output is correct
118 Correct 12 ms 18996 KB Output is correct
119 Correct 11 ms 19332 KB Output is correct
120 Correct 12 ms 19400 KB Output is correct
121 Correct 441 ms 57164 KB Output is correct
122 Correct 640 ms 74996 KB Output is correct
123 Correct 631 ms 74212 KB Output is correct
124 Correct 11 ms 19028 KB Output is correct
125 Correct 12 ms 19028 KB Output is correct
126 Correct 10 ms 19028 KB Output is correct
127 Correct 932 ms 110748 KB Output is correct
128 Correct 925 ms 111180 KB Output is correct
129 Correct 888 ms 113472 KB Output is correct
130 Correct 13 ms 19668 KB Output is correct
131 Correct 15 ms 19924 KB Output is correct
132 Correct 444 ms 52852 KB Output is correct
133 Correct 705 ms 73160 KB Output is correct
134 Correct 935 ms 87236 KB Output is correct
135 Correct 693 ms 118444 KB Output is correct
136 Correct 658 ms 108472 KB Output is correct
137 Correct 474 ms 97952 KB Output is correct
138 Correct 643 ms 89296 KB Output is correct
139 Correct 629 ms 88688 KB Output is correct
140 Correct 11 ms 19028 KB Output is correct
141 Correct 108 ms 29696 KB Output is correct
142 Correct 22 ms 21444 KB Output is correct
143 Correct 46 ms 26048 KB Output is correct
144 Correct 69 ms 30240 KB Output is correct
145 Correct 363 ms 54712 KB Output is correct
146 Correct 476 ms 63560 KB Output is correct
147 Correct 592 ms 72088 KB Output is correct
148 Correct 668 ms 80196 KB Output is correct
149 Correct 779 ms 89256 KB Output is correct
150 Correct 895 ms 104216 KB Output is correct
151 Correct 882 ms 117836 KB Output is correct
152 Correct 14 ms 19796 KB Output is correct
153 Correct 17 ms 20180 KB Output is correct
154 Correct 429 ms 54608 KB Output is correct
155 Correct 681 ms 73328 KB Output is correct
156 Correct 916 ms 91440 KB Output is correct
157 Correct 11 ms 19028 KB Output is correct
158 Correct 11 ms 19112 KB Output is correct
159 Correct 11 ms 19028 KB Output is correct
160 Correct 13 ms 19120 KB Output is correct
161 Correct 657 ms 96028 KB Output is correct
162 Correct 439 ms 88744 KB Output is correct
163 Correct 453 ms 83068 KB Output is correct
164 Correct 464 ms 81784 KB Output is correct
165 Correct 500 ms 94060 KB Output is correct
166 Correct 578 ms 95692 KB Output is correct
167 Incorrect 158 ms 31044 KB Solution announced impossible, but it is possible.
168 Halted 0 ms 0 KB -