답안 #870085

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
870085 2023-11-06T23:01:25 Z StefanL2005 꿈 (IOI13_dreaming) C++14
59 / 100
1000 ms 24704 KB
#include <bits/stdc++.h>
#include "dreaming.h"
using namespace std;

int k = 0;
 
void DFS_sum(int node, int p, vector<int> &sum, vector<vector<int>> &vec, vector<vector<int>> &cost, vector<int> &col)
{
    col[node] = k;
    for (int i = 0; i < vec[node].size(); i++)
    {
        if (vec[node][i] == p)
            continue;
 
        DFS_sum(vec[node][i], node, sum, vec, cost, col);
        sum[node] = max(sum[node], sum[vec[node][i]] + cost[node][i]);
    }
}

void DFS_main(int node, int p, int main, int sec, vector<int> &sum, int &ans, vector<vector<int>> &vec, vector<vector<int>> &cost)
{
    ans = min(ans, max(main, sec));
    if (sec > main)
        return;
    int nr = 0;
    for (int i = 0; i < vec[node].size(); i++)
    {
        if (vec[node][i] == p)
            continue;
        int temp = sum[vec[node][i]] + cost[node][i];

        if (temp == main)
        {
            nr++;
            continue;
        }
        if (temp > sec && (temp != main || nr >= 1))
            sec = temp; 
    }

    for (int i = 0; i < vec[node].size(); i++)
    {
        if (vec[node][i] == p)
            continue;
        int temp = sum[vec[node][i]] + cost[node][i];

        if (temp == main)
            DFS_main(vec[node][i], node, main - cost[node][i], sec + cost[node][i], sum, ans, vec, cost);
    }
}

int trace(int node, int p, int main, vector<int> &sum, vector<vector<int>> &vec, vector<vector<int>> &cost)
{
    for (int i = 0; i < vec[node].size(); i++)
    {
        if (vec[node][i] == p)
            continue;

        if (sum[vec[node][i]] + cost[node][i] == main)
            return trace(vec[node][i], node, main - cost[node][i], sum, vec, cost);
    }
    
    return node;
}

pair<int, int> graph_hub(int node, vector<vector<int>> &vec, vector<vector<int>> &cost, vector<int> &col)
{
    vector<int> sum(vec.size(), 0);
    DFS_sum(node, -1, sum, vec, cost, col);
    
    int MAX = 0, sec = 0;
    for (int i = 0; i < vec[node].size(); i++)
    {
        int temp = sum[vec[node][i]] + cost[node][i];
 
        if (temp > MAX)
        {
            sec = MAX;
            MAX = temp;
        }
        else
            sec = max(sec, temp);
    }

    int ans = sum[node];
    DFS_main(node, -1, MAX, sec, sum, ans, vec, cost);

    vector<int> new_sum(vec.size(), 0);
    int colt = trace(node, -1, sum[node], sum, vec, cost);
    DFS_sum(colt, -1, new_sum, vec, cost, col);
    int Max = new_sum[colt];

    return make_pair(ans, Max);
}
int travelTime(int N, int M, int L, int A[], int B[], int C[])
{
    vector<int> col(N, -1);
    vector<vector<int>> vec(N), cost(N);
    for (int i = 0; i < M; i++)
    {
        vec[A[i]].push_back(B[i]);
        vec[B[i]].push_back(A[i]);
        cost[A[i]].push_back(C[i]);
        cost[B[i]].push_back(C[i]);
    }

    if (M == N - 1)
    {
        vector<int> sum(N, 0);
        DFS_sum(0, -1, sum, vec, cost, col);
        
        int colt = trace(0, -1, sum[0], sum, vec, cost);
        
        vector<int> new_sum(vec.size(), 0);
        DFS_sum(colt, -1, new_sum, vec, cost, col);
        
        int Max = new_sum[colt];
        return Max;
    }

    vector<pair<int, int>> hub_l;
    for (int i = 0; i < N; i++)
        if (col[i] == -1)
        {
            hub_l.push_back(graph_hub(i, vec, cost, col));
            k++;
        }
    
    int unos = 0, dos = 0, tres = 0;

    for (int i = 0; i < hub_l.size(); i++)
    {
        int p = hub_l[i].first;

        if (p > unos)
        {
            tres = dos;
            dos = unos;
            unos = p;
        }
        else
            if (p > dos)
            {
                tres = dos;
                dos = p;
            }
            else
                tres = max(tres, p);
    }
    int Max = 0;
    for (int i = 0; i < hub_l.size(); i++)
        Max = max(Max, hub_l[i].second);
    
    if (M == N - 2)
        return max(unos + L + dos, Max);
    return max(unos + L + dos, max(Max, dos + 2 * L + tres));
}

