Submission #870086

# Submission time Handle Problem Language Result Execution time Memory
870086 2023-11-06T23:08:57 Z StefanL2005 Dreaming (IOI13_dreaming) C++14
59 / 100
1000 ms 22956 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);

    return make_pair(ans, new_sum[colt]);
}
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);
        
        return new_sum[colt];
    }

    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:129: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]
  129 |     for (int i = 0; i < hub_l.size(); i++)
      |                     ~~^~~~~~~~~~~~~~
dreaming.cpp:149: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]
  149 |     for (int i = 0; i < hub_l.size(); i++)
      |                     ~~^~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 53 ms 21096 KB Output is correct
2 Correct 53 ms 21076 KB Output is correct
3 Correct 32 ms 13956 KB Output is correct
4 Correct 7 ms 3420 KB Output is correct
5 Correct 5 ms 2140 KB Output is correct
6 Correct 11 ms 4964 KB Output is correct
7 Correct 0 ms 344 KB Output is correct
8 Correct 23 ms 7952 KB Output is correct
9 Correct 33 ms 10844 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 46 ms 14168 KB Output is correct
12 Correct 59 ms 17488 KB Output is correct
13 Correct 1 ms 600 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 344 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 0 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 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 344 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 344 KB Output is correct
22 Correct 0 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 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 53 ms 21096 KB Output is correct
2 Correct 53 ms 21076 KB Output is correct
3 Correct 32 ms 13956 KB Output is correct
4 Correct 7 ms 3420 KB Output is correct
5 Correct 5 ms 2140 KB Output is correct
6 Correct 11 ms 4964 KB Output is correct
7 Correct 0 ms 344 KB Output is correct
8 Correct 23 ms 7952 KB Output is correct
9 Correct 33 ms 10844 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 46 ms 14168 KB Output is correct
12 Correct 59 ms 17488 KB Output is correct
13 Correct 1 ms 600 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 1 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 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 0 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 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 0 ms 344 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 344 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 344 KB Output is correct
39 Correct 54 ms 20980 KB Output is correct
40 Correct 55 ms 21076 KB Output is correct
41 Correct 33 ms 13956 KB Output is correct
42 Correct 7 ms 3288 KB Output is correct
43 Correct 0 ms 344 KB Output is correct
44 Correct 0 ms 344 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 0 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 0 ms 348 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 61 ms 13724 KB Output is correct
58 Correct 63 ms 13740 KB Output is correct
59 Correct 75 ms 13892 KB Output is correct
60 Correct 60 ms 13908 KB Output is correct
61 Correct 61 ms 13904 KB Output is correct
62 Correct 59 ms 13904 KB Output is correct
63 Correct 72 ms 13788 KB Output is correct
64 Correct 57 ms 13760 KB Output is correct
65 Correct 57 ms 13904 KB Output is correct
66 Correct 58 ms 13892 KB Output is correct
67 Correct 74 ms 13904 KB Output is correct
68 Correct 60 ms 13856 KB Output is correct
69 Correct 63 ms 13880 KB Output is correct
70 Correct 61 ms 13836 KB Output is correct
71 Correct 0 ms 348 KB Output is correct
72 Correct 2 ms 604 KB Output is correct
73 Correct 2 ms 604 KB Output is correct
74 Correct 2 ms 860 KB Output is correct
75 Correct 2 ms 604 KB Output is correct
76 Correct 1 ms 604 KB Output is correct
77 Correct 1 ms 604 KB Output is correct
78 Correct 2 ms 600 KB Output is correct
79 Correct 2 ms 604 KB Output is correct
80 Correct 61 ms 13848 KB Output is correct
81 Correct 62 ms 13652 KB Output is correct
82 Correct 55 ms 13832 KB Output is correct
83 Correct 62 ms 13908 KB Output is correct
84 Correct 1 ms 600 KB Output is correct
85 Correct 1 ms 604 KB Output is correct
86 Correct 1 ms 604 KB Output is correct
87 Correct 1 ms 604 KB Output is correct
88 Correct 1 ms 604 KB Output is correct
89 Correct 1 ms 604 KB Output is correct
90 Correct 1 ms 604 KB Output is correct
91 Correct 1 ms 604 KB Output is correct
92 Correct 2 ms 604 KB Output is correct
93 Correct 2 ms 604 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 348 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 348 KB Output is correct
101 Correct 0 ms 348 KB Output is correct
102 Correct 0 ms 348 KB Output is correct
103 Correct 1 ms 348 KB Output is correct
104 Correct 6 ms 2140 KB Output is correct
105 Correct 11 ms 4956 KB Output is correct
106 Correct 0 ms 348 KB Output is correct
107 Correct 23 ms 7964 KB Output is correct
108 Correct 31 ms 10844 KB Output is correct
109 Correct 1 ms 348 KB Output is correct
110 Correct 53 ms 14040 KB Output is correct
111 Correct 59 ms 17472 KB Output is correct
112 Correct 1 ms 604 KB Output is correct
113 Correct 91 ms 22956 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 1057 ms 10592 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 344 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 0 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 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 344 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 344 KB Output is correct
22 Correct 0 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 344 KB Output is correct
26 Correct 1 ms 348 KB Output is correct
27 Correct 1 ms 604 KB Output is correct
28 Correct 1 ms 604 KB Output is correct
29 Correct 1 ms 348 KB Output is correct
30 Correct 1 ms 604 KB Output is correct
31 Correct 1 ms 860 KB Output is correct
32 Correct 1 ms 348 KB Output is correct
33 Correct 1 ms 604 KB Output is correct
34 Correct 1 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 596 KB Output is correct
39 Correct 0 ms 344 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 600 KB Output is correct
43 Correct 0 ms 396 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 0 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 344 KB Output is correct
54 Correct 2 ms 860 KB Output is correct
55 Correct 2 ms 856 KB Output is correct
56 Correct 2 ms 600 KB Output is correct
57 Correct 1 ms 604 KB Output is correct
58 Correct 1 ms 604 KB Output is correct
59 Correct 2 ms 860 KB Output is correct
60 Correct 2 ms 604 KB Output is correct
61 Correct 1 ms 600 KB Output is correct
62 Correct 1 ms 604 KB Output is correct
63 Correct 1 ms 860 KB Output is correct
64 Correct 1 ms 604 KB Output is correct
65 Correct 1 ms 604 KB Output is correct
66 Correct 2 ms 604 KB Output is correct
67 Correct 1 ms 604 KB Output is correct
68 Correct 2 ms 604 KB Output is correct
69 Correct 2 ms 604 KB Output is correct
70 Correct 2 ms 604 KB Output is correct
71 Correct 1 ms 604 KB Output is correct
72 Correct 2 ms 832 KB Output is correct
73 Correct 2 ms 604 KB Output is correct
74 Correct 2 ms 604 KB Output is correct
75 Correct 2 ms 604 KB Output is correct
76 Correct 2 ms 604 KB Output is correct
77 Correct 2 ms 604 KB Output is correct
78 Correct 1 ms 604 KB Output is correct
79 Correct 2 ms 604 KB Output is correct
80 Correct 1 ms 600 KB Output is correct
81 Correct 1 ms 600 KB Output is correct
82 Correct 2 ms 604 KB Output is correct
83 Correct 1 ms 604 KB Output is correct
84 Correct 1 ms 604 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 604 KB Output is correct
89 Correct 2 ms 604 KB Output is correct
90 Correct 1 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 604 KB Output is correct
96 Correct 1 ms 604 KB Output is correct
97 Correct 2 ms 604 KB Output is correct
98 Correct 1 ms 768 KB Output is correct
99 Correct 2 ms 604 KB Output is correct
100 Correct 1 ms 604 KB Output is correct
101 Correct 1 ms 604 KB Output is correct
102 Correct 0 ms 348 KB Output is correct
103 Correct 0 ms 348 KB Output is correct
104 Correct 0 ms 348 KB Output is correct
105 Correct 0 ms 348 KB Output is correct
106 Correct 0 ms 348 KB Output is correct
107 Correct 0 ms 348 KB Output is correct
108 Correct 0 ms 348 KB Output is correct
109 Correct 1 ms 348 KB Output is correct
110 Correct 0 ms 348 KB Output is correct
111 Correct 0 ms 348 KB Output is correct
112 Correct 1 ms 344 KB Output is correct
113 Correct 1 ms 348 KB Output is correct
114 Correct 1 ms 604 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 53 ms 21096 KB Output is correct
2 Correct 53 ms 21076 KB Output is correct
3 Correct 32 ms 13956 KB Output is correct
4 Correct 7 ms 3420 KB Output is correct
5 Correct 5 ms 2140 KB Output is correct
6 Correct 11 ms 4964 KB Output is correct
7 Correct 0 ms 344 KB Output is correct
8 Correct 23 ms 7952 KB Output is correct
9 Correct 33 ms 10844 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 46 ms 14168 KB Output is correct
12 Correct 59 ms 17488 KB Output is correct
13 Correct 1 ms 600 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 1 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 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 0 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 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 0 ms 344 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 344 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 344 KB Output is correct
39 Correct 54 ms 20980 KB Output is correct
40 Correct 55 ms 21076 KB Output is correct
41 Correct 33 ms 13956 KB Output is correct
42 Correct 7 ms 3288 KB Output is correct
43 Correct 0 ms 344 KB Output is correct
44 Correct 0 ms 344 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 0 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 0 ms 348 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 61 ms 13724 KB Output is correct
58 Correct 63 ms 13740 KB Output is correct
59 Correct 75 ms 13892 KB Output is correct
60 Correct 60 ms 13908 KB Output is correct
61 Correct 61 ms 13904 KB Output is correct
62 Correct 59 ms 13904 KB Output is correct
63 Correct 72 ms 13788 KB Output is correct
64 Correct 57 ms 13760 KB Output is correct
65 Correct 57 ms 13904 KB Output is correct
66 Correct 58 ms 13892 KB Output is correct
67 Correct 74 ms 13904 KB Output is correct
68 Correct 60 ms 13856 KB Output is correct
69 Correct 63 ms 13880 KB Output is correct
70 Correct 61 ms 13836 KB Output is correct
71 Correct 0 ms 348 KB Output is correct
72 Correct 2 ms 604 KB Output is correct
73 Correct 2 ms 604 KB Output is correct
74 Correct 2 ms 860 KB Output is correct
75 Correct 2 ms 604 KB Output is correct
76 Correct 1 ms 604 KB Output is correct
77 Correct 1 ms 604 KB Output is correct
78 Correct 2 ms 600 KB Output is correct
79 Correct 2 ms 604 KB Output is correct
80 Correct 61 ms 13848 KB Output is correct
81 Correct 62 ms 13652 KB Output is correct
82 Correct 55 ms 13832 KB Output is correct
83 Correct 62 ms 13908 KB Output is correct
84 Correct 1 ms 600 KB Output is correct
85 Correct 1 ms 604 KB Output is correct
86 Correct 1 ms 604 KB Output is correct
87 Correct 1 ms 604 KB Output is correct
88 Correct 1 ms 604 KB Output is correct
89 Correct 1 ms 604 KB Output is correct
90 Correct 1 ms 604 KB Output is correct
91 Correct 1 ms 604 KB Output is correct
92 Correct 2 ms 604 KB Output is correct
93 Correct 2 ms 604 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 348 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 348 KB Output is correct
101 Correct 0 ms 348 KB Output is correct
102 Correct 0 ms 348 KB Output is correct
103 Correct 1 ms 348 KB Output is correct
104 Correct 6 ms 2140 KB Output is correct
105 Correct 11 ms 4956 KB Output is correct
106 Correct 0 ms 348 KB Output is correct
107 Correct 23 ms 7964 KB Output is correct
108 Correct 31 ms 10844 KB Output is correct
109 Correct 1 ms 348 KB Output is correct
110 Correct 53 ms 14040 KB Output is correct
111 Correct 59 ms 17472 KB Output is correct
112 Correct 1 ms 604 KB Output is correct
113 Correct 91 ms 22956 KB Output is correct
114 Execution timed out 1057 ms 10592 KB Time limit exceeded
115 Halted 0 ms 0 KB -