#include "dreaming.h"
#include <iostream>
#include <vector>
#include <assert.h>
int component[100010] = { 0 };
int best[100010] = { 0 };
int componentmin[100010] = { 0 };
int curmax[100010] = { 0 }, curmax2[100010] = { 0 };
int n, m, l;
std::vector< std::vector< std::pair<int, int> > > g(100010);
void dfs(int index, int parent, int mark)
{
for (int i = 0; i < g[index].size(); ++i)
{
int next = g[index][i].second;
int nextVal = g[index][i].first;
if (next != parent)
{
dfs(next, index, mark);
curmax[index] = std::max(curmax[index], curmax[next] + nextVal);
}
}
component[index] = mark;
}
void dfsout(int index, int parent, int pathSum)
{
int max1 = best[index], max2 = -1;
for (int i = 0; i < g[index].size(); ++i)
{
int next = g[index][i].second;
int nextVal = g[index][i].first;
if (next != parent)
{
if (nextVal + curmax[next] > max1)
{
max2 = max1;
max1 = nextVal + curmax[next];
}
else if (nextVal + curmax[next] > max2)
{
max2 = nextVal + curmax[next];
}
}
}
for (int i = 0; i < g[index].size(); ++i)
{
int next = g[index][i].second;
int nextVal = g[index][i].first;
if (next != parent)
{
if (nextVal + curmax[next] == max1)
{
curmax[next] = std::max(curmax[next], nextVal + max2);
best[next] = max2 + nextVal;
}
else
{
curmax[next] = std::max(curmax[next], nextVal + max1);
best[next] = max1 + nextVal;
}
dfsout(next, index, 0);
}
}
}
int dfs2(int index, int parent, int sum)
{
int max = sum;
for (int i = 0; i < g[index].size(); ++i)
{
int next = g[index][i].second;
int nextVal = g[index][i].first;
if (next != parent)
{
max = std::max(max, dfs2(next, index, sum + nextVal));
}
}
return max;
}
int travelTime(int N, int M, int L, int A[], int B[], int T[]) {
n = N;
m = M;
l = L;
for (int i = 0; i < m; ++i)
{
g[A[i]].push_back(std::make_pair(T[i], B[i]));
g[B[i]].push_back(std::make_pair(T[i], A[i]));
}
int cnt = 1;
for (int i = 0; i < n; ++i)
{
if (!component[i])
{
dfs(i, -1, cnt);
dfsout(i, -1, 0);
++cnt;
}
}
/*
for (int i = 0; i < n; ++i)
{
curmax2[i] = dfs2(i, -1, 0);
}
*/
for (int i = 1; i < cnt; ++i)
{
componentmin[i] = 1e9 + 5;
}
for (int i = 0; i < n; ++i)
{
componentmin[component[i]] = std::min(componentmin[component[i]], curmax[i]);
// std::cout << i << " " << curmax[i] << " " << curmax2[i] << "\n";
}
int ans = 0;
int max = -1;
int maxindex;
for (int i = 1; i < cnt; ++i)
{
if (componentmin[i] > max)
{
max = componentmin[i];
maxindex = i;
}
}
for (int i = 0; i < n; ++i)
{
ans = std::max(ans, curmax[i]);
}
if (m == n - 1)
return componentmin[1];
for (int i = 1; i < cnt; ++i)
{
if (i != maxindex)
{
ans = std::max(ans, l + max + componentmin[i]);
}
}
int max1 = -1, max1index;
for (int i = 1; i < cnt; ++i)
{
if (i != maxindex)
{
if (componentmin[i] > max1)
{
max1 = componentmin[i];
max1index = i;
}
}
}
for (int i = 1; i < cnt; ++i)
{
if (i != maxindex && i != max1index)
{
ans = std::max(ans, max1 + 2 * l + componentmin[i]);
}
}
return ans;
}
Compilation message
dreaming.cpp: In function 'void dfs(int, int, int)':
dreaming.cpp:16:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < g[index].size(); ++i)
~~^~~~~~~~~~~~~~~~~
dreaming.cpp: In function 'void dfsout(int, int, int)':
dreaming.cpp:34:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < g[index].size(); ++i)
~~^~~~~~~~~~~~~~~~~
dreaming.cpp:53:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < g[index].size(); ++i)
~~^~~~~~~~~~~~~~~~~
dreaming.cpp: In function 'int dfs2(int, int, int)':
dreaming.cpp:79:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < g[index].size(); ++i)
~~^~~~~~~~~~~~~~~~~
dreaming.cpp: In function 'int travelTime(int, int, int, int*, int*, int*)':
dreaming.cpp:176:32: warning: 'max1index' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (i != maxindex && i != max1index)
~~^~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
61 ms |
11640 KB |
Output is correct |
2 |
Correct |
60 ms |
11384 KB |
Output is correct |
3 |
Correct |
43 ms |
9984 KB |
Output is correct |
4 |
Correct |
11 ms |
3968 KB |
Output is correct |
5 |
Correct |
9 ms |
3456 KB |
Output is correct |
6 |
Correct |
16 ms |
4608 KB |
Output is correct |
7 |
Correct |
5 ms |
2816 KB |
Output is correct |
8 |
Correct |
29 ms |
6392 KB |
Output is correct |
9 |
Correct |
38 ms |
8420 KB |
Output is correct |
10 |
Correct |
4 ms |
2816 KB |
Output is correct |
11 |
Correct |
52 ms |
9208 KB |
Output is correct |
12 |
Correct |
73 ms |
10360 KB |
Output is correct |
13 |
Correct |
5 ms |
2816 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
61 ms |
11640 KB |
Output is correct |
2 |
Correct |
60 ms |
11384 KB |
Output is correct |
3 |
Correct |
43 ms |
9984 KB |
Output is correct |
4 |
Correct |
11 ms |
3968 KB |
Output is correct |
5 |
Correct |
9 ms |
3456 KB |
Output is correct |
6 |
Correct |
16 ms |
4608 KB |
Output is correct |
7 |
Correct |
5 ms |
2816 KB |
Output is correct |
8 |
Correct |
29 ms |
6392 KB |
Output is correct |
9 |
Correct |
38 ms |
8420 KB |
Output is correct |
10 |
Correct |
4 ms |
2816 KB |
Output is correct |
11 |
Correct |
52 ms |
9208 KB |
Output is correct |
12 |
Correct |
73 ms |
10360 KB |
Output is correct |
13 |
Correct |
5 ms |
2816 KB |
Output is correct |
14 |
Correct |
4 ms |
2688 KB |
Output is correct |
15 |
Correct |
3 ms |
2688 KB |
Output is correct |
16 |
Correct |
8 ms |
2688 KB |
Output is correct |
17 |
Correct |
4 ms |
2688 KB |
Output is correct |
18 |
Correct |
4 ms |
2688 KB |
Output is correct |
19 |
Correct |
4 ms |
2688 KB |
Output is correct |
20 |
Correct |
4 ms |
2688 KB |
Output is correct |
21 |
Correct |
4 ms |
2688 KB |
Output is correct |
22 |
Correct |
4 ms |
2688 KB |
Output is correct |
23 |
Correct |
4 ms |
2688 KB |
Output is correct |
24 |
Correct |
4 ms |
2688 KB |
Output is correct |
25 |
Correct |
4 ms |
2688 KB |
Output is correct |
26 |
Correct |
4 ms |
2688 KB |
Output is correct |
27 |
Correct |
4 ms |
2688 KB |
Output is correct |
28 |
Correct |
4 ms |
2688 KB |
Output is correct |
29 |
Correct |
4 ms |
2688 KB |
Output is correct |
30 |
Correct |
4 ms |
2688 KB |
Output is correct |
31 |
Correct |
4 ms |
2816 KB |
Output is correct |
32 |
Correct |
4 ms |
2688 KB |
Output is correct |
33 |
Correct |
3 ms |
2688 KB |
Output is correct |
34 |
Correct |
4 ms |
2688 KB |
Output is correct |
35 |
Correct |
4 ms |
2688 KB |
Output is correct |
36 |
Correct |
4 ms |
2688 KB |
Output is correct |
37 |
Correct |
4 ms |
2688 KB |
Output is correct |
38 |
Correct |
4 ms |
2688 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
61 ms |
11640 KB |
Output is correct |
2 |
Correct |
60 ms |
11384 KB |
Output is correct |
3 |
Correct |
43 ms |
9984 KB |
Output is correct |
4 |
Correct |
11 ms |
3968 KB |
Output is correct |
5 |
Correct |
9 ms |
3456 KB |
Output is correct |
6 |
Correct |
16 ms |
4608 KB |
Output is correct |
7 |
Correct |
5 ms |
2816 KB |
Output is correct |
8 |
Correct |
29 ms |
6392 KB |
Output is correct |
9 |
Correct |
38 ms |
8420 KB |
Output is correct |
10 |
Correct |
4 ms |
2816 KB |
Output is correct |
11 |
Correct |
52 ms |
9208 KB |
Output is correct |
12 |
Correct |
73 ms |
10360 KB |
Output is correct |
13 |
Correct |
5 ms |
2816 KB |
Output is correct |
14 |
Correct |
4 ms |
2688 KB |
Output is correct |
15 |
Correct |
3 ms |
2688 KB |
Output is correct |
16 |
Correct |
8 ms |
2688 KB |
Output is correct |
17 |
Correct |
4 ms |
2688 KB |
Output is correct |
18 |
Correct |
4 ms |
2688 KB |
Output is correct |
19 |
Correct |
4 ms |
2688 KB |
Output is correct |
20 |
Correct |
4 ms |
2688 KB |
Output is correct |
21 |
Correct |
4 ms |
2688 KB |
Output is correct |
22 |
Correct |
4 ms |
2688 KB |
Output is correct |
23 |
Correct |
4 ms |
2688 KB |
Output is correct |
24 |
Correct |
4 ms |
2688 KB |
Output is correct |
25 |
Correct |
4 ms |
2688 KB |
Output is correct |
26 |
Correct |
4 ms |
2688 KB |
Output is correct |
27 |
Correct |
4 ms |
2688 KB |
Output is correct |
28 |
Correct |
4 ms |
2688 KB |
Output is correct |
29 |
Correct |
4 ms |
2688 KB |
Output is correct |
30 |
Correct |
4 ms |
2688 KB |
Output is correct |
31 |
Correct |
4 ms |
2816 KB |
Output is correct |
32 |
Correct |
4 ms |
2688 KB |
Output is correct |
33 |
Correct |
3 ms |
2688 KB |
Output is correct |
34 |
Correct |
4 ms |
2688 KB |
Output is correct |
35 |
Correct |
4 ms |
2688 KB |
Output is correct |
36 |
Correct |
4 ms |
2688 KB |
Output is correct |
37 |
Correct |
4 ms |
2688 KB |
Output is correct |
38 |
Correct |
4 ms |
2688 KB |
Output is correct |
39 |
Correct |
57 ms |
11616 KB |
Output is correct |
40 |
Correct |
71 ms |
11384 KB |
Output is correct |
41 |
Correct |
39 ms |
9976 KB |
Output is correct |
42 |
Correct |
11 ms |
3968 KB |
Output is correct |
43 |
Correct |
4 ms |
2688 KB |
Output is correct |
44 |
Correct |
4 ms |
2688 KB |
Output is correct |
45 |
Correct |
4 ms |
2688 KB |
Output is correct |
46 |
Correct |
4 ms |
2688 KB |
Output is correct |
47 |
Correct |
4 ms |
2688 KB |
Output is correct |
48 |
Correct |
3 ms |
2688 KB |
Output is correct |
49 |
Correct |
4 ms |
2816 KB |
Output is correct |
50 |
Correct |
4 ms |
2688 KB |
Output is correct |
51 |
Correct |
4 ms |
2688 KB |
Output is correct |
52 |
Correct |
3 ms |
2688 KB |
Output is correct |
53 |
Correct |
4 ms |
2688 KB |
Output is correct |
54 |
Correct |
4 ms |
2688 KB |
Output is correct |
55 |
Correct |
4 ms |
2688 KB |
Output is correct |
56 |
Correct |
4 ms |
2688 KB |
Output is correct |
57 |
Correct |
96 ms |
8952 KB |
Output is correct |
58 |
Correct |
77 ms |
8952 KB |
Output is correct |
59 |
Correct |
71 ms |
8952 KB |
Output is correct |
60 |
Correct |
67 ms |
8952 KB |
Output is correct |
61 |
Correct |
85 ms |
8908 KB |
Output is correct |
62 |
Correct |
69 ms |
8824 KB |
Output is correct |
63 |
Correct |
90 ms |
8696 KB |
Output is correct |
64 |
Correct |
95 ms |
8696 KB |
Output is correct |
65 |
Correct |
72 ms |
8824 KB |
Output is correct |
66 |
Correct |
71 ms |
8696 KB |
Output is correct |
67 |
Correct |
73 ms |
8952 KB |
Output is correct |
68 |
Correct |
79 ms |
8952 KB |
Output is correct |
69 |
Correct |
79 ms |
9080 KB |
Output is correct |
70 |
Correct |
89 ms |
8952 KB |
Output is correct |
71 |
Correct |
3 ms |
2688 KB |
Output is correct |
72 |
Correct |
5 ms |
2944 KB |
Output is correct |
73 |
Correct |
5 ms |
2944 KB |
Output is correct |
74 |
Correct |
5 ms |
2944 KB |
Output is correct |
75 |
Correct |
5 ms |
3116 KB |
Output is correct |
76 |
Correct |
5 ms |
2944 KB |
Output is correct |
77 |
Correct |
5 ms |
2944 KB |
Output is correct |
78 |
Correct |
5 ms |
2944 KB |
Output is correct |
79 |
Correct |
5 ms |
2944 KB |
Output is correct |
80 |
Correct |
72 ms |
8952 KB |
Output is correct |
81 |
Correct |
88 ms |
8924 KB |
Output is correct |
82 |
Correct |
76 ms |
8908 KB |
Output is correct |
83 |
Correct |
69 ms |
8824 KB |
Output is correct |
84 |
Correct |
8 ms |
2944 KB |
Output is correct |
85 |
Correct |
5 ms |
2816 KB |
Output is correct |
86 |
Correct |
5 ms |
2944 KB |
Output is correct |
87 |
Correct |
5 ms |
2944 KB |
Output is correct |
88 |
Correct |
5 ms |
2816 KB |
Output is correct |
89 |
Correct |
5 ms |
2944 KB |
Output is correct |
90 |
Correct |
5 ms |
2816 KB |
Output is correct |
91 |
Correct |
5 ms |
2944 KB |
Output is correct |
92 |
Correct |
5 ms |
2944 KB |
Output is correct |
93 |
Correct |
5 ms |
2944 KB |
Output is correct |
94 |
Correct |
4 ms |
2688 KB |
Output is correct |
95 |
Correct |
4 ms |
2688 KB |
Output is correct |
96 |
Correct |
4 ms |
2688 KB |
Output is correct |
97 |
Correct |
4 ms |
2688 KB |
Output is correct |
98 |
Correct |
4 ms |
2688 KB |
Output is correct |
99 |
Correct |
3 ms |
2688 KB |
Output is correct |
100 |
Correct |
4 ms |
2688 KB |
Output is correct |
101 |
Correct |
4 ms |
2688 KB |
Output is correct |
102 |
Correct |
4 ms |
2688 KB |
Output is correct |
103 |
Correct |
4 ms |
2688 KB |
Output is correct |
104 |
Correct |
9 ms |
3456 KB |
Output is correct |
105 |
Correct |
17 ms |
4608 KB |
Output is correct |
106 |
Correct |
4 ms |
2816 KB |
Output is correct |
107 |
Correct |
30 ms |
6520 KB |
Output is correct |
108 |
Correct |
40 ms |
8488 KB |
Output is correct |
109 |
Correct |
4 ms |
2816 KB |
Output is correct |
110 |
Correct |
51 ms |
9208 KB |
Output is correct |
111 |
Correct |
67 ms |
10488 KB |
Output is correct |
112 |
Correct |
4 ms |
2816 KB |
Output is correct |
113 |
Correct |
87 ms |
15864 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
28 ms |
6400 KB |
Output is correct |
2 |
Correct |
27 ms |
6468 KB |
Output is correct |
3 |
Correct |
23 ms |
6400 KB |
Output is correct |
4 |
Correct |
24 ms |
6400 KB |
Output is correct |
5 |
Correct |
25 ms |
6400 KB |
Output is correct |
6 |
Correct |
27 ms |
6648 KB |
Output is correct |
7 |
Correct |
26 ms |
6528 KB |
Output is correct |
8 |
Correct |
24 ms |
6264 KB |
Output is correct |
9 |
Correct |
30 ms |
6240 KB |
Output is correct |
10 |
Correct |
26 ms |
6520 KB |
Output is correct |
11 |
Correct |
4 ms |
2688 KB |
Output is correct |
12 |
Correct |
6 ms |
4224 KB |
Output is correct |
13 |
Correct |
7 ms |
4224 KB |
Output is correct |
14 |
Correct |
6 ms |
4196 KB |
Output is correct |
15 |
Correct |
7 ms |
4224 KB |
Output is correct |
16 |
Correct |
6 ms |
4096 KB |
Output is correct |
17 |
Correct |
6 ms |
3840 KB |
Output is correct |
18 |
Correct |
6 ms |
4224 KB |
Output is correct |
19 |
Correct |
6 ms |
4224 KB |
Output is correct |
20 |
Correct |
4 ms |
2688 KB |
Output is correct |
21 |
Correct |
3 ms |
2688 KB |
Output is correct |
22 |
Correct |
4 ms |
2816 KB |
Output is correct |
23 |
Correct |
6 ms |
4224 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
61 ms |
11640 KB |
Output is correct |
2 |
Correct |
60 ms |
11384 KB |
Output is correct |
3 |
Correct |
43 ms |
9984 KB |
Output is correct |
4 |
Correct |
11 ms |
3968 KB |
Output is correct |
5 |
Correct |
9 ms |
3456 KB |
Output is correct |
6 |
Correct |
16 ms |
4608 KB |
Output is correct |
7 |
Correct |
5 ms |
2816 KB |
Output is correct |
8 |
Correct |
29 ms |
6392 KB |
Output is correct |
9 |
Correct |
38 ms |
8420 KB |
Output is correct |
10 |
Correct |
4 ms |
2816 KB |
Output is correct |
11 |
Correct |
52 ms |
9208 KB |
Output is correct |
12 |
Correct |
73 ms |
10360 KB |
Output is correct |
13 |
Correct |
5 ms |
2816 KB |
Output is correct |
14 |
Correct |
4 ms |
2816 KB |
Output is correct |
15 |
Correct |
4 ms |
2816 KB |
Output is correct |
16 |
Correct |
5 ms |
2944 KB |
Output is correct |
17 |
Correct |
4 ms |
2688 KB |
Output is correct |
18 |
Correct |
5 ms |
2816 KB |
Output is correct |
19 |
Correct |
5 ms |
2816 KB |
Output is correct |
20 |
Correct |
5 ms |
2816 KB |
Output is correct |
21 |
Correct |
4 ms |
2816 KB |
Output is correct |
22 |
Correct |
5 ms |
2944 KB |
Output is correct |
23 |
Correct |
4 ms |
2688 KB |
Output is correct |
24 |
Correct |
4 ms |
2688 KB |
Output is correct |
25 |
Correct |
4 ms |
2688 KB |
Output is correct |
26 |
Correct |
4 ms |
2688 KB |
Output is correct |
27 |
Correct |
4 ms |
2688 KB |
Output is correct |
28 |
Correct |
3 ms |
2688 KB |
Output is correct |
29 |
Correct |
3 ms |
2688 KB |
Output is correct |
30 |
Correct |
4 ms |
2688 KB |
Output is correct |
31 |
Correct |
4 ms |
2688 KB |
Output is correct |
32 |
Correct |
4 ms |
2688 KB |
Output is correct |
33 |
Correct |
4 ms |
2688 KB |
Output is correct |
34 |
Correct |
4 ms |
2688 KB |
Output is correct |
35 |
Correct |
4 ms |
2688 KB |
Output is correct |
36 |
Correct |
4 ms |
2688 KB |
Output is correct |
37 |
Correct |
4 ms |
2688 KB |
Output is correct |
38 |
Correct |
4 ms |
2688 KB |
Output is correct |
39 |
Correct |
4 ms |
2688 KB |
Output is correct |
40 |
Correct |
4 ms |
2688 KB |
Output is correct |
41 |
Correct |
4 ms |
2688 KB |
Output is correct |
42 |
Incorrect |
5 ms |
2944 KB |
Output isn't correct |
43 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
61 ms |
11640 KB |
Output is correct |
2 |
Correct |
60 ms |
11384 KB |
Output is correct |
3 |
Correct |
43 ms |
9984 KB |
Output is correct |
4 |
Correct |
11 ms |
3968 KB |
Output is correct |
5 |
Correct |
9 ms |
3456 KB |
Output is correct |
6 |
Correct |
16 ms |
4608 KB |
Output is correct |
7 |
Correct |
5 ms |
2816 KB |
Output is correct |
8 |
Correct |
29 ms |
6392 KB |
Output is correct |
9 |
Correct |
38 ms |
8420 KB |
Output is correct |
10 |
Correct |
4 ms |
2816 KB |
Output is correct |
11 |
Correct |
52 ms |
9208 KB |
Output is correct |
12 |
Correct |
73 ms |
10360 KB |
Output is correct |
13 |
Correct |
5 ms |
2816 KB |
Output is correct |
14 |
Correct |
4 ms |
2688 KB |
Output is correct |
15 |
Correct |
3 ms |
2688 KB |
Output is correct |
16 |
Correct |
8 ms |
2688 KB |
Output is correct |
17 |
Correct |
4 ms |
2688 KB |
Output is correct |
18 |
Correct |
4 ms |
2688 KB |
Output is correct |
19 |
Correct |
4 ms |
2688 KB |
Output is correct |
20 |
Correct |
4 ms |
2688 KB |
Output is correct |
21 |
Correct |
4 ms |
2688 KB |
Output is correct |
22 |
Correct |
4 ms |
2688 KB |
Output is correct |
23 |
Correct |
4 ms |
2688 KB |
Output is correct |
24 |
Correct |
4 ms |
2688 KB |
Output is correct |
25 |
Correct |
4 ms |
2688 KB |
Output is correct |
26 |
Correct |
4 ms |
2688 KB |
Output is correct |
27 |
Correct |
4 ms |
2688 KB |
Output is correct |
28 |
Correct |
4 ms |
2688 KB |
Output is correct |
29 |
Correct |
4 ms |
2688 KB |
Output is correct |
30 |
Correct |
4 ms |
2688 KB |
Output is correct |
31 |
Correct |
4 ms |
2816 KB |
Output is correct |
32 |
Correct |
4 ms |
2688 KB |
Output is correct |
33 |
Correct |
3 ms |
2688 KB |
Output is correct |
34 |
Correct |
4 ms |
2688 KB |
Output is correct |
35 |
Correct |
4 ms |
2688 KB |
Output is correct |
36 |
Correct |
4 ms |
2688 KB |
Output is correct |
37 |
Correct |
4 ms |
2688 KB |
Output is correct |
38 |
Correct |
4 ms |
2688 KB |
Output is correct |
39 |
Correct |
57 ms |
11616 KB |
Output is correct |
40 |
Correct |
71 ms |
11384 KB |
Output is correct |
41 |
Correct |
39 ms |
9976 KB |
Output is correct |
42 |
Correct |
11 ms |
3968 KB |
Output is correct |
43 |
Correct |
4 ms |
2688 KB |
Output is correct |
44 |
Correct |
4 ms |
2688 KB |
Output is correct |
45 |
Correct |
4 ms |
2688 KB |
Output is correct |
46 |
Correct |
4 ms |
2688 KB |
Output is correct |
47 |
Correct |
4 ms |
2688 KB |
Output is correct |
48 |
Correct |
3 ms |
2688 KB |
Output is correct |
49 |
Correct |
4 ms |
2816 KB |
Output is correct |
50 |
Correct |
4 ms |
2688 KB |
Output is correct |
51 |
Correct |
4 ms |
2688 KB |
Output is correct |
52 |
Correct |
3 ms |
2688 KB |
Output is correct |
53 |
Correct |
4 ms |
2688 KB |
Output is correct |
54 |
Correct |
4 ms |
2688 KB |
Output is correct |
55 |
Correct |
4 ms |
2688 KB |
Output is correct |
56 |
Correct |
4 ms |
2688 KB |
Output is correct |
57 |
Correct |
96 ms |
8952 KB |
Output is correct |
58 |
Correct |
77 ms |
8952 KB |
Output is correct |
59 |
Correct |
71 ms |
8952 KB |
Output is correct |
60 |
Correct |
67 ms |
8952 KB |
Output is correct |
61 |
Correct |
85 ms |
8908 KB |
Output is correct |
62 |
Correct |
69 ms |
8824 KB |
Output is correct |
63 |
Correct |
90 ms |
8696 KB |
Output is correct |
64 |
Correct |
95 ms |
8696 KB |
Output is correct |
65 |
Correct |
72 ms |
8824 KB |
Output is correct |
66 |
Correct |
71 ms |
8696 KB |
Output is correct |
67 |
Correct |
73 ms |
8952 KB |
Output is correct |
68 |
Correct |
79 ms |
8952 KB |
Output is correct |
69 |
Correct |
79 ms |
9080 KB |
Output is correct |
70 |
Correct |
89 ms |
8952 KB |
Output is correct |
71 |
Correct |
3 ms |
2688 KB |
Output is correct |
72 |
Correct |
5 ms |
2944 KB |
Output is correct |
73 |
Correct |
5 ms |
2944 KB |
Output is correct |
74 |
Correct |
5 ms |
2944 KB |
Output is correct |
75 |
Correct |
5 ms |
3116 KB |
Output is correct |
76 |
Correct |
5 ms |
2944 KB |
Output is correct |
77 |
Correct |
5 ms |
2944 KB |
Output is correct |
78 |
Correct |
5 ms |
2944 KB |
Output is correct |
79 |
Correct |
5 ms |
2944 KB |
Output is correct |
80 |
Correct |
72 ms |
8952 KB |
Output is correct |
81 |
Correct |
88 ms |
8924 KB |
Output is correct |
82 |
Correct |
76 ms |
8908 KB |
Output is correct |
83 |
Correct |
69 ms |
8824 KB |
Output is correct |
84 |
Correct |
8 ms |
2944 KB |
Output is correct |
85 |
Correct |
5 ms |
2816 KB |
Output is correct |
86 |
Correct |
5 ms |
2944 KB |
Output is correct |
87 |
Correct |
5 ms |
2944 KB |
Output is correct |
88 |
Correct |
5 ms |
2816 KB |
Output is correct |
89 |
Correct |
5 ms |
2944 KB |
Output is correct |
90 |
Correct |
5 ms |
2816 KB |
Output is correct |
91 |
Correct |
5 ms |
2944 KB |
Output is correct |
92 |
Correct |
5 ms |
2944 KB |
Output is correct |
93 |
Correct |
5 ms |
2944 KB |
Output is correct |
94 |
Correct |
4 ms |
2688 KB |
Output is correct |
95 |
Correct |
4 ms |
2688 KB |
Output is correct |
96 |
Correct |
4 ms |
2688 KB |
Output is correct |
97 |
Correct |
4 ms |
2688 KB |
Output is correct |
98 |
Correct |
4 ms |
2688 KB |
Output is correct |
99 |
Correct |
3 ms |
2688 KB |
Output is correct |
100 |
Correct |
4 ms |
2688 KB |
Output is correct |
101 |
Correct |
4 ms |
2688 KB |
Output is correct |
102 |
Correct |
4 ms |
2688 KB |
Output is correct |
103 |
Correct |
4 ms |
2688 KB |
Output is correct |
104 |
Correct |
9 ms |
3456 KB |
Output is correct |
105 |
Correct |
17 ms |
4608 KB |
Output is correct |
106 |
Correct |
4 ms |
2816 KB |
Output is correct |
107 |
Correct |
30 ms |
6520 KB |
Output is correct |
108 |
Correct |
40 ms |
8488 KB |
Output is correct |
109 |
Correct |
4 ms |
2816 KB |
Output is correct |
110 |
Correct |
51 ms |
9208 KB |
Output is correct |
111 |
Correct |
67 ms |
10488 KB |
Output is correct |
112 |
Correct |
4 ms |
2816 KB |
Output is correct |
113 |
Correct |
87 ms |
15864 KB |
Output is correct |
114 |
Correct |
28 ms |
6400 KB |
Output is correct |
115 |
Correct |
27 ms |
6468 KB |
Output is correct |
116 |
Correct |
23 ms |
6400 KB |
Output is correct |
117 |
Correct |
24 ms |
6400 KB |
Output is correct |
118 |
Correct |
25 ms |
6400 KB |
Output is correct |
119 |
Correct |
27 ms |
6648 KB |
Output is correct |
120 |
Correct |
26 ms |
6528 KB |
Output is correct |
121 |
Correct |
24 ms |
6264 KB |
Output is correct |
122 |
Correct |
30 ms |
6240 KB |
Output is correct |
123 |
Correct |
26 ms |
6520 KB |
Output is correct |
124 |
Correct |
4 ms |
2688 KB |
Output is correct |
125 |
Correct |
6 ms |
4224 KB |
Output is correct |
126 |
Correct |
7 ms |
4224 KB |
Output is correct |
127 |
Correct |
6 ms |
4196 KB |
Output is correct |
128 |
Correct |
7 ms |
4224 KB |
Output is correct |
129 |
Correct |
6 ms |
4096 KB |
Output is correct |
130 |
Correct |
6 ms |
3840 KB |
Output is correct |
131 |
Correct |
6 ms |
4224 KB |
Output is correct |
132 |
Correct |
6 ms |
4224 KB |
Output is correct |
133 |
Correct |
4 ms |
2688 KB |
Output is correct |
134 |
Correct |
3 ms |
2688 KB |
Output is correct |
135 |
Correct |
4 ms |
2816 KB |
Output is correct |
136 |
Correct |
6 ms |
4224 KB |
Output is correct |
137 |
Correct |
4 ms |
2816 KB |
Output is correct |
138 |
Correct |
4 ms |
2816 KB |
Output is correct |
139 |
Correct |
5 ms |
2944 KB |
Output is correct |
140 |
Correct |
4 ms |
2688 KB |
Output is correct |
141 |
Correct |
5 ms |
2816 KB |
Output is correct |
142 |
Correct |
5 ms |
2816 KB |
Output is correct |
143 |
Correct |
5 ms |
2816 KB |
Output is correct |
144 |
Correct |
4 ms |
2816 KB |
Output is correct |
145 |
Correct |
5 ms |
2944 KB |
Output is correct |
146 |
Correct |
4 ms |
2688 KB |
Output is correct |
147 |
Correct |
4 ms |
2688 KB |
Output is correct |
148 |
Correct |
4 ms |
2688 KB |
Output is correct |
149 |
Correct |
4 ms |
2688 KB |
Output is correct |
150 |
Correct |
4 ms |
2688 KB |
Output is correct |
151 |
Correct |
3 ms |
2688 KB |
Output is correct |
152 |
Correct |
3 ms |
2688 KB |
Output is correct |
153 |
Correct |
4 ms |
2688 KB |
Output is correct |
154 |
Correct |
4 ms |
2688 KB |
Output is correct |
155 |
Correct |
4 ms |
2688 KB |
Output is correct |
156 |
Correct |
4 ms |
2688 KB |
Output is correct |
157 |
Correct |
4 ms |
2688 KB |
Output is correct |
158 |
Correct |
4 ms |
2688 KB |
Output is correct |
159 |
Correct |
4 ms |
2688 KB |
Output is correct |
160 |
Correct |
4 ms |
2688 KB |
Output is correct |
161 |
Correct |
4 ms |
2688 KB |
Output is correct |
162 |
Correct |
4 ms |
2688 KB |
Output is correct |
163 |
Correct |
4 ms |
2688 KB |
Output is correct |
164 |
Correct |
4 ms |
2688 KB |
Output is correct |
165 |
Incorrect |
5 ms |
2944 KB |
Output isn't correct |
166 |
Halted |
0 ms |
0 KB |
- |