답안 #548397

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
548397 2022-04-13T08:37:49 Z topovik 분수 공원 (IOI21_parks) C++17
70 / 100
3500 ms 92376 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];
set <pair<int, pair<int, int> > > ms;

void Rec(int x)
{
    queue <int> q;
    q.push(x);
    mrk[x] = 1;
    while (!q.empty())
    {
        x = q.front();
        q.pop();
        int rn = rand() % 4;
        for (int i = 0; i < 4; i++)
        {
            int x1 = coord[x].f + step[(i + rn) % 4][0];
            int y1 = coord[x].s + step[(i + rn) % 4][1];
            if (mp[x1][y1] != 0)
            {
                int nm = mp[x1][y1] - 1;
                if (!mrk[nm])
                {
                    ans.pb({x, nm});
                    mrk[nm] = 1;
                    q.push(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;
//}



int construct_roads (vector<int> x, vector<int> y) {
    srand(time(NULL));
    for (int i = 0; i < N; i++)
    {
        mrk[i] = 0;
        mp[i].clear();
        mp1[i].clear();
    }
    ans.clear();
    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;
    Rec(rand() % n);
    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;
                int x3 = x2 + step[i][0] / 2;
                int y3 = y2 + step[i][1] / 2;
                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) return construct_roads(x, y);
    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;
}
//
//int main()
//{
//    srand(time(NULL));
//    int n;
//    cin >> n;
//    vector <int> x(n), y(n);
//    for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
//    construct_roads(x, y);
//}
/*
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:77: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]
   77 |     if (ans.size() != n - 1) return 0;
      |         ~~~~~~~~~~~^~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 13 ms 19796 KB Output is correct
2 Correct 13 ms 19796 KB Output is correct
3 Correct 12 ms 19796 KB Output is correct
4 Correct 13 ms 19856 KB Output is correct
5 Correct 13 ms 19880 KB Output is correct
6 Correct 14 ms 19796 KB Output is correct
7 Correct 12 ms 19796 KB Output is correct
8 Correct 11 ms 19796 KB Output is correct
9 Correct 430 ms 55504 KB Output is correct
10 Correct 60 ms 23504 KB Output is correct
11 Correct 230 ms 39440 KB Output is correct
12 Correct 59 ms 25468 KB Output is correct
13 Correct 46 ms 26220 KB Output is correct
14 Correct 13 ms 19928 KB Output is correct
15 Correct 13 ms 20052 KB Output is correct
16 Correct 483 ms 56012 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 13 ms 19796 KB Output is correct
2 Correct 13 ms 19796 KB Output is correct
3 Correct 12 ms 19796 KB Output is correct
4 Correct 13 ms 19856 KB Output is correct
5 Correct 13 ms 19880 KB Output is correct
6 Correct 14 ms 19796 KB Output is correct
7 Correct 12 ms 19796 KB Output is correct
8 Correct 11 ms 19796 KB Output is correct
9 Correct 430 ms 55504 KB Output is correct
10 Correct 60 ms 23504 KB Output is correct
11 Correct 230 ms 39440 KB Output is correct
12 Correct 59 ms 25468 KB Output is correct
13 Correct 46 ms 26220 KB Output is correct
14 Correct 13 ms 19928 KB Output is correct
15 Correct 13 ms 20052 KB Output is correct
16 Correct 483 ms 56012 KB Output is correct
17 Correct 14 ms 19796 KB Output is correct
18 Correct 17 ms 19868 KB Output is correct
19 Correct 13 ms 19876 KB Output is correct
20 Correct 14 ms 19796 KB Output is correct
21 Correct 13 ms 19892 KB Output is correct
22 Correct 16 ms 19796 KB Output is correct
23 Correct 1010 ms 81140 KB Output is correct
24 Correct 16 ms 19796 KB Output is correct
25 Correct 16 ms 20192 KB Output is correct
26 Correct 14 ms 20180 KB Output is correct
27 Correct 15 ms 20148 KB Output is correct
28 Correct 359 ms 44596 KB Output is correct
29 Correct 567 ms 56728 KB Output is correct
30 Correct 783 ms 68928 KB Output is correct
31 Correct 1026 ms 81344 KB Output is correct
32 Correct 15 ms 19796 KB Output is correct
33 Correct 14 ms 19876 KB Output is correct
34 Correct 13 ms 19832 KB Output is correct
35 Correct 13 ms 19808 KB Output is correct
36 Correct 12 ms 19876 KB Output is correct
37 Correct 13 ms 19796 KB Output is correct
38 Correct 13 ms 19796 KB Output is correct
39 Correct 13 ms 19880 KB Output is correct
40 Correct 13 ms 19884 KB Output is correct
41 Correct 14 ms 19884 KB Output is correct
42 Correct 13 ms 19796 KB Output is correct
43 Correct 13 ms 20028 KB Output is correct
44 Correct 13 ms 20180 KB Output is correct
45 Correct 551 ms 49456 KB Output is correct
46 Correct 734 ms 62540 KB Output is correct
47 Correct 850 ms 62504 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 13 ms 19796 KB Output is correct
2 Correct 13 ms 19796 KB Output is correct
3 Correct 12 ms 19796 KB Output is correct
4 Correct 13 ms 19856 KB Output is correct
5 Correct 13 ms 19880 KB Output is correct
6 Correct 14 ms 19796 KB Output is correct
7 Correct 12 ms 19796 KB Output is correct
8 Correct 11 ms 19796 KB Output is correct
9 Correct 430 ms 55504 KB Output is correct
10 Correct 60 ms 23504 KB Output is correct
11 Correct 230 ms 39440 KB Output is correct
12 Correct 59 ms 25468 KB Output is correct
13 Correct 46 ms 26220 KB Output is correct
14 Correct 13 ms 19928 KB Output is correct
15 Correct 13 ms 20052 KB Output is correct
16 Correct 483 ms 56012 KB Output is correct
17 Correct 14 ms 19796 KB Output is correct
18 Correct 17 ms 19868 KB Output is correct
19 Correct 13 ms 19876 KB Output is correct
20 Correct 14 ms 19796 KB Output is correct
21 Correct 13 ms 19892 KB Output is correct
22 Correct 16 ms 19796 KB Output is correct
23 Correct 1010 ms 81140 KB Output is correct
24 Correct 16 ms 19796 KB Output is correct
25 Correct 16 ms 20192 KB Output is correct
26 Correct 14 ms 20180 KB Output is correct
27 Correct 15 ms 20148 KB Output is correct
28 Correct 359 ms 44596 KB Output is correct
29 Correct 567 ms 56728 KB Output is correct
30 Correct 783 ms 68928 KB Output is correct
31 Correct 1026 ms 81344 KB Output is correct
32 Correct 15 ms 19796 KB Output is correct
33 Correct 14 ms 19876 KB Output is correct
34 Correct 13 ms 19832 KB Output is correct
35 Correct 13 ms 19808 KB Output is correct
36 Correct 12 ms 19876 KB Output is correct
37 Correct 13 ms 19796 KB Output is correct
38 Correct 13 ms 19796 KB Output is correct
39 Correct 13 ms 19880 KB Output is correct
40 Correct 13 ms 19884 KB Output is correct
41 Correct 14 ms 19884 KB Output is correct
42 Correct 13 ms 19796 KB Output is correct
43 Correct 13 ms 20028 KB Output is correct
44 Correct 13 ms 20180 KB Output is correct
45 Correct 551 ms 49456 KB Output is correct
46 Correct 734 ms 62540 KB Output is correct
47 Correct 850 ms 62504 KB Output is correct
48 Correct 17 ms 19892 KB Output is correct
49 Correct 14 ms 19796 KB Output is correct
50 Correct 17 ms 19872 KB Output is correct
51 Correct 13 ms 19844 KB Output is correct
52 Correct 17 ms 19876 KB Output is correct
53 Correct 17 ms 19796 KB Output is correct
54 Correct 15 ms 19876 KB Output is correct
55 Correct 1068 ms 77488 KB Output is correct
56 Correct 16 ms 19880 KB Output is correct
57 Correct 19 ms 20404 KB Output is correct
58 Correct 34 ms 21660 KB Output is correct
59 Correct 19 ms 20692 KB Output is correct
60 Correct 525 ms 48760 KB Output is correct
61 Correct 682 ms 58780 KB Output is correct
62 Correct 828 ms 67552 KB Output is correct
63 Correct 1098 ms 77556 KB Output is correct
64 Correct 13 ms 19796 KB Output is correct
65 Correct 15 ms 19796 KB Output is correct
66 Correct 14 ms 19824 KB Output is correct
67 Correct 1002 ms 92120 KB Output is correct
68 Correct 1049 ms 91884 KB Output is correct
69 Correct 1026 ms 91664 KB Output is correct
70 Correct 14 ms 20308 KB Output is correct
71 Correct 17 ms 20604 KB Output is correct
72 Correct 532 ms 48700 KB Output is correct
73 Correct 851 ms 63180 KB Output is correct
74 Correct 1018 ms 77492 KB Output is correct
75 Correct 984 ms 83308 KB Output is correct
76 Correct 1093 ms 92184 KB Output is correct
77 Correct 19 ms 20308 KB Output is correct
78 Correct 19 ms 20684 KB Output is correct
79 Correct 467 ms 49772 KB Output is correct
80 Correct 770 ms 64560 KB Output is correct
81 Correct 1064 ms 79684 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 13 ms 19796 KB Output is correct
2 Correct 13 ms 19796 KB Output is correct
3 Correct 12 ms 19796 KB Output is correct
4 Correct 13 ms 19856 KB Output is correct
5 Correct 13 ms 19880 KB Output is correct
6 Correct 14 ms 19796 KB Output is correct
7 Correct 12 ms 19796 KB Output is correct
8 Correct 11 ms 19796 KB Output is correct
9 Correct 430 ms 55504 KB Output is correct
10 Correct 60 ms 23504 KB Output is correct
11 Correct 230 ms 39440 KB Output is correct
12 Correct 59 ms 25468 KB Output is correct
13 Correct 46 ms 26220 KB Output is correct
14 Correct 13 ms 19928 KB Output is correct
15 Correct 13 ms 20052 KB Output is correct
16 Correct 483 ms 56012 KB Output is correct
17 Correct 13 ms 19796 KB Output is correct
18 Correct 13 ms 19796 KB Output is correct
19 Correct 14 ms 19880 KB Output is correct
20 Correct 533 ms 71120 KB Output is correct
21 Correct 518 ms 70952 KB Output is correct
22 Correct 400 ms 71016 KB Output is correct
23 Correct 499 ms 81908 KB Output is correct
24 Correct 128 ms 34636 KB Output is correct
25 Correct 136 ms 34728 KB Output is correct
26 Correct 145 ms 34764 KB Output is correct
27 Correct 957 ms 92376 KB Output is correct
28 Correct 944 ms 91832 KB Output is correct
29 Correct 886 ms 91416 KB Output is correct
30 Correct 894 ms 91468 KB Output is correct
31 Correct 14 ms 19796 KB Output is correct
32 Correct 58 ms 24044 KB Output is correct
33 Correct 51 ms 26808 KB Output is correct
34 Correct 485 ms 70468 KB Output is correct
35 Correct 18 ms 20700 KB Output is correct
36 Correct 36 ms 23724 KB Output is correct
37 Correct 66 ms 27296 KB Output is correct
38 Correct 348 ms 41752 KB Output is correct
39 Correct 534 ms 49952 KB Output is correct
40 Correct 760 ms 58180 KB Output is correct
41 Correct 903 ms 66464 KB Output is correct
42 Correct 1107 ms 74664 KB Output is correct
43 Correct 13 ms 19796 KB Output is correct
44 Correct 14 ms 19760 KB Output is correct
45 Correct 14 ms 19796 KB Output is correct
46 Correct 14 ms 19868 KB Output is correct
47 Correct 13 ms 19796 KB Output is correct
48 Correct 16 ms 19828 KB Output is correct
49 Correct 13 ms 19796 KB Output is correct
50 Correct 13 ms 19796 KB Output is correct
51 Correct 12 ms 19796 KB Output is correct
52 Correct 12 ms 19796 KB Output is correct
53 Correct 15 ms 19856 KB Output is correct
54 Correct 15 ms 20052 KB Output is correct
55 Correct 13 ms 20056 KB Output is correct
56 Correct 448 ms 48948 KB Output is correct
57 Correct 690 ms 62152 KB Output is correct
58 Correct 619 ms 62008 KB Output is correct
59 Correct 12 ms 19796 KB Output is correct
60 Correct 14 ms 19856 KB Output is correct
61 Correct 14 ms 19840 KB Output is correct
62 Correct 982 ms 91620 KB Output is correct
63 Correct 1038 ms 91708 KB Output is correct
64 Correct 1043 ms 91244 KB Output is correct
65 Correct 15 ms 20180 KB Output is correct
66 Correct 17 ms 20524 KB Output is correct
67 Correct 467 ms 48172 KB Output is correct
68 Correct 788 ms 62640 KB Output is correct
69 Correct 1042 ms 77000 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 13 ms 19796 KB Output is correct
2 Correct 13 ms 19796 KB Output is correct
3 Correct 12 ms 19796 KB Output is correct
4 Correct 13 ms 19856 KB Output is correct
5 Correct 13 ms 19880 KB Output is correct
6 Correct 14 ms 19796 KB Output is correct
7 Correct 12 ms 19796 KB Output is correct
8 Correct 11 ms 19796 KB Output is correct
9 Correct 430 ms 55504 KB Output is correct
10 Correct 60 ms 23504 KB Output is correct
11 Correct 230 ms 39440 KB Output is correct
12 Correct 59 ms 25468 KB Output is correct
13 Correct 46 ms 26220 KB Output is correct
14 Correct 13 ms 19928 KB Output is correct
15 Correct 13 ms 20052 KB Output is correct
16 Correct 483 ms 56012 KB Output is correct
17 Correct 852 ms 91852 KB Output is correct
18 Correct 789 ms 92076 KB Output is correct
19 Correct 523 ms 70480 KB Output is correct
20 Correct 899 ms 75692 KB Output is correct
21 Correct 970 ms 78316 KB Output is correct
22 Correct 16 ms 19796 KB Output is correct
23 Correct 110 ms 28900 KB Output is correct
24 Correct 29 ms 21600 KB Output is correct
25 Correct 54 ms 25164 KB Output is correct
26 Correct 79 ms 28632 KB Output is correct
27 Correct 421 ms 48176 KB Output is correct
28 Correct 564 ms 55416 KB Output is correct
29 Correct 700 ms 62416 KB Output is correct
30 Correct 804 ms 69320 KB Output is correct
31 Correct 1072 ms 76700 KB Output is correct
32 Correct 1065 ms 82780 KB Output is correct
33 Correct 1067 ms 91588 KB Output is correct
34 Correct 15 ms 20308 KB Output is correct
35 Correct 20 ms 20572 KB Output is correct
36 Correct 468 ms 49204 KB Output is correct
37 Correct 738 ms 64052 KB Output is correct
38 Correct 1085 ms 78780 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 13 ms 19796 KB Output is correct
2 Correct 13 ms 19796 KB Output is correct
3 Correct 12 ms 19796 KB Output is correct
4 Correct 13 ms 19856 KB Output is correct
5 Correct 13 ms 19880 KB Output is correct
6 Correct 14 ms 19796 KB Output is correct
7 Correct 12 ms 19796 KB Output is correct
8 Correct 11 ms 19796 KB Output is correct
9 Correct 430 ms 55504 KB Output is correct
10 Correct 60 ms 23504 KB Output is correct
11 Correct 230 ms 39440 KB Output is correct
12 Correct 59 ms 25468 KB Output is correct
13 Correct 46 ms 26220 KB Output is correct
14 Correct 13 ms 19928 KB Output is correct
15 Correct 13 ms 20052 KB Output is correct
16 Correct 483 ms 56012 KB Output is correct
17 Correct 14 ms 19796 KB Output is correct
18 Correct 17 ms 19868 KB Output is correct
19 Correct 13 ms 19876 KB Output is correct
20 Correct 14 ms 19796 KB Output is correct
21 Correct 13 ms 19892 KB Output is correct
22 Correct 16 ms 19796 KB Output is correct
23 Correct 1010 ms 81140 KB Output is correct
24 Correct 16 ms 19796 KB Output is correct
25 Correct 16 ms 20192 KB Output is correct
26 Correct 14 ms 20180 KB Output is correct
27 Correct 15 ms 20148 KB Output is correct
28 Correct 359 ms 44596 KB Output is correct
29 Correct 567 ms 56728 KB Output is correct
30 Correct 783 ms 68928 KB Output is correct
31 Correct 1026 ms 81344 KB Output is correct
32 Correct 15 ms 19796 KB Output is correct
33 Correct 14 ms 19876 KB Output is correct
34 Correct 13 ms 19832 KB Output is correct
35 Correct 13 ms 19808 KB Output is correct
36 Correct 12 ms 19876 KB Output is correct
37 Correct 13 ms 19796 KB Output is correct
38 Correct 13 ms 19796 KB Output is correct
39 Correct 13 ms 19880 KB Output is correct
40 Correct 13 ms 19884 KB Output is correct
41 Correct 14 ms 19884 KB Output is correct
42 Correct 13 ms 19796 KB Output is correct
43 Correct 13 ms 20028 KB Output is correct
44 Correct 13 ms 20180 KB Output is correct
45 Correct 551 ms 49456 KB Output is correct
46 Correct 734 ms 62540 KB Output is correct
47 Correct 850 ms 62504 KB Output is correct
48 Correct 17 ms 19892 KB Output is correct
49 Correct 14 ms 19796 KB Output is correct
50 Correct 17 ms 19872 KB Output is correct
51 Correct 13 ms 19844 KB Output is correct
52 Correct 17 ms 19876 KB Output is correct
53 Correct 17 ms 19796 KB Output is correct
54 Correct 15 ms 19876 KB Output is correct
55 Correct 1068 ms 77488 KB Output is correct
56 Correct 16 ms 19880 KB Output is correct
57 Correct 19 ms 20404 KB Output is correct
58 Correct 34 ms 21660 KB Output is correct
59 Correct 19 ms 20692 KB Output is correct
60 Correct 525 ms 48760 KB Output is correct
61 Correct 682 ms 58780 KB Output is correct
62 Correct 828 ms 67552 KB Output is correct
63 Correct 1098 ms 77556 KB Output is correct
64 Correct 13 ms 19796 KB Output is correct
65 Correct 15 ms 19796 KB Output is correct
66 Correct 14 ms 19824 KB Output is correct
67 Correct 1002 ms 92120 KB Output is correct
68 Correct 1049 ms 91884 KB Output is correct
69 Correct 1026 ms 91664 KB Output is correct
70 Correct 14 ms 20308 KB Output is correct
71 Correct 17 ms 20604 KB Output is correct
72 Correct 532 ms 48700 KB Output is correct
73 Correct 851 ms 63180 KB Output is correct
74 Correct 1018 ms 77492 KB Output is correct
75 Correct 984 ms 83308 KB Output is correct
76 Correct 1093 ms 92184 KB Output is correct
77 Correct 19 ms 20308 KB Output is correct
78 Correct 19 ms 20684 KB Output is correct
79 Correct 467 ms 49772 KB Output is correct
80 Correct 770 ms 64560 KB Output is correct
81 Correct 1064 ms 79684 KB Output is correct
82 Correct 13 ms 19796 KB Output is correct
83 Correct 13 ms 19796 KB Output is correct
84 Correct 14 ms 19880 KB Output is correct
85 Correct 533 ms 71120 KB Output is correct
86 Correct 518 ms 70952 KB Output is correct
87 Correct 400 ms 71016 KB Output is correct
88 Correct 499 ms 81908 KB Output is correct
89 Correct 128 ms 34636 KB Output is correct
90 Correct 136 ms 34728 KB Output is correct
91 Correct 145 ms 34764 KB Output is correct
92 Correct 957 ms 92376 KB Output is correct
93 Correct 944 ms 91832 KB Output is correct
94 Correct 886 ms 91416 KB Output is correct
95 Correct 894 ms 91468 KB Output is correct
96 Correct 14 ms 19796 KB Output is correct
97 Correct 58 ms 24044 KB Output is correct
98 Correct 51 ms 26808 KB Output is correct
99 Correct 485 ms 70468 KB Output is correct
100 Correct 18 ms 20700 KB Output is correct
101 Correct 36 ms 23724 KB Output is correct
102 Correct 66 ms 27296 KB Output is correct
103 Correct 348 ms 41752 KB Output is correct
104 Correct 534 ms 49952 KB Output is correct
105 Correct 760 ms 58180 KB Output is correct
106 Correct 903 ms 66464 KB Output is correct
107 Correct 1107 ms 74664 KB Output is correct
108 Correct 13 ms 19796 KB Output is correct
109 Correct 14 ms 19760 KB Output is correct
110 Correct 14 ms 19796 KB Output is correct
111 Correct 14 ms 19868 KB Output is correct
112 Correct 13 ms 19796 KB Output is correct
113 Correct 16 ms 19828 KB Output is correct
114 Correct 13 ms 19796 KB Output is correct
115 Correct 13 ms 19796 KB Output is correct
116 Correct 12 ms 19796 KB Output is correct
117 Correct 12 ms 19796 KB Output is correct
118 Correct 15 ms 19856 KB Output is correct
119 Correct 15 ms 20052 KB Output is correct
120 Correct 13 ms 20056 KB Output is correct
121 Correct 448 ms 48948 KB Output is correct
122 Correct 690 ms 62152 KB Output is correct
123 Correct 619 ms 62008 KB Output is correct
124 Correct 12 ms 19796 KB Output is correct
125 Correct 14 ms 19856 KB Output is correct
126 Correct 14 ms 19840 KB Output is correct
127 Correct 982 ms 91620 KB Output is correct
128 Correct 1038 ms 91708 KB Output is correct
129 Correct 1043 ms 91244 KB Output is correct
130 Correct 15 ms 20180 KB Output is correct
131 Correct 17 ms 20524 KB Output is correct
132 Correct 467 ms 48172 KB Output is correct
133 Correct 788 ms 62640 KB Output is correct
134 Correct 1042 ms 77000 KB Output is correct
135 Correct 852 ms 91852 KB Output is correct
136 Correct 789 ms 92076 KB Output is correct
137 Correct 523 ms 70480 KB Output is correct
138 Correct 899 ms 75692 KB Output is correct
139 Correct 970 ms 78316 KB Output is correct
140 Correct 16 ms 19796 KB Output is correct
141 Correct 110 ms 28900 KB Output is correct
142 Correct 29 ms 21600 KB Output is correct
143 Correct 54 ms 25164 KB Output is correct
144 Correct 79 ms 28632 KB Output is correct
145 Correct 421 ms 48176 KB Output is correct
146 Correct 564 ms 55416 KB Output is correct
147 Correct 700 ms 62416 KB Output is correct
148 Correct 804 ms 69320 KB Output is correct
149 Correct 1072 ms 76700 KB Output is correct
150 Correct 1065 ms 82780 KB Output is correct
151 Correct 1067 ms 91588 KB Output is correct
152 Correct 15 ms 20308 KB Output is correct
153 Correct 20 ms 20572 KB Output is correct
154 Correct 468 ms 49204 KB Output is correct
155 Correct 738 ms 64052 KB Output is correct
156 Correct 1085 ms 78780 KB Output is correct
157 Correct 13 ms 19796 KB Output is correct
158 Correct 12 ms 19780 KB Output is correct
159 Correct 13 ms 19796 KB Output is correct
160 Correct 12 ms 19832 KB Output is correct
161 Execution timed out 3586 ms 75304 KB Time limit exceeded
162 Halted 0 ms 0 KB -