# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1035353 |
2024-07-26T09:48:55 Z |
c2zi6 |
Dreaming (IOI13_dreaming) |
C++14 |
|
1000 ms |
16824 KB |
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define all(a) (a).begin(), (a).end()
#define replr(i, a, b) for (int i = int(a); i <= int(b); ++i)
#define reprl(i, a, b) for (int i = int(a); i >= int(b); --i)
#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define mkp(a, b) make_pair(a, b)
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<PII> VPI;
typedef vector<VI> VVI;
typedef vector<VVI> VVVI;
typedef vector<VPI> VVPI;
typedef pair<ll, ll> PLL;
typedef vector<ll> VL;
typedef vector<PLL> VPL;
typedef vector<VL> VVL;
typedef vector<VVL> VVVL;
typedef vector<VPL> VVPL;
template<class T> T setmax(T& a, T b) {if (a < b) return a = b; return a;}
template<class T> T setmin(T& a, T b) {if (a < b) return a; return a = b;}
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
template<class T>
using indset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#include "dreaming.h"
int n, m, L;
VVPI gp;
void dfs(int u, int p, VI& dist, VI& comp) {
comp.pb(u);
for (auto[v, w] : gp[u]) if (v != p) {
dist[v] = dist[u] + w;
dfs(v, u, dist, comp);
}
}
void dfs(int u, int p, VI& dist) {
for (auto[v, w] : gp[u]) if (v != p) {
dist[v] = dist[u] + w;
dfs(v, u, dist);
}
}
int amenaheru(VI& comp, VI& dist) {
int ret;
int mx = -2e9;
for (int u : comp) if (dist[u] > mx) {
ret = u;
mx = dist[u];
}
return ret;
}
int amenamejtex(VI& comp, VI& maxdist) {
int ret = 2e9;
for (int u : comp) setmin(ret, maxdist[u]);
return ret;
}
int travelTime(int N, int M, int L_arg, int A[], int B[], int T[]) {
n = N;
m = M;
L = L_arg;
gp = VVPI(n);
rep(i, m) {
int u = A[i];
int v = B[i];
int w = T[i];
gp[u].pb({v, w});
gp[v].pb({u, w});
}
VI dist(n, 2e9);
VI distd1(n);
VI distd2(n);
VI maxdist(n);
int globald = 0;
VVI comp;
rep(u, n) if (dist[u] == 2e9) {
dist[u] = 0;
comp.pb(VI());
dfs(u, -1, dist, comp.back());
int d1 = amenaheru(comp.back(), dist);
dfs(d1, -1, distd1);
int d2 = amenaheru(comp.back(), distd1);
dfs(d2, -1, distd2);
for (int u : comp.back()) maxdist[u] = max(distd1[u], distd2[u]);
int diameter = distd1[d2];
setmax(globald, diameter);
/*cout << "COMPONENT: ";*/
/*for (int u : comp.back()) cout << u << " "; cout << endl;*/
/*cout << "DIAMETER: " << d1 << " " << d2 << " " << distd1[d2] << endl;*/
/*cout << "FARTHEST PATH LENGTH FROM " << endl;*/
/*for (int u : comp.back()) {*/
/* cout << u << ": " << maxdist[u] << endl;*/
/*}*/
/*cout << endl;*/
}
/*if (comp.size() > 2) {*/
/* VI a(3, 0);*/
/* rep(u, n) for (auto[v, w] : gp[u]) {*/
/* if (u < v) a.pb(w);*/
/* }*/
/* sort(all(a));*/
/* reverse(all(a));*/
/* VI b;*/
/* b.pb(a[0]);*/
/* b.pb(a[1]+L);*/
/* b.pb(a[2]+L);*/
/* sort(all(b));*/
/* reverse(all(b));*/
/* return b[0] + b[1];*/
/*}*/
VI mid;
for (VI& c : comp) {
mid.pb(amenamejtex(c, maxdist));
}
int answer = 2e9;
rep(i, comp.size()) {
int diameter = globald;
VI children;
children.pb(0);
children.pb(mid[i]);
rep(j, comp.size()) if (j != i) {
children.pb(mid[j] + L);
}
sort(all(children));
reverse(all(children));
setmax(diameter, children[0] + children[1]);
/*cout << "IF THE CENTER IS " << i << ", THE DIAMETER IS " << diameter << endl;*/
setmin(answer, diameter);
}
return answer;
}
Compilation message
dreaming.cpp: In function 'void dfs(int, int, VI&, VI&)':
dreaming.cpp:38:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
38 | for (auto[v, w] : gp[u]) if (v != p) {
| ^
dreaming.cpp: In function 'void dfs(int, int, VI&)':
dreaming.cpp:44:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
44 | for (auto[v, w] : gp[u]) if (v != p) {
| ^
dreaming.cpp: In function 'int amenaheru(VI&, VI&)':
dreaming.cpp:57:12: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
57 | return ret;
| ^~~
dreaming.cpp: In function 'int travelTime(int, int, int, int*, int*, int*)':
dreaming.cpp:93:33: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
93 | int diameter = distd1[d2];
| ^
dreaming.cpp:89:12: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
89 | dfs(d1, -1, distd1);
| ~~~^~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
33 ms |
15312 KB |
Output is correct |
2 |
Correct |
33 ms |
15320 KB |
Output is correct |
3 |
Correct |
21 ms |
10200 KB |
Output is correct |
4 |
Correct |
4 ms |
2648 KB |
Output is correct |
5 |
Correct |
4 ms |
1628 KB |
Output is correct |
6 |
Correct |
9 ms |
3676 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
19 ms |
6024 KB |
Output is correct |
9 |
Correct |
21 ms |
7852 KB |
Output is correct |
10 |
Correct |
1 ms |
344 KB |
Output is correct |
11 |
Correct |
30 ms |
10528 KB |
Output is correct |
12 |
Correct |
38 ms |
12748 KB |
Output is correct |
13 |
Correct |
1 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 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 |
1 ms |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
1 ms |
344 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 |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
1 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 |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
33 ms |
15312 KB |
Output is correct |
2 |
Correct |
33 ms |
15320 KB |
Output is correct |
3 |
Correct |
21 ms |
10200 KB |
Output is correct |
4 |
Correct |
4 ms |
2648 KB |
Output is correct |
5 |
Correct |
4 ms |
1628 KB |
Output is correct |
6 |
Correct |
9 ms |
3676 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
19 ms |
6024 KB |
Output is correct |
9 |
Correct |
21 ms |
7852 KB |
Output is correct |
10 |
Correct |
1 ms |
344 KB |
Output is correct |
11 |
Correct |
30 ms |
10528 KB |
Output is correct |
12 |
Correct |
38 ms |
12748 KB |
Output is correct |
13 |
Correct |
1 ms |
344 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 |
344 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
1 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 |
1 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 |
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 |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
1 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 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 |
35 ms |
15228 KB |
Output is correct |
40 |
Correct |
34 ms |
15112 KB |
Output is correct |
41 |
Correct |
21 ms |
10200 KB |
Output is correct |
42 |
Correct |
5 ms |
2652 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 |
1 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
444 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 |
37 ms |
11368 KB |
Output is correct |
58 |
Correct |
41 ms |
11344 KB |
Output is correct |
59 |
Correct |
39 ms |
11188 KB |
Output is correct |
60 |
Correct |
38 ms |
11216 KB |
Output is correct |
61 |
Correct |
41 ms |
11472 KB |
Output is correct |
62 |
Correct |
43 ms |
11348 KB |
Output is correct |
63 |
Correct |
37 ms |
10964 KB |
Output is correct |
64 |
Correct |
37 ms |
11020 KB |
Output is correct |
65 |
Correct |
38 ms |
11304 KB |
Output is correct |
66 |
Correct |
36 ms |
11216 KB |
Output is correct |
67 |
Correct |
43 ms |
11216 KB |
Output is correct |
68 |
Correct |
37 ms |
11212 KB |
Output is correct |
69 |
Correct |
40 ms |
11600 KB |
Output is correct |
70 |
Correct |
37 ms |
11468 KB |
Output is correct |
71 |
Correct |
0 ms |
348 KB |
Output is correct |
72 |
Correct |
1 ms |
604 KB |
Output is correct |
73 |
Correct |
1 ms |
604 KB |
Output is correct |
74 |
Correct |
1 ms |
604 KB |
Output is correct |
75 |
Correct |
1 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 |
1 ms |
604 KB |
Output is correct |
79 |
Correct |
1 ms |
756 KB |
Output is correct |
80 |
Correct |
38 ms |
11448 KB |
Output is correct |
81 |
Correct |
42 ms |
11216 KB |
Output is correct |
82 |
Correct |
36 ms |
11472 KB |
Output is correct |
83 |
Correct |
45 ms |
11320 KB |
Output is correct |
84 |
Correct |
1 ms |
600 KB |
Output is correct |
85 |
Correct |
1 ms |
492 KB |
Output is correct |
86 |
Correct |
1 ms |
604 KB |
Output is correct |
87 |
Correct |
1 ms |
712 KB |
Output is correct |
88 |
Correct |
1 ms |
600 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 |
1 ms |
604 KB |
Output is correct |
93 |
Correct |
1 ms |
604 KB |
Output is correct |
94 |
Correct |
1 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 |
1 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 |
0 ms |
348 KB |
Output is correct |
104 |
Correct |
4 ms |
1644 KB |
Output is correct |
105 |
Correct |
10 ms |
3676 KB |
Output is correct |
106 |
Correct |
1 ms |
344 KB |
Output is correct |
107 |
Correct |
18 ms |
5976 KB |
Output is correct |
108 |
Correct |
23 ms |
7860 KB |
Output is correct |
109 |
Correct |
1 ms |
344 KB |
Output is correct |
110 |
Correct |
31 ms |
10580 KB |
Output is correct |
111 |
Correct |
57 ms |
12756 KB |
Output is correct |
112 |
Correct |
1 ms |
344 KB |
Output is correct |
113 |
Correct |
49 ms |
16824 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1064 ms |
11024 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 |
0 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 |
1 ms |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
1 ms |
344 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 |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
1 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 |
344 KB |
Output is correct |
26 |
Correct |
1 ms |
344 KB |
Output is correct |
27 |
Correct |
2 ms |
604 KB |
Output is correct |
28 |
Correct |
4 ms |
604 KB |
Output is correct |
29 |
Correct |
1 ms |
448 KB |
Output is correct |
30 |
Correct |
2 ms |
604 KB |
Output is correct |
31 |
Correct |
3 ms |
604 KB |
Output is correct |
32 |
Correct |
1 ms |
348 KB |
Output is correct |
33 |
Correct |
2 ms |
604 KB |
Output is correct |
34 |
Correct |
3 ms |
720 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
440 KB |
Output is correct |
37 |
Correct |
0 ms |
452 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
444 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
1 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
1 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 |
344 KB |
Output is correct |
53 |
Correct |
0 ms |
348 KB |
Output is correct |
54 |
Correct |
1 ms |
860 KB |
Output is correct |
55 |
Correct |
1 ms |
860 KB |
Output is correct |
56 |
Correct |
20 ms |
784 KB |
Output is correct |
57 |
Correct |
54 ms |
604 KB |
Output is correct |
58 |
Correct |
1 ms |
604 KB |
Output is correct |
59 |
Correct |
1 ms |
604 KB |
Output is correct |
60 |
Correct |
32 ms |
600 KB |
Output is correct |
61 |
Correct |
45 ms |
604 KB |
Output is correct |
62 |
Correct |
1 ms |
604 KB |
Output is correct |
63 |
Correct |
1 ms |
604 KB |
Output is correct |
64 |
Correct |
71 ms |
604 KB |
Output is correct |
65 |
Correct |
22 ms |
600 KB |
Output is correct |
66 |
Correct |
1 ms |
604 KB |
Output is correct |
67 |
Correct |
1 ms |
604 KB |
Output is correct |
68 |
Correct |
30 ms |
604 KB |
Output is correct |
69 |
Correct |
19 ms |
600 KB |
Output is correct |
70 |
Correct |
40 ms |
604 KB |
Output is correct |
71 |
Correct |
36 ms |
600 KB |
Output is correct |
72 |
Correct |
2 ms |
604 KB |
Output is correct |
73 |
Correct |
1 ms |
768 KB |
Output is correct |
74 |
Correct |
2 ms |
604 KB |
Output is correct |
75 |
Correct |
1 ms |
604 KB |
Output is correct |
76 |
Correct |
1 ms |
600 KB |
Output is correct |
77 |
Correct |
1 ms |
600 KB |
Output is correct |
78 |
Correct |
37 ms |
604 KB |
Output is correct |
79 |
Correct |
40 ms |
604 KB |
Output is correct |
80 |
Correct |
79 ms |
604 KB |
Output is correct |
81 |
Correct |
111 ms |
604 KB |
Output is correct |
82 |
Correct |
4 ms |
600 KB |
Output is correct |
83 |
Correct |
3 ms |
604 KB |
Output is correct |
84 |
Correct |
60 ms |
604 KB |
Output is correct |
85 |
Correct |
71 ms |
700 KB |
Output is correct |
86 |
Correct |
12 ms |
604 KB |
Output is correct |
87 |
Correct |
2 ms |
604 KB |
Output is correct |
88 |
Correct |
13 ms |
600 KB |
Output is correct |
89 |
Correct |
20 ms |
708 KB |
Output is correct |
90 |
Correct |
46 ms |
604 KB |
Output is correct |
91 |
Correct |
50 ms |
604 KB |
Output is correct |
92 |
Correct |
1 ms |
604 KB |
Output is correct |
93 |
Correct |
1 ms |
488 KB |
Output is correct |
94 |
Correct |
1 ms |
604 KB |
Output is correct |
95 |
Correct |
1 ms |
604 KB |
Output is correct |
96 |
Correct |
2 ms |
604 KB |
Output is correct |
97 |
Correct |
1 ms |
600 KB |
Output is correct |
98 |
Correct |
1 ms |
604 KB |
Output is correct |
99 |
Correct |
1 ms |
604 KB |
Output is correct |
100 |
Correct |
1 ms |
604 KB |
Output is correct |
101 |
Correct |
2 ms |
604 KB |
Output is correct |
102 |
Correct |
0 ms |
344 KB |
Output is correct |
103 |
Correct |
0 ms |
348 KB |
Output is correct |
104 |
Correct |
0 ms |
348 KB |
Output is correct |
105 |
Correct |
1 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 |
0 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 |
0 ms |
348 KB |
Output is correct |
113 |
Correct |
1 ms |
348 KB |
Output is correct |
114 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
33 ms |
15312 KB |
Output is correct |
2 |
Correct |
33 ms |
15320 KB |
Output is correct |
3 |
Correct |
21 ms |
10200 KB |
Output is correct |
4 |
Correct |
4 ms |
2648 KB |
Output is correct |
5 |
Correct |
4 ms |
1628 KB |
Output is correct |
6 |
Correct |
9 ms |
3676 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
19 ms |
6024 KB |
Output is correct |
9 |
Correct |
21 ms |
7852 KB |
Output is correct |
10 |
Correct |
1 ms |
344 KB |
Output is correct |
11 |
Correct |
30 ms |
10528 KB |
Output is correct |
12 |
Correct |
38 ms |
12748 KB |
Output is correct |
13 |
Correct |
1 ms |
344 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 |
344 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
1 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 |
1 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 |
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 |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
1 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 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 |
35 ms |
15228 KB |
Output is correct |
40 |
Correct |
34 ms |
15112 KB |
Output is correct |
41 |
Correct |
21 ms |
10200 KB |
Output is correct |
42 |
Correct |
5 ms |
2652 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 |
1 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
444 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 |
37 ms |
11368 KB |
Output is correct |
58 |
Correct |
41 ms |
11344 KB |
Output is correct |
59 |
Correct |
39 ms |
11188 KB |
Output is correct |
60 |
Correct |
38 ms |
11216 KB |
Output is correct |
61 |
Correct |
41 ms |
11472 KB |
Output is correct |
62 |
Correct |
43 ms |
11348 KB |
Output is correct |
63 |
Correct |
37 ms |
10964 KB |
Output is correct |
64 |
Correct |
37 ms |
11020 KB |
Output is correct |
65 |
Correct |
38 ms |
11304 KB |
Output is correct |
66 |
Correct |
36 ms |
11216 KB |
Output is correct |
67 |
Correct |
43 ms |
11216 KB |
Output is correct |
68 |
Correct |
37 ms |
11212 KB |
Output is correct |
69 |
Correct |
40 ms |
11600 KB |
Output is correct |
70 |
Correct |
37 ms |
11468 KB |
Output is correct |
71 |
Correct |
0 ms |
348 KB |
Output is correct |
72 |
Correct |
1 ms |
604 KB |
Output is correct |
73 |
Correct |
1 ms |
604 KB |
Output is correct |
74 |
Correct |
1 ms |
604 KB |
Output is correct |
75 |
Correct |
1 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 |
1 ms |
604 KB |
Output is correct |
79 |
Correct |
1 ms |
756 KB |
Output is correct |
80 |
Correct |
38 ms |
11448 KB |
Output is correct |
81 |
Correct |
42 ms |
11216 KB |
Output is correct |
82 |
Correct |
36 ms |
11472 KB |
Output is correct |
83 |
Correct |
45 ms |
11320 KB |
Output is correct |
84 |
Correct |
1 ms |
600 KB |
Output is correct |
85 |
Correct |
1 ms |
492 KB |
Output is correct |
86 |
Correct |
1 ms |
604 KB |
Output is correct |
87 |
Correct |
1 ms |
712 KB |
Output is correct |
88 |
Correct |
1 ms |
600 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 |
1 ms |
604 KB |
Output is correct |
93 |
Correct |
1 ms |
604 KB |
Output is correct |
94 |
Correct |
1 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 |
1 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 |
0 ms |
348 KB |
Output is correct |
104 |
Correct |
4 ms |
1644 KB |
Output is correct |
105 |
Correct |
10 ms |
3676 KB |
Output is correct |
106 |
Correct |
1 ms |
344 KB |
Output is correct |
107 |
Correct |
18 ms |
5976 KB |
Output is correct |
108 |
Correct |
23 ms |
7860 KB |
Output is correct |
109 |
Correct |
1 ms |
344 KB |
Output is correct |
110 |
Correct |
31 ms |
10580 KB |
Output is correct |
111 |
Correct |
57 ms |
12756 KB |
Output is correct |
112 |
Correct |
1 ms |
344 KB |
Output is correct |
113 |
Correct |
49 ms |
16824 KB |
Output is correct |
114 |
Execution timed out |
1064 ms |
11024 KB |
Time limit exceeded |
115 |
Halted |
0 ms |
0 KB |
- |