#pragma GCC optimize("O1,O2,O3,Ofast,unroll-loops")
#include "dreaming.h"
#include <bits/stdc++.h>
#include <string>
#include <iostream>
#include <cmath>
#include <numeric>
#include <iomanip>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<int, int> pl;
typedef pair<ld, ld> pd;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<vector<int>> vvi;
typedef vector<ld> vd;
typedef vector<long> vl;
typedef vector<ull> vull;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
typedef vector<vpi> vvpi;
#define FOR(i, a, b) for (int i = a; i < (b); i++)
#define F0R(i, a) for (int i = 0; i < (a); i++)
#define FORd(i, a, b) for (int i = (b)-1; i >= a; i--)
#define F0Rd(i, a) for (int i = (a)-1; i >= 0; i--)
#define trav(a, x) for (auto &a : x)
#define uid(a, b) uniform_int_distribution<int>(a, b)(rng)
#define len(x) (int)(x).size()
#define mp make_pair
#define pb push_back
#define F first
#define nl endl
#define S second
#define lb lower_bound
#define ub upper_bound
#define aint(x) x.begin(), x.end()
#define raint(x) x.rbegin(), x.rend()
#define ins insert
const int MOD = 1000000007;
vi visited;
vvpi paths;
vi prev_arr;
int node = 0;
int maxdist = 0;
int ans = 0;
int n;
void dij(int pos){
vi dist(n,-1);
prev_arr = vi(n,-1);
queue<int> p;
p.push(pos);
dist[pos] = 0;
while(!p.empty()){
int a = p.front();p.pop();
visited[a] = 1;
for(auto b:paths[a]){
if(a!= pos && prev_arr[a] == b.F)continue;
dist[b.F] = dist[a] + b.S;
p.push(b.F);
prev_arr[b.F] = a;
if(dist[b.F] > maxdist){
maxdist = dist[b.F];
node = b.F;
}
}
}
}
// void dij2(int pos,int mxdst){
// vi dist(n,-1);
// vi dist2(n,-1);
// prev_arr = vi(n,-1);
// queue<int> p;
// p.push(pos);
// dist[pos] = 0;
// dist2[pos] = mxdst;
// while(!p.empty()){
// int a = p.front();p.pop();
// for(auto b:paths[a]){
// if(backtrack.count(b.F) == 0)continue;
// if(a!= pos && prev_arr[a] == b.F)continue;
// dist[b.F] = dist[a] + b.S;
// dist2[b.F] = dist2[a] - b.S;
// p.push(b.F);
// prev_arr[b.F] = a;
// if(max(dist[b.F],dist2[b.F]) < maxdist){
// maxdist = max(dist[b.F],dist2[b.F]);
// node = b.F;
// }
// }
// }
// }
void go_back(int pos,int counter1){
int counter2 = 0;
while(prev_arr[pos] != -1){
int val = 0;
for(auto i:paths[min(pos,prev_arr[pos])]){
if(max(pos,prev_arr[pos]) == i.F){
val = i.S;
break;
}
}
// counter1 -= cons[{min(pos,prev_arr[pos]),max(pos,prev_arr[pos])}];
// counter2 += cons[{min(pos,prev_arr[pos]),max(pos,prev_arr[pos])}];
counter1 -= val;
counter2 += val;
maxdist = min(max(counter1,counter2),maxdist);
pos = prev_arr[pos];
}
}
int travelTime(int N, int m, int L, int A[], int B[], int T[]) {
if(n==1)return 0;
n = N;
paths = vvpi(n);
visited = vi(n,0);
vi distances(n,0);
ans = 0;
int cnt = 0;
FOR(i,0,m){
paths[A[i]].pb({B[i],T[i]});
paths[B[i]].pb({A[i],T[i]});
}
for(int i=0;i<n;i++){
if(visited[i])continue;
maxdist = 0;
node = i;
dij(i);
// cerr << i << " " << node << " " << maxdist << endl;
maxdist = 0;
int head = node;
node = i;
dij(head);
// cerr << "width " << head << " " << node << " " << maxdist << endl;
ans = max(ans,maxdist);
// backtrack.clear();
go_back(node,maxdist);
// cerr << "path - ";
// for(int a:backtrack)cerr << a << " ";
// cerr << endl;
// dij2(node,maxdist);
// head = node;
// maxdist = 0;
// dij(head);
// cerr << "center " << head << " " << maxdist << endl;
// cerr << endl;
distances[i] = maxdist;
cnt += 1;
}
sort(distances.rbegin(),distances.rend());
if(m == n-1)return ans;
if(cnt >= 2)ans = max(ans,distances[0]+distances[1]+L);
if(cnt >= 3)ans = max(ans,distances[1]+distances[2]+L+L);
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
30 ms |
8168 KB |
Output is correct |
2 |
Correct |
32 ms |
9456 KB |
Output is correct |
3 |
Correct |
19 ms |
6492 KB |
Output is correct |
4 |
Correct |
5 ms |
1628 KB |
Output is correct |
5 |
Correct |
4 ms |
1372 KB |
Output is correct |
6 |
Correct |
10 ms |
2396 KB |
Output is correct |
7 |
Correct |
1 ms |
344 KB |
Output is correct |
8 |
Correct |
17 ms |
4360 KB |
Output is correct |
9 |
Correct |
19 ms |
5328 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
30 ms |
7620 KB |
Output is correct |
12 |
Correct |
33 ms |
8428 KB |
Output is correct |
13 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
1 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 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 |
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 |
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 |
1 ms |
760 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
1 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
30 ms |
8168 KB |
Output is correct |
2 |
Correct |
32 ms |
9456 KB |
Output is correct |
3 |
Correct |
19 ms |
6492 KB |
Output is correct |
4 |
Correct |
5 ms |
1628 KB |
Output is correct |
5 |
Correct |
4 ms |
1372 KB |
Output is correct |
6 |
Correct |
10 ms |
2396 KB |
Output is correct |
7 |
Correct |
1 ms |
344 KB |
Output is correct |
8 |
Correct |
17 ms |
4360 KB |
Output is correct |
9 |
Correct |
19 ms |
5328 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
30 ms |
7620 KB |
Output is correct |
12 |
Correct |
33 ms |
8428 KB |
Output is correct |
13 |
Correct |
1 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
344 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
1 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
1 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
344 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 |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
344 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
760 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
1 ms |
344 KB |
Output is correct |
39 |
Correct |
28 ms |
9416 KB |
Output is correct |
40 |
Correct |
32 ms |
9452 KB |
Output is correct |
41 |
Correct |
24 ms |
6532 KB |
Output is correct |
42 |
Correct |
6 ms |
1628 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
344 KB |
Output is correct |
45 |
Correct |
0 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
440 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 |
1 ms |
604 KB |
Output is correct |
52 |
Correct |
1 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 |
36 ms |
11164 KB |
Output is correct |
58 |
Correct |
42 ms |
11252 KB |
Output is correct |
59 |
Correct |
36 ms |
11080 KB |
Output is correct |
60 |
Correct |
36 ms |
11080 KB |
Output is correct |
61 |
Correct |
36 ms |
11228 KB |
Output is correct |
62 |
Correct |
35 ms |
11540 KB |
Output is correct |
63 |
Correct |
32 ms |
10956 KB |
Output is correct |
64 |
Correct |
34 ms |
10964 KB |
Output is correct |
65 |
Correct |
34 ms |
11212 KB |
Output is correct |
66 |
Correct |
36 ms |
11216 KB |
Output is correct |
67 |
Correct |
39 ms |
11072 KB |
Output is correct |
68 |
Correct |
35 ms |
11084 KB |
Output is correct |
69 |
Correct |
36 ms |
11588 KB |
Output is correct |
70 |
Correct |
44 ms |
11328 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 |
604 KB |
Output is correct |
80 |
Correct |
43 ms |
11464 KB |
Output is correct |
81 |
Correct |
36 ms |
11084 KB |
Output is correct |
82 |
Correct |
33 ms |
11212 KB |
Output is correct |
83 |
Correct |
37 ms |
11208 KB |
Output is correct |
84 |
Correct |
1 ms |
604 KB |
Output is correct |
85 |
Correct |
1 ms |
604 KB |
Output is correct |
86 |
Correct |
1 ms |
604 KB |
Output is correct |
87 |
Correct |
1 ms |
604 KB |
Output is correct |
88 |
Correct |
1 ms |
604 KB |
Output is correct |
89 |
Correct |
1 ms |
604 KB |
Output is correct |
90 |
Correct |
1 ms |
604 KB |
Output is correct |
91 |
Correct |
1 ms |
604 KB |
Output is correct |
92 |
Correct |
1 ms |
604 KB |
Output is correct |
93 |
Correct |
1 ms |
500 KB |
Output is correct |
94 |
Correct |
0 ms |
348 KB |
Output is correct |
95 |
Correct |
0 ms |
348 KB |
Output is correct |
96 |
Correct |
0 ms |
348 KB |
Output is correct |
97 |
Correct |
0 ms |
348 KB |
Output is correct |
98 |
Correct |
0 ms |
348 KB |
Output is correct |
99 |
Correct |
0 ms |
348 KB |
Output is correct |
100 |
Correct |
0 ms |
344 KB |
Output is correct |
101 |
Correct |
1 ms |
348 KB |
Output is correct |
102 |
Correct |
1 ms |
348 KB |
Output is correct |
103 |
Correct |
1 ms |
348 KB |
Output is correct |
104 |
Correct |
4 ms |
1372 KB |
Output is correct |
105 |
Correct |
8 ms |
2424 KB |
Output is correct |
106 |
Correct |
0 ms |
344 KB |
Output is correct |
107 |
Correct |
17 ms |
4376 KB |
Output is correct |
108 |
Correct |
21 ms |
5268 KB |
Output is correct |
109 |
Correct |
1 ms |
348 KB |
Output is correct |
110 |
Correct |
34 ms |
7456 KB |
Output is correct |
111 |
Correct |
36 ms |
8412 KB |
Output is correct |
112 |
Correct |
1 ms |
348 KB |
Output is correct |
113 |
Correct |
43 ms |
10648 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1066 ms |
6780 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
1 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 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 |
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 |
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 |
1 ms |
760 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
1 ms |
344 KB |
Output is correct |
26 |
Correct |
1 ms |
344 KB |
Output is correct |
27 |
Correct |
1 ms |
604 KB |
Output is correct |
28 |
Correct |
2 ms |
604 KB |
Output is correct |
29 |
Correct |
1 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
604 KB |
Output is correct |
31 |
Correct |
2 ms |
604 KB |
Output is correct |
32 |
Correct |
1 ms |
416 KB |
Output is correct |
33 |
Correct |
1 ms |
604 KB |
Output is correct |
34 |
Correct |
1 ms |
604 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
344 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
1 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
1 ms |
600 KB |
Output is correct |
45 |
Correct |
1 ms |
600 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
0 ms |
344 KB |
Output is correct |
48 |
Correct |
1 ms |
348 KB |
Output is correct |
49 |
Correct |
0 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
348 KB |
Output is correct |
51 |
Correct |
0 ms |
348 KB |
Output is correct |
52 |
Correct |
0 ms |
348 KB |
Output is correct |
53 |
Correct |
0 ms |
348 KB |
Output is correct |
54 |
Correct |
1 ms |
604 KB |
Output is correct |
55 |
Correct |
1 ms |
708 KB |
Output is correct |
56 |
Correct |
2 ms |
600 KB |
Output is correct |
57 |
Correct |
3 ms |
600 KB |
Output is correct |
58 |
Correct |
1 ms |
604 KB |
Output is correct |
59 |
Correct |
1 ms |
604 KB |
Output is correct |
60 |
Correct |
2 ms |
604 KB |
Output is correct |
61 |
Correct |
2 ms |
604 KB |
Output is correct |
62 |
Correct |
1 ms |
600 KB |
Output is correct |
63 |
Correct |
1 ms |
604 KB |
Output is correct |
64 |
Correct |
2 ms |
604 KB |
Output is correct |
65 |
Correct |
2 ms |
604 KB |
Output is correct |
66 |
Correct |
1 ms |
604 KB |
Output is correct |
67 |
Correct |
1 ms |
604 KB |
Output is correct |
68 |
Correct |
2 ms |
604 KB |
Output is correct |
69 |
Correct |
2 ms |
604 KB |
Output is correct |
70 |
Correct |
2 ms |
656 KB |
Output is correct |
71 |
Correct |
3 ms |
600 KB |
Output is correct |
72 |
Correct |
1 ms |
604 KB |
Output is correct |
73 |
Correct |
1 ms |
860 KB |
Output is correct |
74 |
Correct |
1 ms |
748 KB |
Output is correct |
75 |
Correct |
3 ms |
604 KB |
Output is correct |
76 |
Correct |
1 ms |
604 KB |
Output is correct |
77 |
Correct |
1 ms |
604 KB |
Output is correct |
78 |
Correct |
2 ms |
604 KB |
Output is correct |
79 |
Correct |
3 ms |
652 KB |
Output is correct |
80 |
Correct |
3 ms |
348 KB |
Output is correct |
81 |
Correct |
3 ms |
348 KB |
Output is correct |
82 |
Correct |
1 ms |
740 KB |
Output is correct |
83 |
Correct |
2 ms |
600 KB |
Output is correct |
84 |
Correct |
2 ms |
604 KB |
Output is correct |
85 |
Correct |
3 ms |
360 KB |
Output is correct |
86 |
Correct |
3 ms |
632 KB |
Output is correct |
87 |
Correct |
2 ms |
604 KB |
Output is correct |
88 |
Correct |
3 ms |
604 KB |
Output is correct |
89 |
Correct |
2 ms |
604 KB |
Output is correct |
90 |
Correct |
2 ms |
600 KB |
Output is correct |
91 |
Correct |
2 ms |
604 KB |
Output is correct |
92 |
Correct |
1 ms |
604 KB |
Output is correct |
93 |
Correct |
1 ms |
604 KB |
Output is correct |
94 |
Correct |
1 ms |
492 KB |
Output is correct |
95 |
Correct |
1 ms |
604 KB |
Output is correct |
96 |
Correct |
1 ms |
604 KB |
Output is correct |
97 |
Correct |
1 ms |
604 KB |
Output is correct |
98 |
Correct |
1 ms |
604 KB |
Output is correct |
99 |
Correct |
1 ms |
604 KB |
Output is correct |
100 |
Correct |
2 ms |
604 KB |
Output is correct |
101 |
Correct |
1 ms |
604 KB |
Output is correct |
102 |
Correct |
1 ms |
440 KB |
Output is correct |
103 |
Correct |
0 ms |
348 KB |
Output is correct |
104 |
Correct |
0 ms |
348 KB |
Output is correct |
105 |
Correct |
0 ms |
348 KB |
Output is correct |
106 |
Correct |
0 ms |
444 KB |
Output is correct |
107 |
Correct |
0 ms |
348 KB |
Output is correct |
108 |
Correct |
1 ms |
348 KB |
Output is correct |
109 |
Correct |
1 ms |
348 KB |
Output is correct |
110 |
Correct |
1 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 |
344 KB |
Output is correct |
114 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
30 ms |
8168 KB |
Output is correct |
2 |
Correct |
32 ms |
9456 KB |
Output is correct |
3 |
Correct |
19 ms |
6492 KB |
Output is correct |
4 |
Correct |
5 ms |
1628 KB |
Output is correct |
5 |
Correct |
4 ms |
1372 KB |
Output is correct |
6 |
Correct |
10 ms |
2396 KB |
Output is correct |
7 |
Correct |
1 ms |
344 KB |
Output is correct |
8 |
Correct |
17 ms |
4360 KB |
Output is correct |
9 |
Correct |
19 ms |
5328 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
30 ms |
7620 KB |
Output is correct |
12 |
Correct |
33 ms |
8428 KB |
Output is correct |
13 |
Correct |
1 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
344 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
1 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
1 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
344 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 |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
344 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
760 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
1 ms |
344 KB |
Output is correct |
39 |
Correct |
28 ms |
9416 KB |
Output is correct |
40 |
Correct |
32 ms |
9452 KB |
Output is correct |
41 |
Correct |
24 ms |
6532 KB |
Output is correct |
42 |
Correct |
6 ms |
1628 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
344 KB |
Output is correct |
45 |
Correct |
0 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
440 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 |
1 ms |
604 KB |
Output is correct |
52 |
Correct |
1 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 |
36 ms |
11164 KB |
Output is correct |
58 |
Correct |
42 ms |
11252 KB |
Output is correct |
59 |
Correct |
36 ms |
11080 KB |
Output is correct |
60 |
Correct |
36 ms |
11080 KB |
Output is correct |
61 |
Correct |
36 ms |
11228 KB |
Output is correct |
62 |
Correct |
35 ms |
11540 KB |
Output is correct |
63 |
Correct |
32 ms |
10956 KB |
Output is correct |
64 |
Correct |
34 ms |
10964 KB |
Output is correct |
65 |
Correct |
34 ms |
11212 KB |
Output is correct |
66 |
Correct |
36 ms |
11216 KB |
Output is correct |
67 |
Correct |
39 ms |
11072 KB |
Output is correct |
68 |
Correct |
35 ms |
11084 KB |
Output is correct |
69 |
Correct |
36 ms |
11588 KB |
Output is correct |
70 |
Correct |
44 ms |
11328 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 |
604 KB |
Output is correct |
80 |
Correct |
43 ms |
11464 KB |
Output is correct |
81 |
Correct |
36 ms |
11084 KB |
Output is correct |
82 |
Correct |
33 ms |
11212 KB |
Output is correct |
83 |
Correct |
37 ms |
11208 KB |
Output is correct |
84 |
Correct |
1 ms |
604 KB |
Output is correct |
85 |
Correct |
1 ms |
604 KB |
Output is correct |
86 |
Correct |
1 ms |
604 KB |
Output is correct |
87 |
Correct |
1 ms |
604 KB |
Output is correct |
88 |
Correct |
1 ms |
604 KB |
Output is correct |
89 |
Correct |
1 ms |
604 KB |
Output is correct |
90 |
Correct |
1 ms |
604 KB |
Output is correct |
91 |
Correct |
1 ms |
604 KB |
Output is correct |
92 |
Correct |
1 ms |
604 KB |
Output is correct |
93 |
Correct |
1 ms |
500 KB |
Output is correct |
94 |
Correct |
0 ms |
348 KB |
Output is correct |
95 |
Correct |
0 ms |
348 KB |
Output is correct |
96 |
Correct |
0 ms |
348 KB |
Output is correct |
97 |
Correct |
0 ms |
348 KB |
Output is correct |
98 |
Correct |
0 ms |
348 KB |
Output is correct |
99 |
Correct |
0 ms |
348 KB |
Output is correct |
100 |
Correct |
0 ms |
344 KB |
Output is correct |
101 |
Correct |
1 ms |
348 KB |
Output is correct |
102 |
Correct |
1 ms |
348 KB |
Output is correct |
103 |
Correct |
1 ms |
348 KB |
Output is correct |
104 |
Correct |
4 ms |
1372 KB |
Output is correct |
105 |
Correct |
8 ms |
2424 KB |
Output is correct |
106 |
Correct |
0 ms |
344 KB |
Output is correct |
107 |
Correct |
17 ms |
4376 KB |
Output is correct |
108 |
Correct |
21 ms |
5268 KB |
Output is correct |
109 |
Correct |
1 ms |
348 KB |
Output is correct |
110 |
Correct |
34 ms |
7456 KB |
Output is correct |
111 |
Correct |
36 ms |
8412 KB |
Output is correct |
112 |
Correct |
1 ms |
348 KB |
Output is correct |
113 |
Correct |
43 ms |
10648 KB |
Output is correct |
114 |
Execution timed out |
1066 ms |
6780 KB |
Time limit exceeded |
115 |
Halted |
0 ms |
0 KB |
- |