Compilation message

dreaming.cpp: In function 'void DFS_sum(int, int, std::vector<int>&, std::vector<std::vector<int> >&, std::vector<std::vector<int> >&, std::vector<int>&)':
dreaming.cpp:10:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   10 |     for (int i = 0; i < vec[node].size(); i++)
      |                     ~~^~~~~~~~~~~~~~~~~~
dreaming.cpp: In function 'void DFS_main(int, int, int, int, std::vector<int>&, int&, std::vector<std::vector<int> >&, std::vector<std::vector<int> >&)':
dreaming.cpp:26:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   26 |     for (int i = 0; i < vec[node].size(); i++)
      |                     ~~^~~~~~~~~~~~~~~~~~
dreaming.cpp:41:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   41 |     for (int i = 0; i < vec[node].size(); i++)
      |                     ~~^~~~~~~~~~~~~~~~~~
dreaming.cpp: In function 'int trace(int, int, int, std::vector<int>&, std::vector<std::vector<int> >&, std::vector<std::vector<int> >&)':
dreaming.cpp:54:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   54 |     for (int i = 0; i < vec[node].size(); i++)
      |                     ~~^~~~~~~~~~~~~~~~~~
dreaming.cpp: In function 'std::pair<int, int> graph_hub(int, std::vector<std::vector<int> >&, std::vector<std::vector<int> >&, std::vector<int>&)':
dreaming.cpp:72:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   72 |     for (int i = 0; i < vec[node].size(); i++)
      |                     ~~^~~~~~~~~~~~~~~~~~
dreaming.cpp: In function 'int travelTime(int, int, int, int*, int*, int*)':
dreaming.cpp:131:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  131 |     for (int i = 0; i < hub_l.size(); i++)
      |                     ~~^~~~~~~~~~~~~~
dreaming.cpp:151:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  151 |     for (int i = 0; i < hub_l.size(); i++)
      |                     ~~^~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 55 ms 21124 KB Output is correct
