#include "dreaming.h"
// O O O O O O O O O O O O O O O OO O OO O OO O O O TTCH O TTTCH O TTTCH O O O O
#pragma GCC optimize("Ofast")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("fast-math")
#pragma GCC target("sse,sse2,sse3,ssse3,popcnt,abm,mmx")
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <cstdio>
#include <math.h>
#include <cmath>
#include <string>
#include <cstring>
#include <queue>
#include <deque>
#include <random>
#include <iomanip>
#include <bitset>
#include <cassert>
using namespace std;
#define y1 y11
#define double long double
#define less less228
#define left left228
#define right right228
#define list list228
template<typename T> void uin(T &a, T b) {
if (b < a) a = b;
}
template<typename T> void uax(T &a, T b) {
if (b > a) a = b;
}
random_device rnd;
template<typename T> void shuffle(vector< T > &v) {
for (int i = 1; i < (int)v.size(); ++i) {
swap(v[rnd() % i], v[i]);
}
for (int i = (int)v.size() - 1; i; --i) {
swap(v[rnd() % i], v[i]);
}
}
const int N = 100 * 1000 + 228;
const int INF = 1e9 + 1000000;
int n, m, L;
int down[N], up[N], f[N];
bool used[N];
vector< pair<int, int> > g[N];
vector<int> order;
void dfs1(int v, int par = -1) {
used[v] = 1;
down[v] = 0;
order.push_back(v);
for (pair<int, int> go : g[v]) {
int to = go.first, w = go.second;
if (to == par) continue;
dfs1(to, v);
uax(down[v], down[to] + w);
}
}
void dfs2(int v, int par = -1) {
vector< pair<int, int> > sons;
vector<int> value, pref, suff;
for (pair<int, int> go : g[v]) {
int to = go.first, w = go.second;
if (to == par) continue;
sons.emplace_back(to, w);
value.push_back(w + down[to]);
}
int sz = (int)sons.size();
pref.resize(sz + 2);
suff.resize(sz + 2);
for (int i = 0; i < sz; ++i) {
pref[i + 1] = max(value[i], pref[i]);
}
for (int i = sz; i; --i) {
suff[i] = max(suff[i + 1], value[i - 1]);
}
for (int i = 1; i <= sz; ++i) {
int to = sons[i - 1].first, w = sons[i - 1].second;
uax(up[to], up[v] + w);
uax(up[to], w + max(pref[i - 1], suff[i + 1]));
}
for (int i = 0; i < sz; ++i) {
dfs2(sons[i].first, v);
}
}
vector<int> comp;
void pre() {
// for (int i = 0; i < n; ++i) {
// vector<int> dist(n, INF);
// dist[i] = 0;
// vector<int> q;
// q.push_back(i);
// for (int it = 0; it < (int)q.size(); ++it) {
// int v = q[it];
// for (pair<int, int> go : g[v]) {
// if (dist[v] + go.second < dist[go.first]) {
// dist[go.first] = dist[v] + go.second;
// q.push_back(go.first);
// }
// }
// }
// for (int j = 0; j < n; ++j) {
// if (dist[j] != INF) {
// uax(f[i], dist[j]);
// }
// }
// }
// for (int i = 0; i < n; ++i) {
// if (!used[i]) {
// order.clear();
// dfs1(i);
// int value = f[order[0]];
// for (int v : order) {
// uin(value, f[v]);
// }
// comp.push_back(value);
// }
// }
for (int i = 0; i < n; ++i) {
down[i] = up[i] = 0;
}
for (int i = 0; i < n; ++i) {
if (!used[i]) {
order.clear();
dfs1(i);
dfs2(i);
for (int v : order) {
f[v] = max(down[v], up[v]);
}
int value = f[order[0]];
for (int v : order) {
uin(value, f[v]);
}
comp.push_back(value);
}
}
}
int travelTime(int NN, int MM, int LL, int A[], int B[], int T[])
{
n = NN;
m = MM;
L = LL;
for (int i = 0; i < m; ++i) {
g[A[i]].emplace_back(B[i], T[i]);
g[B[i]].emplace_back(A[i], T[i]);
}
// if (n <= 100) exit(-1);
pre();
if (m == n - 1) {
return comp[0];
}
if (m == n - 2) {
int res = L + comp[0] + comp[1];
for (int i = 0; i < n; ++i) {
uax(res, f[i]);
}
return res;
}
sort(comp.rbegin(), comp.rend());
int res = 0;
uax(res, comp[0] + comp[1] + L);
uax(res, comp[1] + comp[2] + 2 * L);
for (int i = 0; i < n; ++i) {
uax(res, f[i]);
}
return res;
}
// int A[100], B[100], T[100];
// signed main() {
// cin >> n >> m >> L;
// for (int i = 0; i < m; ++i) {
// cin >> A[i] >> B[i] >> T[i];
// }
// cout << travelTime(n, m, L, A, B, T) << '\n';
// }
/*
12 8 2
0 8 2 5 5 1 1 10
8 2 7 11 1 3 9 6
4 2 4 3 7 1 5 3
12 8 2
0 8 4
8 2 2
2 7 4
5 11 3
5 1 7
1 3 1
1 9 5
10 6 3
*/
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
93 ms |
23924 KB |
Output is correct |
2 |
Correct |
93 ms |
22772 KB |
Output is correct |
3 |
Correct |
66 ms |
22388 KB |
Output is correct |
4 |
Correct |
17 ms |
5752 KB |
Output is correct |
5 |
Correct |
14 ms |
4216 KB |
Output is correct |
6 |
Correct |
24 ms |
7416 KB |
Output is correct |
7 |
Correct |
6 ms |
2808 KB |
Output is correct |
8 |
Correct |
53 ms |
11152 KB |
Output is correct |
9 |
Correct |
60 ms |
17912 KB |
Output is correct |
10 |
Correct |
7 ms |
2936 KB |
Output is correct |
11 |
Correct |
84 ms |
17144 KB |
Output is correct |
12 |
Correct |
102 ms |
20464 KB |
Output is correct |
13 |
Correct |
7 ms |
2936 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
93 ms |
23924 KB |
Output is correct |
2 |
Correct |
93 ms |
22772 KB |
Output is correct |
3 |
Correct |
66 ms |
22388 KB |
Output is correct |
4 |
Correct |
17 ms |
5752 KB |
Output is correct |
5 |
Correct |
14 ms |
4216 KB |
Output is correct |
6 |
Correct |
24 ms |
7416 KB |
Output is correct |
7 |
Correct |
6 ms |
2808 KB |
Output is correct |
8 |
Correct |
53 ms |
11152 KB |
Output is correct |
9 |
Correct |
60 ms |
17912 KB |
Output is correct |
10 |
Correct |
7 ms |
2936 KB |
Output is correct |
11 |
Correct |
84 ms |
17144 KB |
Output is correct |
12 |
Correct |
102 ms |
20464 KB |
Output is correct |
13 |
Correct |
7 ms |
2936 KB |
Output is correct |
14 |
Correct |
6 ms |
2684 KB |
Output is correct |
15 |
Correct |
6 ms |
2680 KB |
Output is correct |
16 |
Correct |
6 ms |
2680 KB |
Output is correct |
17 |
Correct |
6 ms |
2684 KB |
Output is correct |
18 |
Correct |
6 ms |
2680 KB |
Output is correct |
19 |
Correct |
7 ms |
2680 KB |
Output is correct |
20 |
Correct |
7 ms |
2680 KB |
Output is correct |
21 |
Correct |
6 ms |
2680 KB |
Output is correct |
22 |
Correct |
6 ms |
2680 KB |
Output is correct |
23 |
Correct |
6 ms |
2680 KB |
Output is correct |
24 |
Correct |
7 ms |
2680 KB |
Output is correct |
25 |
Correct |
7 ms |
2680 KB |
Output is correct |
26 |
Correct |
7 ms |
2680 KB |
Output is correct |
27 |
Correct |
7 ms |
2680 KB |
Output is correct |
28 |
Correct |
6 ms |
2680 KB |
Output is correct |
29 |
Correct |
6 ms |
2680 KB |
Output is correct |
30 |
Correct |
7 ms |
2684 KB |
Output is correct |
31 |
Correct |
7 ms |
2680 KB |
Output is correct |
32 |
Correct |
6 ms |
2680 KB |
Output is correct |
33 |
Correct |
7 ms |
2680 KB |
Output is correct |
34 |
Correct |
7 ms |
2680 KB |
Output is correct |
35 |
Correct |
7 ms |
2808 KB |
Output is correct |
36 |
Correct |
6 ms |
2680 KB |
Output is correct |
37 |
Correct |
6 ms |
2680 KB |
Output is correct |
38 |
Correct |
6 ms |
2680 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
93 ms |
23924 KB |
Output is correct |
2 |
Correct |
93 ms |
22772 KB |
Output is correct |
3 |
Correct |
66 ms |
22388 KB |
Output is correct |
4 |
Correct |
17 ms |
5752 KB |
Output is correct |
5 |
Correct |
14 ms |
4216 KB |
Output is correct |
6 |
Correct |
24 ms |
7416 KB |
Output is correct |
7 |
Correct |
6 ms |
2808 KB |
Output is correct |
8 |
Correct |
53 ms |
11152 KB |
Output is correct |
9 |
Correct |
60 ms |
17912 KB |
Output is correct |
10 |
Correct |
7 ms |
2936 KB |
Output is correct |
11 |
Correct |
84 ms |
17144 KB |
Output is correct |
12 |
Correct |
102 ms |
20464 KB |
Output is correct |
13 |
Correct |
7 ms |
2936 KB |
Output is correct |
14 |
Correct |
6 ms |
2684 KB |
Output is correct |
15 |
Correct |
6 ms |
2680 KB |
Output is correct |
16 |
Correct |
6 ms |
2680 KB |
Output is correct |
17 |
Correct |
6 ms |
2684 KB |
Output is correct |
18 |
Correct |
6 ms |
2680 KB |
Output is correct |
19 |
Correct |
7 ms |
2680 KB |
Output is correct |
20 |
Correct |
7 ms |
2680 KB |
Output is correct |
21 |
Correct |
6 ms |
2680 KB |
Output is correct |
22 |
Correct |
6 ms |
2680 KB |
Output is correct |
23 |
Correct |
6 ms |
2680 KB |
Output is correct |
24 |
Correct |
7 ms |
2680 KB |
Output is correct |
25 |
Correct |
7 ms |
2680 KB |
Output is correct |
26 |
Correct |
7 ms |
2680 KB |
Output is correct |
27 |
Correct |
7 ms |
2680 KB |
Output is correct |
28 |
Correct |
6 ms |
2680 KB |
Output is correct |
29 |
Correct |
6 ms |
2680 KB |
Output is correct |
30 |
Correct |
7 ms |
2684 KB |
Output is correct |
31 |
Correct |
7 ms |
2680 KB |
Output is correct |
32 |
Correct |
6 ms |
2680 KB |
Output is correct |
33 |
Correct |
7 ms |
2680 KB |
Output is correct |
34 |
Correct |
7 ms |
2680 KB |
Output is correct |
35 |
Correct |
7 ms |
2808 KB |
Output is correct |
36 |
Correct |
6 ms |
2680 KB |
Output is correct |
37 |
Correct |
6 ms |
2680 KB |
Output is correct |
38 |
Correct |
6 ms |
2680 KB |
Output is correct |
39 |
Correct |
90 ms |
23924 KB |
Output is correct |
40 |
Correct |
91 ms |
22772 KB |
Output is correct |
41 |
Correct |
70 ms |
22388 KB |
Output is correct |
42 |
Correct |
16 ms |
5752 KB |
Output is correct |
43 |
Correct |
6 ms |
2680 KB |
Output is correct |
44 |
Correct |
6 ms |
2680 KB |
Output is correct |
45 |
Correct |
7 ms |
2680 KB |
Output is correct |
46 |
Correct |
6 ms |
2680 KB |
Output is correct |
47 |
Correct |
6 ms |
2680 KB |
Output is correct |
48 |
Correct |
6 ms |
2680 KB |
Output is correct |
49 |
Correct |
6 ms |
2680 KB |
Output is correct |
50 |
Correct |
6 ms |
2680 KB |
Output is correct |
51 |
Correct |
6 ms |
2680 KB |
Output is correct |
52 |
Correct |
6 ms |
2680 KB |
Output is correct |
53 |
Correct |
7 ms |
2684 KB |
Output is correct |
54 |
Correct |
6 ms |
2680 KB |
Output is correct |
55 |
Correct |
6 ms |
2680 KB |
Output is correct |
56 |
Correct |
6 ms |
2680 KB |
Output is correct |
57 |
Correct |
110 ms |
9584 KB |
Output is correct |
58 |
Correct |
114 ms |
9564 KB |
Output is correct |
59 |
Correct |
111 ms |
9708 KB |
Output is correct |
60 |
Correct |
120 ms |
9460 KB |
Output is correct |
61 |
Correct |
115 ms |
9452 KB |
Output is correct |
62 |
Correct |
115 ms |
9332 KB |
Output is correct |
63 |
Correct |
103 ms |
9328 KB |
Output is correct |
64 |
Correct |
98 ms |
9332 KB |
Output is correct |
65 |
Correct |
108 ms |
9332 KB |
Output is correct |
66 |
Correct |
108 ms |
9332 KB |
Output is correct |
67 |
Correct |
114 ms |
9840 KB |
Output is correct |
68 |
Correct |
115 ms |
9712 KB |
Output is correct |
69 |
Correct |
118 ms |
9588 KB |
Output is correct |
70 |
Correct |
115 ms |
9460 KB |
Output is correct |
71 |
Correct |
7 ms |
2808 KB |
Output is correct |
72 |
Correct |
8 ms |
2936 KB |
Output is correct |
73 |
Correct |
9 ms |
2936 KB |
Output is correct |
74 |
Correct |
8 ms |
2936 KB |
Output is correct |
75 |
Correct |
9 ms |
2936 KB |
Output is correct |
76 |
Correct |
8 ms |
2936 KB |
Output is correct |
77 |
Correct |
8 ms |
2936 KB |
Output is correct |
78 |
Correct |
8 ms |
2936 KB |
Output is correct |
79 |
Correct |
8 ms |
2936 KB |
Output is correct |
80 |
Correct |
110 ms |
9716 KB |
Output is correct |
81 |
Correct |
114 ms |
9712 KB |
Output is correct |
82 |
Correct |
108 ms |
9460 KB |
Output is correct |
83 |
Correct |
110 ms |
9456 KB |
Output is correct |
84 |
Correct |
7 ms |
2808 KB |
Output is correct |
85 |
Correct |
8 ms |
2808 KB |
Output is correct |
86 |
Correct |
8 ms |
2936 KB |
Output is correct |
87 |
Correct |
8 ms |
2936 KB |
Output is correct |
88 |
Correct |
9 ms |
2936 KB |
Output is correct |
89 |
Correct |
89 ms |
2936 KB |
Output is correct |
90 |
Correct |
8 ms |
2936 KB |
Output is correct |
91 |
Correct |
8 ms |
2936 KB |
Output is correct |
92 |
Correct |
8 ms |
2936 KB |
Output is correct |
93 |
Correct |
8 ms |
2936 KB |
Output is correct |
94 |
Correct |
6 ms |
2552 KB |
Output is correct |
95 |
Correct |
7 ms |
2728 KB |
Output is correct |
96 |
Correct |
7 ms |
2680 KB |
Output is correct |
97 |
Correct |
6 ms |
2680 KB |
Output is correct |
98 |
Correct |
6 ms |
2680 KB |
Output is correct |
99 |
Correct |
6 ms |
2680 KB |
Output is correct |
100 |
Correct |
8 ms |
2680 KB |
Output is correct |
101 |
Correct |
6 ms |
2680 KB |
Output is correct |
102 |
Correct |
6 ms |
2680 KB |
Output is correct |
103 |
Correct |
7 ms |
2680 KB |
Output is correct |
104 |
Correct |
14 ms |
4088 KB |
Output is correct |
105 |
Correct |
24 ms |
7288 KB |
Output is correct |
106 |
Correct |
6 ms |
2808 KB |
Output is correct |
107 |
Correct |
47 ms |
11156 KB |
Output is correct |
108 |
Correct |
64 ms |
17912 KB |
Output is correct |
109 |
Correct |
7 ms |
2936 KB |
Output is correct |
110 |
Correct |
82 ms |
17144 KB |
Output is correct |
111 |
Correct |
102 ms |
20464 KB |
Output is correct |
112 |
Correct |
7 ms |
2936 KB |
Output is correct |
113 |
Correct |
140 ms |
39540 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
48 ms |
6648 KB |
Output is correct |
2 |
Correct |
45 ms |
6648 KB |
Output is correct |
3 |
Correct |
46 ms |
6524 KB |
Output is correct |
4 |
Correct |
48 ms |
6680 KB |
Output is correct |
5 |
Correct |
46 ms |
6520 KB |
Output is correct |
6 |
Correct |
47 ms |
7032 KB |
Output is correct |
7 |
Correct |
49 ms |
6904 KB |
Output is correct |
8 |
Correct |
45 ms |
6520 KB |
Output is correct |
9 |
Correct |
44 ms |
6520 KB |
Output is correct |
10 |
Correct |
45 ms |
6776 KB |
Output is correct |
11 |
Correct |
6 ms |
2680 KB |
Output is correct |
12 |
Correct |
24 ms |
4596 KB |
Output is correct |
13 |
Correct |
25 ms |
4596 KB |
Output is correct |
14 |
Correct |
25 ms |
4720 KB |
Output is correct |
15 |
Correct |
25 ms |
4724 KB |
Output is correct |
16 |
Correct |
24 ms |
4596 KB |
Output is correct |
17 |
Correct |
24 ms |
4596 KB |
Output is correct |
18 |
Correct |
25 ms |
4588 KB |
Output is correct |
19 |
Correct |
26 ms |
4596 KB |
Output is correct |
20 |
Correct |
6 ms |
2680 KB |
Output is correct |
21 |
Correct |
6 ms |
2680 KB |
Output is correct |
22 |
Correct |
7 ms |
2812 KB |
Output is correct |
23 |
Correct |
24 ms |
4724 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
93 ms |
23924 KB |
Output is correct |
2 |
Correct |
93 ms |
22772 KB |
Output is correct |
3 |
Correct |
66 ms |
22388 KB |
Output is correct |
4 |
Correct |
17 ms |
5752 KB |
Output is correct |
5 |
Correct |
14 ms |
4216 KB |
Output is correct |
6 |
Correct |
24 ms |
7416 KB |
Output is correct |
7 |
Correct |
6 ms |
2808 KB |
Output is correct |
8 |
Correct |
53 ms |
11152 KB |
Output is correct |
9 |
Correct |
60 ms |
17912 KB |
Output is correct |
10 |
Correct |
7 ms |
2936 KB |
Output is correct |
11 |
Correct |
84 ms |
17144 KB |
Output is correct |
12 |
Correct |
102 ms |
20464 KB |
Output is correct |
13 |
Correct |
7 ms |
2936 KB |
Output is correct |
14 |
Correct |
7 ms |
2808 KB |
Output is correct |
15 |
Correct |
7 ms |
2808 KB |
Output is correct |
16 |
Correct |
8 ms |
2808 KB |
Output is correct |
17 |
Correct |
7 ms |
2936 KB |
Output is correct |
18 |
Correct |
8 ms |
2812 KB |
Output is correct |
19 |
Correct |
9 ms |
2936 KB |
Output is correct |
20 |
Correct |
8 ms |
2808 KB |
Output is correct |
21 |
Correct |
7 ms |
2808 KB |
Output is correct |
22 |
Correct |
8 ms |
2936 KB |
Output is correct |
23 |
Correct |
6 ms |
2680 KB |
Output is correct |
24 |
Correct |
6 ms |
2680 KB |
Output is correct |
25 |
Correct |
7 ms |
2680 KB |
Output is correct |
26 |
Correct |
7 ms |
2680 KB |
Output is correct |
27 |
Correct |
6 ms |
2680 KB |
Output is correct |
28 |
Correct |
6 ms |
2680 KB |
Output is correct |
29 |
Correct |
6 ms |
2680 KB |
Output is correct |
30 |
Correct |
7 ms |
2680 KB |
Output is correct |
31 |
Correct |
6 ms |
2680 KB |
Output is correct |
32 |
Correct |
6 ms |
2680 KB |
Output is correct |
33 |
Correct |
6 ms |
2680 KB |
Output is correct |
34 |
Correct |
6 ms |
2680 KB |
Output is correct |
35 |
Correct |
7 ms |
2680 KB |
Output is correct |
36 |
Correct |
6 ms |
2680 KB |
Output is correct |
37 |
Correct |
6 ms |
2680 KB |
Output is correct |
38 |
Correct |
7 ms |
2680 KB |
Output is correct |
39 |
Correct |
8 ms |
2680 KB |
Output is correct |
40 |
Correct |
6 ms |
2680 KB |
Output is correct |
41 |
Correct |
6 ms |
2680 KB |
Output is correct |
42 |
Incorrect |
8 ms |
3320 KB |
Output isn't correct |
43 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
93 ms |
23924 KB |
Output is correct |
2 |
Correct |
93 ms |
22772 KB |
Output is correct |
3 |
Correct |
66 ms |
22388 KB |
Output is correct |
4 |
Correct |
17 ms |
5752 KB |
Output is correct |
5 |
Correct |
14 ms |
4216 KB |
Output is correct |
6 |
Correct |
24 ms |
7416 KB |
Output is correct |
7 |
Correct |
6 ms |
2808 KB |
Output is correct |
8 |
Correct |
53 ms |
11152 KB |
Output is correct |
9 |
Correct |
60 ms |
17912 KB |
Output is correct |
10 |
Correct |
7 ms |
2936 KB |
Output is correct |
11 |
Correct |
84 ms |
17144 KB |
Output is correct |
12 |
Correct |
102 ms |
20464 KB |
Output is correct |
13 |
Correct |
7 ms |
2936 KB |
Output is correct |
14 |
Correct |
6 ms |
2684 KB |
Output is correct |
15 |
Correct |
6 ms |
2680 KB |
Output is correct |
16 |
Correct |
6 ms |
2680 KB |
Output is correct |
17 |
Correct |
6 ms |
2684 KB |
Output is correct |
18 |
Correct |
6 ms |
2680 KB |
Output is correct |
19 |
Correct |
7 ms |
2680 KB |
Output is correct |
20 |
Correct |
7 ms |
2680 KB |
Output is correct |
21 |
Correct |
6 ms |
2680 KB |
Output is correct |
22 |
Correct |
6 ms |
2680 KB |
Output is correct |
23 |
Correct |
6 ms |
2680 KB |
Output is correct |
24 |
Correct |
7 ms |
2680 KB |
Output is correct |
25 |
Correct |
7 ms |
2680 KB |
Output is correct |
26 |
Correct |
7 ms |
2680 KB |
Output is correct |
27 |
Correct |
7 ms |
2680 KB |
Output is correct |
28 |
Correct |
6 ms |
2680 KB |
Output is correct |
29 |
Correct |
6 ms |
2680 KB |
Output is correct |
30 |
Correct |
7 ms |
2684 KB |
Output is correct |
31 |
Correct |
7 ms |
2680 KB |
Output is correct |
32 |
Correct |
6 ms |
2680 KB |
Output is correct |
33 |
Correct |
7 ms |
2680 KB |
Output is correct |
34 |
Correct |
7 ms |
2680 KB |
Output is correct |
35 |
Correct |
7 ms |
2808 KB |
Output is correct |
36 |
Correct |
6 ms |
2680 KB |
Output is correct |
37 |
Correct |
6 ms |
2680 KB |
Output is correct |
38 |
Correct |
6 ms |
2680 KB |
Output is correct |
39 |
Correct |
90 ms |
23924 KB |
Output is correct |
40 |
Correct |
91 ms |
22772 KB |
Output is correct |
41 |
Correct |
70 ms |
22388 KB |
Output is correct |
42 |
Correct |
16 ms |
5752 KB |
Output is correct |
43 |
Correct |
6 ms |
2680 KB |
Output is correct |
44 |
Correct |
6 ms |
2680 KB |
Output is correct |
45 |
Correct |
7 ms |
2680 KB |
Output is correct |
46 |
Correct |
6 ms |
2680 KB |
Output is correct |
47 |
Correct |
6 ms |
2680 KB |
Output is correct |
48 |
Correct |
6 ms |
2680 KB |
Output is correct |
49 |
Correct |
6 ms |
2680 KB |
Output is correct |
50 |
Correct |
6 ms |
2680 KB |
Output is correct |
51 |
Correct |
6 ms |
2680 KB |
Output is correct |
52 |
Correct |
6 ms |
2680 KB |
Output is correct |
53 |
Correct |
7 ms |
2684 KB |
Output is correct |
54 |
Correct |
6 ms |
2680 KB |
Output is correct |
55 |
Correct |
6 ms |
2680 KB |
Output is correct |
56 |
Correct |
6 ms |
2680 KB |
Output is correct |
57 |
Correct |
110 ms |
9584 KB |
Output is correct |
58 |
Correct |
114 ms |
9564 KB |
Output is correct |
59 |
Correct |
111 ms |
9708 KB |
Output is correct |
60 |
Correct |
120 ms |
9460 KB |
Output is correct |
61 |
Correct |
115 ms |
9452 KB |
Output is correct |
62 |
Correct |
115 ms |
9332 KB |
Output is correct |
63 |
Correct |
103 ms |
9328 KB |
Output is correct |
64 |
Correct |
98 ms |
9332 KB |
Output is correct |
65 |
Correct |
108 ms |
9332 KB |
Output is correct |
66 |
Correct |
108 ms |
9332 KB |
Output is correct |
67 |
Correct |
114 ms |
9840 KB |
Output is correct |
68 |
Correct |
115 ms |
9712 KB |
Output is correct |
69 |
Correct |
118 ms |
9588 KB |
Output is correct |
70 |
Correct |
115 ms |
9460 KB |
Output is correct |
71 |
Correct |
7 ms |
2808 KB |
Output is correct |
72 |
Correct |
8 ms |
2936 KB |
Output is correct |
73 |
Correct |
9 ms |
2936 KB |
Output is correct |
74 |
Correct |
8 ms |
2936 KB |
Output is correct |
75 |
Correct |
9 ms |
2936 KB |
Output is correct |
76 |
Correct |
8 ms |
2936 KB |
Output is correct |
77 |
Correct |
8 ms |
2936 KB |
Output is correct |
78 |
Correct |
8 ms |
2936 KB |
Output is correct |
79 |
Correct |
8 ms |
2936 KB |
Output is correct |
80 |
Correct |
110 ms |
9716 KB |
Output is correct |
81 |
Correct |
114 ms |
9712 KB |
Output is correct |
82 |
Correct |
108 ms |
9460 KB |
Output is correct |
83 |
Correct |
110 ms |
9456 KB |
Output is correct |
84 |
Correct |
7 ms |
2808 KB |
Output is correct |
85 |
Correct |
8 ms |
2808 KB |
Output is correct |
86 |
Correct |
8 ms |
2936 KB |
Output is correct |
87 |
Correct |
8 ms |
2936 KB |
Output is correct |
88 |
Correct |
9 ms |
2936 KB |
Output is correct |
89 |
Correct |
89 ms |
2936 KB |
Output is correct |
90 |
Correct |
8 ms |
2936 KB |
Output is correct |
91 |
Correct |
8 ms |
2936 KB |
Output is correct |
92 |
Correct |
8 ms |
2936 KB |
Output is correct |
93 |
Correct |
8 ms |
2936 KB |
Output is correct |
94 |
Correct |
6 ms |
2552 KB |
Output is correct |
95 |
Correct |
7 ms |
2728 KB |
Output is correct |
96 |
Correct |
7 ms |
2680 KB |
Output is correct |
97 |
Correct |
6 ms |
2680 KB |
Output is correct |
98 |
Correct |
6 ms |
2680 KB |
Output is correct |
99 |
Correct |
6 ms |
2680 KB |
Output is correct |
100 |
Correct |
8 ms |
2680 KB |
Output is correct |
101 |
Correct |
6 ms |
2680 KB |
Output is correct |
102 |
Correct |
6 ms |
2680 KB |
Output is correct |
103 |
Correct |
7 ms |
2680 KB |
Output is correct |
104 |
Correct |
14 ms |
4088 KB |
Output is correct |
105 |
Correct |
24 ms |
7288 KB |
Output is correct |
106 |
Correct |
6 ms |
2808 KB |
Output is correct |
107 |
Correct |
47 ms |
11156 KB |
Output is correct |
108 |
Correct |
64 ms |
17912 KB |
Output is correct |
109 |
Correct |
7 ms |
2936 KB |
Output is correct |
110 |
Correct |
82 ms |
17144 KB |
Output is correct |
111 |
Correct |
102 ms |
20464 KB |
Output is correct |
112 |
Correct |
7 ms |
2936 KB |
Output is correct |
113 |
Correct |
140 ms |
39540 KB |
Output is correct |
114 |
Correct |
48 ms |
6648 KB |
Output is correct |
115 |
Correct |
45 ms |
6648 KB |
Output is correct |
116 |
Correct |
46 ms |
6524 KB |
Output is correct |
117 |
Correct |
48 ms |
6680 KB |
Output is correct |
118 |
Correct |
46 ms |
6520 KB |
Output is correct |
119 |
Correct |
47 ms |
7032 KB |
Output is correct |
120 |
Correct |
49 ms |
6904 KB |
Output is correct |
121 |
Correct |
45 ms |
6520 KB |
Output is correct |
122 |
Correct |
44 ms |
6520 KB |
Output is correct |
123 |
Correct |
45 ms |
6776 KB |
Output is correct |
124 |
Correct |
6 ms |
2680 KB |
Output is correct |
125 |
Correct |
24 ms |
4596 KB |
Output is correct |
126 |
Correct |
25 ms |
4596 KB |
Output is correct |
127 |
Correct |
25 ms |
4720 KB |
Output is correct |
128 |
Correct |
25 ms |
4724 KB |
Output is correct |
129 |
Correct |
24 ms |
4596 KB |
Output is correct |
130 |
Correct |
24 ms |
4596 KB |
Output is correct |
131 |
Correct |
25 ms |
4588 KB |
Output is correct |
132 |
Correct |
26 ms |
4596 KB |
Output is correct |
133 |
Correct |
6 ms |
2680 KB |
Output is correct |
134 |
Correct |
6 ms |
2680 KB |
Output is correct |
135 |
Correct |
7 ms |
2812 KB |
Output is correct |
136 |
Correct |
24 ms |
4724 KB |
Output is correct |
137 |
Correct |
7 ms |
2808 KB |
Output is correct |
138 |
Correct |
7 ms |
2808 KB |
Output is correct |
139 |
Correct |
8 ms |
2808 KB |
Output is correct |
140 |
Correct |
7 ms |
2936 KB |
Output is correct |
141 |
Correct |
8 ms |
2812 KB |
Output is correct |
142 |
Correct |
9 ms |
2936 KB |
Output is correct |
143 |
Correct |
8 ms |
2808 KB |
Output is correct |
144 |
Correct |
7 ms |
2808 KB |
Output is correct |
145 |
Correct |
8 ms |
2936 KB |
Output is correct |
146 |
Correct |
6 ms |
2680 KB |
Output is correct |
147 |
Correct |
6 ms |
2680 KB |
Output is correct |
148 |
Correct |
7 ms |
2680 KB |
Output is correct |
149 |
Correct |
7 ms |
2680 KB |
Output is correct |
150 |
Correct |
6 ms |
2680 KB |
Output is correct |
151 |
Correct |
6 ms |
2680 KB |
Output is correct |
152 |
Correct |
6 ms |
2680 KB |
Output is correct |
153 |
Correct |
7 ms |
2680 KB |
Output is correct |
154 |
Correct |
6 ms |
2680 KB |
Output is correct |
155 |
Correct |
6 ms |
2680 KB |
Output is correct |
156 |
Correct |
6 ms |
2680 KB |
Output is correct |
157 |
Correct |
6 ms |
2680 KB |
Output is correct |
158 |
Correct |
7 ms |
2680 KB |
Output is correct |
159 |
Correct |
6 ms |
2680 KB |
Output is correct |
160 |
Correct |
6 ms |
2680 KB |
Output is correct |
161 |
Correct |
7 ms |
2680 KB |
Output is correct |
162 |
Correct |
8 ms |
2680 KB |
Output is correct |
163 |
Correct |
6 ms |
2680 KB |
Output is correct |
164 |
Correct |
6 ms |
2680 KB |
Output is correct |
165 |
Incorrect |
8 ms |
3320 KB |
Output isn't correct |
166 |
Halted |
0 ms |
0 KB |
- |