#include "dreaming.h"
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned ll
#define f first
#define s second
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define epb emplace_back
using namespace std;
const int nmax = 200001;
vector <vector <pair<ll, ll> > > g(nmax);
int dp[nmax][3];
vector <bool> used(nmax);
vector <int> cmp;
void dfs(int v, int e = -1){
used[v] = true;
cmp.pb(v);
for(auto x : g[v]){
int to = x.f;
int len = x.s;
if(used[to]) continue;
dfs(to, v);
if(dp[v][0] < dp[to][0] + len){
swap(dp[v][0], dp[v][1]);
dp[v][2] = to;
dp[v][0] = dp[to][0] + len;
}
else dp[v][1] = max(dp[v][1], dp[to][0] + len);
}
}
void reroot(int v, int e){
for(auto x : g[v]){
int to = x.f;
int len = x.s;
if(to == e) continue;
int mx = 0;
if(dp[v][2] == to){
mx = dp[v][1] + len;
}
else mx = dp[v][0] + len;
if(dp[to][0] < mx)
swap(dp[to][0], dp[to][1]), dp[to][2] = v, dp[to][0] = mx;
else dp[to][1] = max(dp[to][1], mx);
reroot(to, v);
}
}
int travelTime(int N, int M, int L, int A[], int B[], int T[]) {
for(int i = 0; i < M; i++){
int u = A[i], v = B[i], w = T[i];
g[u].pb({v, w});
g[v].pb({u, w});
}
int ans = 0;
multiset <ll> st;
for(int i = 0; i < N; i++){
if(used[i]) continue;
dfs(i);
reroot(i, i);
int mn = 1e9;
for(int to : cmp){
ans = max(ans, dp[to][0]);
mn = min(mn, dp[to][0]);
}
st.insert(mn);
cmp.clear();
}
int a, b, c;
a = b = c = -1e9;
if(st.size() >= 2){
a = *st.rbegin();
st.erase(st.find(a));
b = *st.rbegin();
st.erase(st.find(b));
ans = max(ans, a + b + L);
}
if(st.size() >= 3){
c = *st.rbegin();
ans = max(ans, b + c + 2 * L);
}
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
34 ms |
17248 KB |
Output is correct |
2 |
Correct |
43 ms |
16884 KB |
Output is correct |
3 |
Correct |
24 ms |
14476 KB |
Output is correct |
4 |
Correct |
7 ms |
6856 KB |
Output is correct |
5 |
Correct |
7 ms |
6196 KB |
Output is correct |
6 |
Correct |
10 ms |
7884 KB |
Output is correct |
7 |
Correct |
3 ms |
5076 KB |
Output is correct |
8 |
Correct |
18 ms |
10372 KB |
Output is correct |
9 |
Correct |
23 ms |
12836 KB |
Output is correct |
10 |
Correct |
2 ms |
5076 KB |
Output is correct |
11 |
Correct |
32 ms |
14348 KB |
Output is correct |
12 |
Correct |
37 ms |
15852 KB |
Output is correct |
13 |
Correct |
3 ms |
5076 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
4948 KB |
Output is correct |
2 |
Correct |
2 ms |
5040 KB |
Output is correct |
3 |
Correct |
2 ms |
5044 KB |
Output is correct |
4 |
Correct |
2 ms |
4948 KB |
Output is correct |
5 |
Correct |
2 ms |
4948 KB |
Output is correct |
6 |
Correct |
2 ms |
4948 KB |
Output is correct |
7 |
Correct |
3 ms |
4948 KB |
Output is correct |
8 |
Correct |
2 ms |
4948 KB |
Output is correct |
9 |
Correct |
3 ms |
4948 KB |
Output is correct |
10 |
Correct |
2 ms |
4948 KB |
Output is correct |
11 |
Correct |
3 ms |
5052 KB |
Output is correct |
12 |
Correct |
2 ms |
4948 KB |
Output is correct |
13 |
Correct |
2 ms |
4948 KB |
Output is correct |
14 |
Correct |
3 ms |
4948 KB |
Output is correct |
15 |
Correct |
2 ms |
4948 KB |
Output is correct |
16 |
Correct |
2 ms |
5056 KB |
Output is correct |
17 |
Correct |
2 ms |
4948 KB |
Output is correct |
18 |
Correct |
2 ms |
4948 KB |
Output is correct |
19 |
Correct |
3 ms |
4948 KB |
Output is correct |
20 |
Correct |
2 ms |
5004 KB |
Output is correct |
21 |
Correct |
2 ms |
4948 KB |
Output is correct |
22 |
Correct |
2 ms |
4948 KB |
Output is correct |
23 |
Correct |
3 ms |
5056 KB |
Output is correct |
24 |
Correct |
2 ms |
5032 KB |
Output is correct |
25 |
Correct |
2 ms |
4948 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
34 ms |
17248 KB |
Output is correct |
2 |
Correct |
43 ms |
16884 KB |
Output is correct |
3 |
Correct |
24 ms |
14476 KB |
Output is correct |
4 |
Correct |
7 ms |
6856 KB |
Output is correct |
5 |
Correct |
7 ms |
6196 KB |
Output is correct |
6 |
Correct |
10 ms |
7884 KB |
Output is correct |
7 |
Correct |
3 ms |
5076 KB |
Output is correct |
8 |
Correct |
18 ms |
10372 KB |
Output is correct |
9 |
Correct |
23 ms |
12836 KB |
Output is correct |
10 |
Correct |
2 ms |
5076 KB |
Output is correct |
11 |
Correct |
32 ms |
14348 KB |
Output is correct |
12 |
Correct |
37 ms |
15852 KB |
Output is correct |
13 |
Correct |
3 ms |
5076 KB |
Output is correct |
14 |
Correct |
2 ms |
4948 KB |
Output is correct |
15 |
Correct |
2 ms |
5040 KB |
Output is correct |
16 |
Correct |
2 ms |
5044 KB |
Output is correct |
17 |
Correct |
2 ms |
4948 KB |
Output is correct |
18 |
Correct |
2 ms |
4948 KB |
Output is correct |
19 |
Correct |
2 ms |
4948 KB |
Output is correct |
20 |
Correct |
3 ms |
4948 KB |
Output is correct |
21 |
Correct |
2 ms |
4948 KB |
Output is correct |
22 |
Correct |
3 ms |
4948 KB |
Output is correct |
23 |
Correct |
2 ms |
4948 KB |
Output is correct |
24 |
Correct |
3 ms |
5052 KB |
Output is correct |
25 |
Correct |
2 ms |
4948 KB |
Output is correct |
26 |
Correct |
2 ms |
4948 KB |
Output is correct |
27 |
Correct |
3 ms |
4948 KB |
Output is correct |
28 |
Correct |
2 ms |
4948 KB |
Output is correct |
29 |
Correct |
2 ms |
5056 KB |
Output is correct |
30 |
Correct |
2 ms |
4948 KB |
Output is correct |
31 |
Correct |
2 ms |
4948 KB |
Output is correct |
32 |
Correct |
3 ms |
4948 KB |
Output is correct |
33 |
Correct |
2 ms |
5004 KB |
Output is correct |
34 |
Correct |
2 ms |
4948 KB |
Output is correct |
35 |
Correct |
2 ms |
4948 KB |
Output is correct |
36 |
Correct |
3 ms |
5056 KB |
Output is correct |
37 |
Correct |
2 ms |
5032 KB |
Output is correct |
38 |
Correct |
2 ms |
4948 KB |
Output is correct |
39 |
Correct |
33 ms |
17180 KB |
Output is correct |
40 |
Correct |
33 ms |
16772 KB |
Output is correct |
41 |
Correct |
25 ms |
14512 KB |
Output is correct |
42 |
Correct |
7 ms |
6868 KB |
Output is correct |
43 |
Correct |
3 ms |
5056 KB |
Output is correct |
44 |
Correct |
2 ms |
4948 KB |
Output is correct |
45 |
Correct |
2 ms |
5044 KB |
Output is correct |
46 |
Correct |
2 ms |
4948 KB |
Output is correct |
47 |
Correct |
3 ms |
5048 KB |
Output is correct |
48 |
Correct |
2 ms |
5028 KB |
Output is correct |
49 |
Correct |
2 ms |
4948 KB |
Output is correct |
50 |
Correct |
2 ms |
4948 KB |
Output is correct |
51 |
Correct |
2 ms |
4948 KB |
Output is correct |
52 |
Correct |
3 ms |
4948 KB |
Output is correct |
53 |
Correct |
2 ms |
4948 KB |
Output is correct |
54 |
Correct |
2 ms |
5044 KB |
Output is correct |
55 |
Correct |
2 ms |
4948 KB |
Output is correct |
56 |
Correct |
2 ms |
4948 KB |
Output is correct |
57 |
Correct |
55 ms |
15292 KB |
Output is correct |
58 |
Correct |
43 ms |
14884 KB |
Output is correct |
59 |
Correct |
46 ms |
14996 KB |
Output is correct |
60 |
Correct |
42 ms |
14668 KB |
Output is correct |
61 |
Correct |
43 ms |
14912 KB |
Output is correct |
62 |
Correct |
42 ms |
14708 KB |
Output is correct |
63 |
Correct |
43 ms |
14500 KB |
Output is correct |
64 |
Correct |
40 ms |
14492 KB |
Output is correct |
65 |
Correct |
48 ms |
14772 KB |
Output is correct |
66 |
Correct |
42 ms |
14708 KB |
Output is correct |
67 |
Correct |
42 ms |
14920 KB |
Output is correct |
68 |
Correct |
42 ms |
14960 KB |
Output is correct |
69 |
Correct |
44 ms |
14924 KB |
Output is correct |
70 |
Correct |
43 ms |
14920 KB |
Output is correct |
71 |
Correct |
3 ms |
4948 KB |
Output is correct |
72 |
Correct |
3 ms |
5332 KB |
Output is correct |
73 |
Correct |
3 ms |
5332 KB |
Output is correct |
74 |
Correct |
4 ms |
5332 KB |
Output is correct |
75 |
Correct |
4 ms |
5316 KB |
Output is correct |
76 |
Correct |
4 ms |
5332 KB |
Output is correct |
77 |
Correct |
3 ms |
5316 KB |
Output is correct |
78 |
Correct |
3 ms |
5332 KB |
Output is correct |
79 |
Correct |
3 ms |
5332 KB |
Output is correct |
80 |
Correct |
42 ms |
14920 KB |
Output is correct |
81 |
Correct |
46 ms |
14984 KB |
Output is correct |
82 |
Correct |
44 ms |
14920 KB |
Output is correct |
83 |
Correct |
42 ms |
14988 KB |
Output is correct |
84 |
Correct |
3 ms |
5204 KB |
Output is correct |
85 |
Correct |
3 ms |
5204 KB |
Output is correct |
86 |
Correct |
3 ms |
5204 KB |
Output is correct |
87 |
Correct |
3 ms |
5204 KB |
Output is correct |
88 |
Correct |
3 ms |
5204 KB |
Output is correct |
89 |
Correct |
4 ms |
5332 KB |
Output is correct |
90 |
Correct |
3 ms |
5188 KB |
Output is correct |
91 |
Correct |
3 ms |
5316 KB |
Output is correct |
92 |
Correct |
4 ms |
5240 KB |
Output is correct |
93 |
Correct |
3 ms |
5208 KB |
Output is correct |
94 |
Correct |
2 ms |
4948 KB |
Output is correct |
95 |
Correct |
2 ms |
5052 KB |
Output is correct |
96 |
Correct |
3 ms |
4948 KB |
Output is correct |
97 |
Correct |
3 ms |
4948 KB |
Output is correct |
98 |
Correct |
2 ms |
5028 KB |
Output is correct |
99 |
Correct |
3 ms |
4948 KB |
Output is correct |
100 |
Correct |
3 ms |
4948 KB |
Output is correct |
101 |
Correct |
2 ms |
4948 KB |
Output is correct |
102 |
Correct |
3 ms |
4948 KB |
Output is correct |
103 |
Correct |
3 ms |
5048 KB |
Output is correct |
104 |
Correct |
6 ms |
6228 KB |
Output is correct |
105 |
Correct |
10 ms |
7892 KB |
Output is correct |
106 |
Correct |
2 ms |
5076 KB |
Output is correct |
107 |
Correct |
18 ms |
10360 KB |
Output is correct |
108 |
Correct |
23 ms |
12880 KB |
Output is correct |
109 |
Correct |
3 ms |
5076 KB |
Output is correct |
110 |
Correct |
32 ms |
14396 KB |
Output is correct |
111 |
Correct |
46 ms |
15892 KB |
Output is correct |
112 |
Correct |
3 ms |
5076 KB |
Output is correct |
113 |
Correct |
54 ms |
22308 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
24 ms |
11700 KB |
Output is correct |
2 |
Correct |
30 ms |
11728 KB |
Output is correct |
3 |
Correct |
24 ms |
11780 KB |
Output is correct |
4 |
Correct |
24 ms |
11720 KB |
Output is correct |
5 |
Correct |
26 ms |
11668 KB |
Output is correct |
6 |
Correct |
25 ms |
12172 KB |
Output is correct |
7 |
Correct |
26 ms |
12064 KB |
Output is correct |
8 |
Correct |
34 ms |
11788 KB |
Output is correct |
9 |
Correct |
23 ms |
11604 KB |
Output is correct |
10 |
Correct |
25 ms |
11940 KB |
Output is correct |
11 |
Correct |
2 ms |
5048 KB |
Output is correct |
12 |
Correct |
16 ms |
10676 KB |
Output is correct |
13 |
Correct |
16 ms |
10836 KB |
Output is correct |
14 |
Correct |
16 ms |
10708 KB |
Output is correct |
15 |
Correct |
16 ms |
10768 KB |
Output is correct |
16 |
Correct |
17 ms |
10504 KB |
Output is correct |
17 |
Correct |
17 ms |
10000 KB |
Output is correct |
18 |
Correct |
17 ms |
10816 KB |
Output is correct |
19 |
Correct |
16 ms |
10580 KB |
Output is correct |
20 |
Correct |
2 ms |
4948 KB |
Output is correct |
21 |
Correct |
2 ms |
4948 KB |
Output is correct |
22 |
Correct |
3 ms |
5204 KB |
Output is correct |
23 |
Correct |
16 ms |
10632 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
4948 KB |
Output is correct |
2 |
Correct |
2 ms |
5040 KB |
Output is correct |
3 |
Correct |
2 ms |
5044 KB |
Output is correct |
4 |
Correct |
2 ms |
4948 KB |
Output is correct |
5 |
Correct |
2 ms |
4948 KB |
Output is correct |
6 |
Correct |
2 ms |
4948 KB |
Output is correct |
7 |
Correct |
3 ms |
4948 KB |
Output is correct |
8 |
Correct |
2 ms |
4948 KB |
Output is correct |
9 |
Correct |
3 ms |
4948 KB |
Output is correct |
10 |
Correct |
2 ms |
4948 KB |
Output is correct |
11 |
Correct |
3 ms |
5052 KB |
Output is correct |
12 |
Correct |
2 ms |
4948 KB |
Output is correct |
13 |
Correct |
2 ms |
4948 KB |
Output is correct |
14 |
Correct |
3 ms |
4948 KB |
Output is correct |
15 |
Correct |
2 ms |
4948 KB |
Output is correct |
16 |
Correct |
2 ms |
5056 KB |
Output is correct |
17 |
Correct |
2 ms |
4948 KB |
Output is correct |
18 |
Correct |
2 ms |
4948 KB |
Output is correct |
19 |
Correct |
3 ms |
4948 KB |
Output is correct |
20 |
Correct |
2 ms |
5004 KB |
Output is correct |
21 |
Correct |
2 ms |
4948 KB |
Output is correct |
22 |
Correct |
2 ms |
4948 KB |
Output is correct |
23 |
Correct |
3 ms |
5056 KB |
Output is correct |
24 |
Correct |
2 ms |
5032 KB |
Output is correct |
25 |
Correct |
2 ms |
4948 KB |
Output is correct |
26 |
Correct |
7 ms |
5056 KB |
Output is correct |
27 |
Correct |
3 ms |
5204 KB |
Output is correct |
28 |
Correct |
3 ms |
5204 KB |
Output is correct |
29 |
Correct |
3 ms |
5076 KB |
Output is correct |
30 |
Correct |
3 ms |
5212 KB |
Output is correct |
31 |
Correct |
3 ms |
5204 KB |
Output is correct |
32 |
Correct |
2 ms |
5076 KB |
Output is correct |
33 |
Correct |
3 ms |
5204 KB |
Output is correct |
34 |
Correct |
4 ms |
5212 KB |
Output is correct |
35 |
Correct |
3 ms |
5052 KB |
Output is correct |
36 |
Correct |
2 ms |
4948 KB |
Output is correct |
37 |
Correct |
2 ms |
4948 KB |
Output is correct |
38 |
Correct |
2 ms |
5052 KB |
Output is correct |
39 |
Correct |
3 ms |
4948 KB |
Output is correct |
40 |
Correct |
3 ms |
4948 KB |
Output is correct |
41 |
Correct |
2 ms |
4948 KB |
Output is correct |
42 |
Correct |
2 ms |
4948 KB |
Output is correct |
43 |
Correct |
2 ms |
4948 KB |
Output is correct |
44 |
Correct |
2 ms |
5052 KB |
Output is correct |
45 |
Correct |
2 ms |
4948 KB |
Output is correct |
46 |
Correct |
2 ms |
4948 KB |
Output is correct |
47 |
Correct |
2 ms |
4948 KB |
Output is correct |
48 |
Correct |
2 ms |
4964 KB |
Output is correct |
49 |
Correct |
2 ms |
4948 KB |
Output is correct |
50 |
Correct |
2 ms |
4948 KB |
Output is correct |
51 |
Correct |
2 ms |
4948 KB |
Output is correct |
52 |
Correct |
2 ms |
4948 KB |
Output is correct |
53 |
Correct |
3 ms |
4948 KB |
Output is correct |
54 |
Correct |
4 ms |
5444 KB |
Output is correct |
55 |
Correct |
3 ms |
5460 KB |
Output is correct |
56 |
Correct |
4 ms |
5204 KB |
Output is correct |
57 |
Correct |
3 ms |
5144 KB |
Output is correct |
58 |
Correct |
3 ms |
5332 KB |
Output is correct |
59 |
Correct |
3 ms |
5332 KB |
Output is correct |
60 |
Correct |
3 ms |
5204 KB |
Output is correct |
61 |
Correct |
3 ms |
5204 KB |
Output is correct |
62 |
Incorrect |
4 ms |
5332 KB |
Output isn't correct |
63 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
34 ms |
17248 KB |
Output is correct |
2 |
Correct |
43 ms |
16884 KB |
Output is correct |
3 |
Correct |
24 ms |
14476 KB |
Output is correct |
4 |
Correct |
7 ms |
6856 KB |
Output is correct |
5 |
Correct |
7 ms |
6196 KB |
Output is correct |
6 |
Correct |
10 ms |
7884 KB |
Output is correct |
7 |
Correct |
3 ms |
5076 KB |
Output is correct |
8 |
Correct |
18 ms |
10372 KB |
Output is correct |
9 |
Correct |
23 ms |
12836 KB |
Output is correct |
10 |
Correct |
2 ms |
5076 KB |
Output is correct |
11 |
Correct |
32 ms |
14348 KB |
Output is correct |
12 |
Correct |
37 ms |
15852 KB |
Output is correct |
13 |
Correct |
3 ms |
5076 KB |
Output is correct |
14 |
Correct |
2 ms |
4948 KB |
Output is correct |
15 |
Correct |
2 ms |
5040 KB |
Output is correct |
16 |
Correct |
2 ms |
5044 KB |
Output is correct |
17 |
Correct |
2 ms |
4948 KB |
Output is correct |
18 |
Correct |
2 ms |
4948 KB |
Output is correct |
19 |
Correct |
2 ms |
4948 KB |
Output is correct |
20 |
Correct |
3 ms |
4948 KB |
Output is correct |
21 |
Correct |
2 ms |
4948 KB |
Output is correct |
22 |
Correct |
3 ms |
4948 KB |
Output is correct |
23 |
Correct |
2 ms |
4948 KB |
Output is correct |
24 |
Correct |
3 ms |
5052 KB |
Output is correct |
25 |
Correct |
2 ms |
4948 KB |
Output is correct |
26 |
Correct |
2 ms |
4948 KB |
Output is correct |
27 |
Correct |
3 ms |
4948 KB |
Output is correct |
28 |
Correct |
2 ms |
4948 KB |
Output is correct |
29 |
Correct |
2 ms |
5056 KB |
Output is correct |
30 |
Correct |
2 ms |
4948 KB |
Output is correct |
31 |
Correct |
2 ms |
4948 KB |
Output is correct |
32 |
Correct |
3 ms |
4948 KB |
Output is correct |
33 |
Correct |
2 ms |
5004 KB |
Output is correct |
34 |
Correct |
2 ms |
4948 KB |
Output is correct |
35 |
Correct |
2 ms |
4948 KB |
Output is correct |
36 |
Correct |
3 ms |
5056 KB |
Output is correct |
37 |
Correct |
2 ms |
5032 KB |
Output is correct |
38 |
Correct |
2 ms |
4948 KB |
Output is correct |
39 |
Correct |
33 ms |
17180 KB |
Output is correct |
40 |
Correct |
33 ms |
16772 KB |
Output is correct |
41 |
Correct |
25 ms |
14512 KB |
Output is correct |
42 |
Correct |
7 ms |
6868 KB |
Output is correct |
43 |
Correct |
3 ms |
5056 KB |
Output is correct |
44 |
Correct |
2 ms |
4948 KB |
Output is correct |
45 |
Correct |
2 ms |
5044 KB |
Output is correct |
46 |
Correct |
2 ms |
4948 KB |
Output is correct |
47 |
Correct |
3 ms |
5048 KB |
Output is correct |
48 |
Correct |
2 ms |
5028 KB |
Output is correct |
49 |
Correct |
2 ms |
4948 KB |
Output is correct |
50 |
Correct |
2 ms |
4948 KB |
Output is correct |
51 |
Correct |
2 ms |
4948 KB |
Output is correct |
52 |
Correct |
3 ms |
4948 KB |
Output is correct |
53 |
Correct |
2 ms |
4948 KB |
Output is correct |
54 |
Correct |
2 ms |
5044 KB |
Output is correct |
55 |
Correct |
2 ms |
4948 KB |
Output is correct |
56 |
Correct |
2 ms |
4948 KB |
Output is correct |
57 |
Correct |
55 ms |
15292 KB |
Output is correct |
58 |
Correct |
43 ms |
14884 KB |
Output is correct |
59 |
Correct |
46 ms |
14996 KB |
Output is correct |
60 |
Correct |
42 ms |
14668 KB |
Output is correct |
61 |
Correct |
43 ms |
14912 KB |
Output is correct |
62 |
Correct |
42 ms |
14708 KB |
Output is correct |
63 |
Correct |
43 ms |
14500 KB |
Output is correct |
64 |
Correct |
40 ms |
14492 KB |
Output is correct |
65 |
Correct |
48 ms |
14772 KB |
Output is correct |
66 |
Correct |
42 ms |
14708 KB |
Output is correct |
67 |
Correct |
42 ms |
14920 KB |
Output is correct |
68 |
Correct |
42 ms |
14960 KB |
Output is correct |
69 |
Correct |
44 ms |
14924 KB |
Output is correct |
70 |
Correct |
43 ms |
14920 KB |
Output is correct |
71 |
Correct |
3 ms |
4948 KB |
Output is correct |
72 |
Correct |
3 ms |
5332 KB |
Output is correct |
73 |
Correct |
3 ms |
5332 KB |
Output is correct |
74 |
Correct |
4 ms |
5332 KB |
Output is correct |
75 |
Correct |
4 ms |
5316 KB |
Output is correct |
76 |
Correct |
4 ms |
5332 KB |
Output is correct |
77 |
Correct |
3 ms |
5316 KB |
Output is correct |
78 |
Correct |
3 ms |
5332 KB |
Output is correct |
79 |
Correct |
3 ms |
5332 KB |
Output is correct |
80 |
Correct |
42 ms |
14920 KB |
Output is correct |
81 |
Correct |
46 ms |
14984 KB |
Output is correct |
82 |
Correct |
44 ms |
14920 KB |
Output is correct |
83 |
Correct |
42 ms |
14988 KB |
Output is correct |
84 |
Correct |
3 ms |
5204 KB |
Output is correct |
85 |
Correct |
3 ms |
5204 KB |
Output is correct |
86 |
Correct |
3 ms |
5204 KB |
Output is correct |
87 |
Correct |
3 ms |
5204 KB |
Output is correct |
88 |
Correct |
3 ms |
5204 KB |
Output is correct |
89 |
Correct |
4 ms |
5332 KB |
Output is correct |
90 |
Correct |
3 ms |
5188 KB |
Output is correct |
91 |
Correct |
3 ms |
5316 KB |
Output is correct |
92 |
Correct |
4 ms |
5240 KB |
Output is correct |
93 |
Correct |
3 ms |
5208 KB |
Output is correct |
94 |
Correct |
2 ms |
4948 KB |
Output is correct |
95 |
Correct |
2 ms |
5052 KB |
Output is correct |
96 |
Correct |
3 ms |
4948 KB |
Output is correct |
97 |
Correct |
3 ms |
4948 KB |
Output is correct |
98 |
Correct |
2 ms |
5028 KB |
Output is correct |
99 |
Correct |
3 ms |
4948 KB |
Output is correct |
100 |
Correct |
3 ms |
4948 KB |
Output is correct |
101 |
Correct |
2 ms |
4948 KB |
Output is correct |
102 |
Correct |
3 ms |
4948 KB |
Output is correct |
103 |
Correct |
3 ms |
5048 KB |
Output is correct |
104 |
Correct |
6 ms |
6228 KB |
Output is correct |
105 |
Correct |
10 ms |
7892 KB |
Output is correct |
106 |
Correct |
2 ms |
5076 KB |
Output is correct |
107 |
Correct |
18 ms |
10360 KB |
Output is correct |
108 |
Correct |
23 ms |
12880 KB |
Output is correct |
109 |
Correct |
3 ms |
5076 KB |
Output is correct |
110 |
Correct |
32 ms |
14396 KB |
Output is correct |
111 |
Correct |
46 ms |
15892 KB |
Output is correct |
112 |
Correct |
3 ms |
5076 KB |
Output is correct |
113 |
Correct |
54 ms |
22308 KB |
Output is correct |
114 |
Correct |
24 ms |
11700 KB |
Output is correct |
115 |
Correct |
30 ms |
11728 KB |
Output is correct |
116 |
Correct |
24 ms |
11780 KB |
Output is correct |
117 |
Correct |
24 ms |
11720 KB |
Output is correct |
118 |
Correct |
26 ms |
11668 KB |
Output is correct |
119 |
Correct |
25 ms |
12172 KB |
Output is correct |
120 |
Correct |
26 ms |
12064 KB |
Output is correct |
121 |
Correct |
34 ms |
11788 KB |
Output is correct |
122 |
Correct |
23 ms |
11604 KB |
Output is correct |
123 |
Correct |
25 ms |
11940 KB |
Output is correct |
124 |
Correct |
2 ms |
5048 KB |
Output is correct |
125 |
Correct |
16 ms |
10676 KB |
Output is correct |
126 |
Correct |
16 ms |
10836 KB |
Output is correct |
127 |
Correct |
16 ms |
10708 KB |
Output is correct |
128 |
Correct |
16 ms |
10768 KB |
Output is correct |
129 |
Correct |
17 ms |
10504 KB |
Output is correct |
130 |
Correct |
17 ms |
10000 KB |
Output is correct |
131 |
Correct |
17 ms |
10816 KB |
Output is correct |
132 |
Correct |
16 ms |
10580 KB |
Output is correct |
133 |
Correct |
2 ms |
4948 KB |
Output is correct |
134 |
Correct |
2 ms |
4948 KB |
Output is correct |
135 |
Correct |
3 ms |
5204 KB |
Output is correct |
136 |
Correct |
16 ms |
10632 KB |
Output is correct |
137 |
Correct |
7 ms |
5056 KB |
Output is correct |
138 |
Correct |
3 ms |
5204 KB |
Output is correct |
139 |
Correct |
3 ms |
5204 KB |
Output is correct |
140 |
Correct |
3 ms |
5076 KB |
Output is correct |
141 |
Correct |
3 ms |
5212 KB |
Output is correct |
142 |
Correct |
3 ms |
5204 KB |
Output is correct |
143 |
Correct |
2 ms |
5076 KB |
Output is correct |
144 |
Correct |
3 ms |
5204 KB |
Output is correct |
145 |
Correct |
4 ms |
5212 KB |
Output is correct |
146 |
Correct |
3 ms |
5052 KB |
Output is correct |
147 |
Correct |
2 ms |
4948 KB |
Output is correct |
148 |
Correct |
2 ms |
4948 KB |
Output is correct |
149 |
Correct |
2 ms |
5052 KB |
Output is correct |
150 |
Correct |
3 ms |
4948 KB |
Output is correct |
151 |
Correct |
3 ms |
4948 KB |
Output is correct |
152 |
Correct |
2 ms |
4948 KB |
Output is correct |
153 |
Correct |
2 ms |
4948 KB |
Output is correct |
154 |
Correct |
2 ms |
4948 KB |
Output is correct |
155 |
Correct |
2 ms |
5052 KB |
Output is correct |
156 |
Correct |
2 ms |
4948 KB |
Output is correct |
157 |
Correct |
2 ms |
4948 KB |
Output is correct |
158 |
Correct |
2 ms |
4948 KB |
Output is correct |
159 |
Correct |
2 ms |
4964 KB |
Output is correct |
160 |
Correct |
2 ms |
4948 KB |
Output is correct |
161 |
Correct |
2 ms |
4948 KB |
Output is correct |
162 |
Correct |
2 ms |
4948 KB |
Output is correct |
163 |
Correct |
2 ms |
4948 KB |
Output is correct |
164 |
Correct |
3 ms |
4948 KB |
Output is correct |
165 |
Correct |
4 ms |
5444 KB |
Output is correct |
166 |
Correct |
3 ms |
5460 KB |
Output is correct |
167 |
Correct |
4 ms |
5204 KB |
Output is correct |
168 |
Correct |
3 ms |
5144 KB |
Output is correct |
169 |
Correct |
3 ms |
5332 KB |
Output is correct |
170 |
Correct |
3 ms |
5332 KB |
Output is correct |
171 |
Correct |
3 ms |
5204 KB |
Output is correct |
172 |
Correct |
3 ms |
5204 KB |
Output is correct |
173 |
Incorrect |
4 ms |
5332 KB |
Output isn't correct |
174 |
Halted |
0 ms |
0 KB |
- |