2 Correct 52 ms 21084 KB Output is correct
3 Correct 33 ms 13904 KB Output is correct
4 Correct 7 ms 3420 KB Output is correct
5 Correct 5 ms 2260 KB Output is correct
6 Correct 11 ms 4956 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 24 ms 7828 KB Output is correct
9 Correct 33 ms 10832 KB Output is correct
10 Correct 0 ms 344 KB Output is correct
11 Correct 46 ms 14172 KB Output is correct
12 Correct 58 ms 17492 KB Output is correct
13 Correct 1 ms 600 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 1 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 444 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 344 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 1 ms 344 KB Output is correct
20 Correct 0 ms 360 KB Output is correct
21 Correct 0 ms 360 KB Output is correct
22 Correct 0 ms 360 KB Output is correct
23 Correct 0 ms 356 KB Output is correct
24 Correct 1 ms 360 KB Output is correct
25 Correct 0 ms 360 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 55 ms 21124 KB Output is correct
2 Correct 52 ms 21084 KB Output is correct
3 Correct 33 ms 13904 KB Output is correct
4 Correct 7 ms 3420 KB Output is correct
5 Correct 5 ms 2260 KB Output is correct
6 Correct 11 ms 4956 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 24 ms 7828 KB Output is correct
9 Correct 33 ms 10832 KB Output is correct
10 Correct 0 ms 344 KB Output is correct
11 Correct 46 ms 14172 KB Output is correct
12 Correct 58 ms 17492 KB Output is correct
13 Correct 1 ms 600 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 1 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 ms 348 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 0 ms 444 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 344 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 0 ms 348 KB Output is correct
32 Correct 1 ms 344 KB Output is correct
33 Correct 0 ms 360 KB Output is correct
34 Correct 0 ms 360 KB Output is correct
35 Correct 0 ms 360 KB Output is correct
36 Correct 0 ms 356 KB Output is correct
37 Correct 1 ms 360 KB Output is correct
38 Correct 0 ms 360 KB Output is correct
39 Correct 54 ms 22368 KB Output is correct
40 Correct 52 ms 22152 KB Output is correct
41 Correct 33 ms 14952 KB Output is correct
42 Correct 7 ms 3672 KB Output is correct
43 Correct 0 ms 348 KB Output is correct
44 Correct 0 ms 348 KB Output is correct
45 Correct 0 ms 348 KB Output is correct
46 Correct 0 ms 348 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 0 ms 348 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 1 ms 348 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 0 ms 348 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 1 ms 344 KB Output is correct
56 Correct 0 ms 344 KB Output is correct
57 Correct 74 ms 15080 KB Output is correct
58 Correct 60 ms 14932 KB Output is correct
59 Correct 66 ms 15232 KB Output is correct
60 Correct 72 ms 15420 KB Output is correct
61 Correct 73 ms 15500 KB Output is correct
62 Correct 61 ms 15444 KB Output is correct
63 Correct 58 ms 15164 KB Output is correct
64 Correct 52 ms 15188 KB Output is correct
65 Correct 58 ms 15436 KB Output is correct
66 Correct 55 ms 15444 KB Output is correct
67 Correct 63 ms 15136 KB Output is correct
68 Correct 59 ms 15188 KB Output is correct
69 Correct 70 ms 15444 KB Output is correct
70 Correct 68 ms 15612 KB Output is correct
71 Correct 0 ms 344 KB Output is correct
72 Correct 2 ms 860 KB Output is correct
73 Correct 2 ms 716 KB Output is correct
74 Correct 2 ms 860 KB Output is correct
75 Correct 2 ms 768 KB Output is correct
76 Correct 2 ms 708 KB Output is correct
77 Correct 2 ms 860 KB Output is correct
78 Correct 2 ms 860 KB Output is correct
79 Correct 2 ms 860 KB Output is correct
80 Correct 61 ms 15200 KB Output is correct
81 Correct 61 ms 15132 KB Output is correct
82 Correct 61 ms 15444 KB Output is correct
83 Correct 61 ms 15444 KB Output is correct
84 Correct 1 ms 700 KB Output is correct
85 Correct 1 ms 600 KB Output is correct
86 Correct 1 ms 604 KB Output is correct
87 Correct 2 ms 604 KB Output is correct
88 Correct 1 ms 712 KB Output is correct
89 Correct 1 ms 856 KB Output is correct
90 Correct 1 ms 604 KB Output is correct
91 Correct 2 ms 648 KB Output is correct
92 Correct 1 ms 600 KB Output is correct
93 Correct 2 ms 600 KB Output is correct
94 Correct 0 ms 348 KB Output is correct
95 Correct 0 ms 348 KB Output is correct
96 Correct 0 ms 468 KB Output is correct
97 Correct 0 ms 348 KB Output is correct
98 Correct 0 ms 348 KB Output is correct
99 Correct 0 ms 348 KB Output is correct
100 Correct 0 ms 444 KB Output is correct
101 Correct 0 ms 348 KB Output is correct
102 Correct 0 ms 348 KB Output is correct
103 Correct 0 ms 440 KB Output is correct
104 Correct 5 ms 2140 KB Output is correct
105 Correct 14 ms 5212 KB Output is correct
106 Correct 0 ms 348 KB Output is correct
107 Correct 23 ms 8524 KB Output is correct
108 Correct 32 ms 11468 KB Output is correct
109 Correct 1 ms 344 KB Output is correct
110 Correct 47 ms 15184 KB Output is correct
111 Correct 58 ms 18648 KB Output is correct
112 Correct 1 ms 604 KB Output is correct
113 Correct 87 ms 24704 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1060 ms 10364 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 1 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 444 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 344 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 1 ms 344 KB Output is correct
20 Correct 0 ms 360 KB Output is correct
21 Correct 0 ms 360 KB Output is correct
22 Correct 0 ms 360 KB Output is correct
23 Correct 0 ms 356 KB Output is correct
24 Correct 1 ms 360 KB Output is correct
25 Correct 0 ms 360 KB Output is correct
26 Correct 1 ms 348 KB Output is correct
27 Correct 1 ms 716 KB Output is correct
28 Correct 2 ms 860 KB Output is correct
29 Correct 1 ms 348 KB Output is correct
30 Correct 1 ms 596 KB Output is correct
31 Correct 2 ms 860 KB Output is correct
32 Correct 1 ms 436 KB Output is correct
33 Correct 1 ms 604 KB Output is correct
34 Correct 2 ms 860 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 448 KB Output is correct
41 Correct 0 ms 356 KB Output is correct
42 Correct 0 ms 356 KB Output is correct
43 Correct 1 ms 356 KB Output is correct
44 Correct 1 ms 356 KB Output is correct
45 Correct 0 ms 356 KB Output is correct
46 Correct 0 ms 356 KB Output is correct
47 Correct 0 ms 356 KB Output is correct
48 Correct 1 ms 344 KB Output is correct
49 Correct 1 ms 348 KB Output is correct
50 Correct 1 ms 348 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 0 ms 352 KB Output is correct
53 Correct 0 ms 604 KB Output is correct
54 Correct 2 ms 1116 KB Output is correct
55 Correct 2 ms 1116 KB Output is correct
56 Correct 2 ms 604 KB Output is correct
57 Correct 2 ms 600 KB Output is correct
58 Correct 2 ms 860 KB Output is correct
59 Correct 2 ms 756 KB Output is correct
60 Correct 2 ms 708 KB Output is correct
61 Correct 2 ms 604 KB Output is correct
62 Correct 2 ms 860 KB Output is correct
63 Correct 2 ms 856 KB Output is correct
64 Correct 1 ms 600 KB Output is correct
65 Correct 2 ms 600 KB Output is correct
66 Correct 2 ms 860 KB Output is correct
67 Correct 2 ms 856 KB Output is correct
68 Correct 2 ms 848 KB Output is correct
69 Correct 2 ms 684 KB Output is correct
70 Correct 1 ms 600 KB Output is correct
71 Correct 2 ms 600 KB Output is correct
72 Correct 2 ms 860 KB Output is correct
73 Correct 2 ms 860 KB Output is correct
74 Correct 2 ms 856 KB Output is correct
75 Correct 2 ms 756 KB Output is correct
76 Correct 2 ms 860 KB Output is correct
77 Correct 2 ms 652 KB Output is correct
78 Correct 2 ms 604 KB Output is correct
79 Correct 1 ms 604 KB Output is correct
80 Correct 1 ms 604 KB Output is correct
81 Correct 1 ms 604 KB Output is correct
82 Correct 2 ms 860 KB Output is correct
83 Correct 2 ms 860 KB Output is correct
84 Correct 1 ms 604 KB Output is correct
85 Correct 2 ms 604 KB Output is correct
86 Correct 2 ms 708 KB Output is correct
87 Correct 2 ms 860 KB Output is correct
88 Correct 2 ms 836 KB Output is correct
89 Correct 2 ms 604 KB Output is correct
90 Correct 2 ms 604 KB Output is correct
91 Correct 2 ms 604 KB Output is correct
92 Correct 1 ms 604 KB Output is correct
93 Correct 1 ms 604 KB Output is correct
94 Correct 1 ms 604 KB Output is correct
95 Correct 1 ms 752 KB Output is correct
96 Correct 1 ms 604 KB Output is correct
97 Correct 1 ms 604 KB Output is correct
98 Correct 1 ms 604 KB Output is correct
99 Correct 2 ms 860 KB Output is correct
100 Correct 1 ms 856 KB Output is correct
101 Correct 1 ms 604 KB Output is correct
102 Correct 0 ms 352 KB Output is correct
103 Correct 0 ms 356 KB Output is correct
104 Correct 0 ms 356 KB Output is correct
105 Correct 0 ms 356 KB Output is correct
106 Correct 0 ms 360 KB Output is correct
107 Correct 0 ms 360 KB Output is correct
108 Correct 0 ms 360 KB Output is correct
109 Correct 0 ms 360 KB Output is correct
110 Correct 0 ms 352 KB Output is correct
111 Correct 0 ms 356 KB Output is correct
112 Correct 1 ms 352 KB Output is correct
113 Correct 1 ms 352 KB Output is correct
114 Correct 1 ms 608 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 55 ms 21124 KB Output is correct
2 Correct 52 ms 21084 KB Output is correct
3 Correct 33 ms 13904 KB Output is correct
4 Correct 7 ms 3420 KB Output is correct
5 Correct 5 ms 2260 KB Output is correct
6 Correct 11 ms 4956 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 24 ms 7828 KB Output is correct
9 Correct 33 ms 10832 KB Output is correct
10 Correct 0 ms 344 KB Output is correct
11 Correct 46 ms 14172 KB Output is correct
12 Correct 58 ms 17492 KB Output is correct
13 Correct 1 ms 600 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 1 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 ms 348 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 0 ms 444 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 344 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 0 ms 348 KB Output is correct
32 Correct 1 ms 344 KB Output is correct
33 Correct 0 ms 360 KB Output is correct
34 Correct 0 ms 360 KB Output is correct
35 Correct 0 ms 360 KB Output is correct
36 Correct 0 ms 356 KB Output is correct
37 Correct 1 ms 360 KB Output is correct
38 Correct 0 ms 360 KB Output is correct
39 Correct 54 ms 22368 KB Output is correct
40 Correct 52 ms 22152 KB Output is correct
41 Correct 33 ms 14952 KB Output is correct
42 Correct 7 ms 3672 KB Output is correct
43 Correct 0 ms 348 KB Output is correct
44 Correct 0 ms 348 KB Output is correct
45 Correct 0 ms 348 KB Output is correct
46 Correct 0 ms 348 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 0 ms 348 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 1 ms 348 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 0 ms 348 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 1 ms 344 KB Output is correct
56 Correct 0 ms 344 KB Output is correct
57 Correct 74 ms 15080 KB Output is correct
58 Correct 60 ms 14932 KB Output is correct
59 Correct 66 ms 15232 KB Output is correct
60 Correct 72 ms 15420 KB Output is correct
61 Correct 73 ms 15500 KB Output is correct
62 Correct 61 ms 15444 KB Output is correct
63 Correct 58 ms 15164 KB Output is correct
64 Correct 52 ms 15188 KB Output is correct
65 Correct 58 ms 15436 KB Output is correct
66 Correct 55 ms 15444 KB Output is correct
67 Correct 63 ms 15136 KB Output is correct
68 Correct 59 ms 15188 KB Output is correct
69 Correct 70 ms 15444 KB Output is correct
70 Correct 68 ms 15612 KB Output is correct
71 Correct 0 ms 344 KB Output is correct
72 Correct 2 ms 860 KB Output is correct
73 Correct 2 ms 716 KB Output is correct
74 Correct 2 ms 860 KB Output is correct
75 Correct 2 ms 768 KB Output is correct
76 Correct 2 ms 708 KB Output is correct
77 Correct 2 ms 860 KB Output is correct
78 Correct 2 ms 860 KB Output is correct
79 Correct 2 ms 860 KB Output is correct
80 Correct 61 ms 15200 KB Output is correct
81 Correct 61 ms 15132 KB Output is correct
82 Correct 61 ms 15444 KB Output is correct
83 Correct 61 ms 15444 KB Output is correct
84 Correct 1 ms 700 KB Output is correct
85 Correct 1 ms 600 KB Output is correct
86 Correct 1 ms 604 KB Output is correct
87 Correct 2 ms 604 KB Output is correct
88 Correct 1 ms 712 KB Output is correct
89 Correct 1 ms 856 KB Output is correct
90 Correct 1 ms 604 KB Output is correct
91 Correct 2 ms 648 KB Output is correct
92 Correct 1 ms 600 KB Output is correct
93 Correct 2 ms 600 KB Output is correct
94 Correct 0 ms 348 KB Output is correct
95 Correct 0 ms 348 KB Output is correct
96 Correct 0 ms 468 KB Output is correct
97 Correct 0 ms 348 KB Output is correct
98 Correct 0 ms 348 KB Output is correct
99 Correct 0 ms 348 KB Output is correct
100 Correct 0 ms 444 KB Output is correct
101 Correct 0 ms 348 KB Output is correct
102 Correct 0 ms 348 KB Output is correct
103 Correct 0 ms 440 KB Output is correct
104 Correct 5 ms 2140 KB Output is correct
105 Correct 14 ms 5212 KB Output is correct
106 Correct 0 ms 348 KB Output is correct
107 Correct 23 ms 8524 KB Output is correct
108 Correct 32 ms 11468 KB Output is correct
109 Correct 1 ms 344 KB Output is correct
110 Correct 47 ms 15184 KB Output is correct
111 Correct 58 ms 18648 KB Output is correct
112 Correct 1 ms 604 KB Output is correct
113 Correct 87 ms 24704 KB Output is correct
114 Execution timed out 1060 ms 10364 KB Time limit exceeded
115 Halted 0 ms 0 KB -