#include <bits/stdc++.h>
#pragma GCC optimize("O3")
typedef long long ll;
#define FOR(i,x,y) for(ll i=x; i<y; i++)
#define FORNEG(i,x,y) for(ll i=x; i>y; i--)
#define double long double
#include "dreaming.h"
using namespace std;
ll cc[100005];
ll find(ll a){
while (a!=cc[a]) cc[a] = cc[cc[a]], a = cc[a];
return a;
}
void unite(ll a,ll b){
cc[find(a)] = find(b);
}
ll globalmax = 0;
vector<pair<ll, ll>> edges[100005];
vector<ll> sussies[100005];
int sus(vector<ll> a){
if (a.size()==1) return 0;
bool visited[100005];
FOR(i,0,100001) visited[i] = 0;
vector<ll> parent[100005];
vector<ll> stacc;
stacc.push_back(a[0]);
visited[a[0]] = 1;
while (stacc.size()){
ll node = stacc[stacc.size()-1];
stacc.pop_back();
for (auto&i : edges[node]){
if (!visited[i.first]){
visited[i.first] = 1;
stacc.push_back(i.first);
parent[i.first] = {node, i.second};
}
}
}
FOR(i,0,100001) visited[i] = 0;
ll maxi = -1;
ll maxpos = -1;
vector<vector<ll>> stack;
stack.push_back({a[0], 0});
visited[a[0]] = 1;
while (stack.size()){
vector<ll> node = stack[stack.size()-1];
stack.pop_back();
if (maxi < node[1]) maxi = node[1], maxpos = node[0];
for (auto&i : edges[node[0]]){
if (!visited[i.first]){
visited[i.first] = 1;
stack.push_back({i.first, node[1] + i.second});
}
}
}
globalmax = max(globalmax, maxi);
stack.clear();
ll maxmaxpos = -1;
maxi = -1;
FOR(i,0,100001) visited[i] = 0;
stack.push_back({maxpos, 0});
visited[maxpos] = 1;
while (stack.size()){
vector<ll> node = stack[stack.size()-1];
stack.pop_back();
if (maxi < node[1]) maxi = node[1], maxmaxpos = node[0];
for (auto&i : edges[node[0]]){
if (!visited[i.first]){
visited[i.first] = 1;
stack.push_back({i.first, node[1] + i.second});
}
}
}
vector<ll> prev;
vector<vector<ll>> left;
vector<vector<ll>> right;
globalmax =max(globalmax, maxi);
while (maxpos != a[0]){
left.push_back({parent[maxpos][0], parent[maxpos][1]});
maxpos = parent[maxpos][0];
}
while (maxmaxpos != a[0]){
left.push_back({parent[maxmaxpos][0], parent[maxmaxpos][1]});
maxmaxpos = parent[maxmaxpos][0];
}
while (left.size() && right.size() && left[left.size()-1] == right[right.size()-1]){
left.pop_back();
prev = right[right.size()-1];
right.pop_back();
}
vector<ll> sussies;
sussies.push_back(0);
for (auto&i : left){
sussies.push_back(i[1]);
}
if (prev.size()) sussies.push_back(prev[1]);
for (auto&i : right){
sussies.push_back(i[1]);
}
ll mini = 10000000000;
ll cur = 0;
FOR(i,0,sussies.size()){
cur += sussies[i];
mini = min(mini, max(cur, maxi-cur));
}
return mini;
}
int travelTime(int n, int m, int L, int a[], int b[], int t[]){
FOR(i,0,n) cc[i] = i;
FOR(i,0,m){
edges[a[i]].push_back({b[i], t[i]});
edges[b[i]].push_back({a[i], t[i]});
}
FOR(i,0,n){
for (auto&j : edges[i]){
unite(i, j.first);
}
}
FOR(i,0,n){
sussies[find(i)].push_back(i);
}
vector<ll> kindasus;
for (auto&i : sussies){
if (i.size()==0) continue;
kindasus.push_back(sus(i));
}
sort(kindasus.begin(), kindasus.end());
// for (auto&i : kindasus){
// cout << i << endl;
// }
if (kindasus.size() == 1) return globalmax;
if (kindasus.size()==2){
return max(globalmax, kindasus[kindasus.size()-1] + kindasus[kindasus.size()-2] + L);
}
return max(globalmax, max(kindasus[kindasus.size()-2] + kindasus[kindasus.size()-3] + 2*L, kindasus[kindasus.size()-1] + kindasus[kindasus.size()-2] + L));
}
Compilation message
dreaming.cpp: In function 'int sus(std::vector<long long int>)':
dreaming.cpp:4:33: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
4 | #define FOR(i,x,y) for(ll i=x; i<y; i++)
......
141 | FOR(i,0,sussies.size()){
| ~~~~~~~~~~~~~~~~~~
dreaming.cpp:141:2: note: in expansion of macro 'FOR'
141 | FOR(i,0,sussies.size()){
| ^~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
78 ms |
24428 KB |
Output is correct |
2 |
Correct |
84 ms |
25796 KB |
Output is correct |
3 |
Correct |
55 ms |
19380 KB |
Output is correct |
4 |
Correct |
13 ms |
10076 KB |
Output is correct |
5 |
Correct |
12 ms |
8924 KB |
Output is correct |
6 |
Correct |
21 ms |
11556 KB |
Output is correct |
7 |
Correct |
4 ms |
7508 KB |
Output is correct |
8 |
Correct |
40 ms |
13732 KB |
Output is correct |
9 |
Correct |
51 ms |
16488 KB |
Output is correct |
10 |
Correct |
5 ms |
7508 KB |
Output is correct |
11 |
Correct |
80 ms |
19252 KB |
Output is correct |
12 |
Correct |
101 ms |
22684 KB |
Output is correct |
13 |
Correct |
5 ms |
7508 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
7380 KB |
Output is correct |
2 |
Correct |
4 ms |
7380 KB |
Output is correct |
3 |
Correct |
5 ms |
7380 KB |
Output is correct |
4 |
Correct |
6 ms |
7380 KB |
Output is correct |
5 |
Correct |
4 ms |
7380 KB |
Output is correct |
6 |
Correct |
4 ms |
7380 KB |
Output is correct |
7 |
Correct |
4 ms |
7380 KB |
Output is correct |
8 |
Correct |
4 ms |
7476 KB |
Output is correct |
9 |
Correct |
5 ms |
7380 KB |
Output is correct |
10 |
Correct |
5 ms |
7380 KB |
Output is correct |
11 |
Correct |
4 ms |
7380 KB |
Output is correct |
12 |
Correct |
4 ms |
7380 KB |
Output is correct |
13 |
Correct |
4 ms |
7380 KB |
Output is correct |
14 |
Correct |
4 ms |
7380 KB |
Output is correct |
15 |
Correct |
4 ms |
7380 KB |
Output is correct |
16 |
Correct |
4 ms |
7380 KB |
Output is correct |
17 |
Correct |
4 ms |
7380 KB |
Output is correct |
18 |
Correct |
4 ms |
7380 KB |
Output is correct |
19 |
Correct |
5 ms |
7380 KB |
Output is correct |
20 |
Correct |
4 ms |
7380 KB |
Output is correct |
21 |
Correct |
4 ms |
7380 KB |
Output is correct |
22 |
Correct |
6 ms |
7380 KB |
Output is correct |
23 |
Correct |
5 ms |
7380 KB |
Output is correct |
24 |
Correct |
4 ms |
7380 KB |
Output is correct |
25 |
Correct |
4 ms |
7380 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
78 ms |
24428 KB |
Output is correct |
2 |
Correct |
84 ms |
25796 KB |
Output is correct |
3 |
Correct |
55 ms |
19380 KB |
Output is correct |
4 |
Correct |
13 ms |
10076 KB |
Output is correct |
5 |
Correct |
12 ms |
8924 KB |
Output is correct |
6 |
Correct |
21 ms |
11556 KB |
Output is correct |
7 |
Correct |
4 ms |
7508 KB |
Output is correct |
8 |
Correct |
40 ms |
13732 KB |
Output is correct |
9 |
Correct |
51 ms |
16488 KB |
Output is correct |
10 |
Correct |
5 ms |
7508 KB |
Output is correct |
11 |
Correct |
80 ms |
19252 KB |
Output is correct |
12 |
Correct |
101 ms |
22684 KB |
Output is correct |
13 |
Correct |
5 ms |
7508 KB |
Output is correct |
14 |
Correct |
4 ms |
7380 KB |
Output is correct |
15 |
Correct |
4 ms |
7380 KB |
Output is correct |
16 |
Correct |
5 ms |
7380 KB |
Output is correct |
17 |
Correct |
6 ms |
7380 KB |
Output is correct |
18 |
Correct |
4 ms |
7380 KB |
Output is correct |
19 |
Correct |
4 ms |
7380 KB |
Output is correct |
20 |
Correct |
4 ms |
7380 KB |
Output is correct |
21 |
Correct |
4 ms |
7476 KB |
Output is correct |
22 |
Correct |
5 ms |
7380 KB |
Output is correct |
23 |
Correct |
5 ms |
7380 KB |
Output is correct |
24 |
Correct |
4 ms |
7380 KB |
Output is correct |
25 |
Correct |
4 ms |
7380 KB |
Output is correct |
26 |
Correct |
4 ms |
7380 KB |
Output is correct |
27 |
Correct |
4 ms |
7380 KB |
Output is correct |
28 |
Correct |
4 ms |
7380 KB |
Output is correct |
29 |
Correct |
4 ms |
7380 KB |
Output is correct |
30 |
Correct |
4 ms |
7380 KB |
Output is correct |
31 |
Correct |
4 ms |
7380 KB |
Output is correct |
32 |
Correct |
5 ms |
7380 KB |
Output is correct |
33 |
Correct |
4 ms |
7380 KB |
Output is correct |
34 |
Correct |
4 ms |
7380 KB |
Output is correct |
35 |
Correct |
6 ms |
7380 KB |
Output is correct |
36 |
Correct |
5 ms |
7380 KB |
Output is correct |
37 |
Correct |
4 ms |
7380 KB |
Output is correct |
38 |
Correct |
4 ms |
7380 KB |
Output is correct |
39 |
Correct |
85 ms |
25736 KB |
Output is correct |
40 |
Correct |
78 ms |
25636 KB |
Output is correct |
41 |
Correct |
54 ms |
19376 KB |
Output is correct |
42 |
Correct |
13 ms |
10072 KB |
Output is correct |
43 |
Correct |
7 ms |
7380 KB |
Output is correct |
44 |
Correct |
5 ms |
7380 KB |
Output is correct |
45 |
Correct |
6 ms |
7380 KB |
Output is correct |
46 |
Correct |
6 ms |
7372 KB |
Output is correct |
47 |
Correct |
4 ms |
7440 KB |
Output is correct |
48 |
Correct |
4 ms |
7380 KB |
Output is correct |
49 |
Correct |
5 ms |
7440 KB |
Output is correct |
50 |
Correct |
4 ms |
7380 KB |
Output is correct |
51 |
Correct |
4 ms |
7432 KB |
Output is correct |
52 |
Correct |
4 ms |
7380 KB |
Output is correct |
53 |
Correct |
4 ms |
7444 KB |
Output is correct |
54 |
Correct |
4 ms |
7444 KB |
Output is correct |
55 |
Correct |
5 ms |
7440 KB |
Output is correct |
56 |
Correct |
4 ms |
7380 KB |
Output is correct |
57 |
Correct |
119 ms |
20376 KB |
Output is correct |
58 |
Correct |
142 ms |
18844 KB |
Output is correct |
59 |
Correct |
117 ms |
20204 KB |
Output is correct |
60 |
Correct |
111 ms |
18800 KB |
Output is correct |
61 |
Correct |
108 ms |
20348 KB |
Output is correct |
62 |
Correct |
115 ms |
19384 KB |
Output is correct |
63 |
Correct |
105 ms |
20524 KB |
Output is correct |
64 |
Correct |
103 ms |
20440 KB |
Output is correct |
65 |
Correct |
119 ms |
20756 KB |
Output is correct |
66 |
Correct |
108 ms |
20804 KB |
Output is correct |
67 |
Correct |
106 ms |
20288 KB |
Output is correct |
68 |
Correct |
109 ms |
20168 KB |
Output is correct |
69 |
Correct |
134 ms |
19356 KB |
Output is correct |
70 |
Correct |
107 ms |
19304 KB |
Output is correct |
71 |
Correct |
4 ms |
7380 KB |
Output is correct |
72 |
Correct |
6 ms |
7764 KB |
Output is correct |
73 |
Correct |
6 ms |
7764 KB |
Output is correct |
74 |
Correct |
6 ms |
7828 KB |
Output is correct |
75 |
Correct |
6 ms |
7712 KB |
Output is correct |
76 |
Correct |
8 ms |
7764 KB |
Output is correct |
77 |
Correct |
7 ms |
7772 KB |
Output is correct |
78 |
Correct |
7 ms |
7712 KB |
Output is correct |
79 |
Correct |
6 ms |
7764 KB |
Output is correct |
80 |
Correct |
145 ms |
19308 KB |
Output is correct |
81 |
Correct |
115 ms |
19420 KB |
Output is correct |
82 |
Correct |
148 ms |
20248 KB |
Output is correct |
83 |
Correct |
127 ms |
20692 KB |
Output is correct |
84 |
Correct |
6 ms |
7764 KB |
Output is correct |
85 |
Correct |
5 ms |
7708 KB |
Output is correct |
86 |
Correct |
6 ms |
7712 KB |
Output is correct |
87 |
Correct |
6 ms |
7764 KB |
Output is correct |
88 |
Correct |
6 ms |
7764 KB |
Output is correct |
89 |
Correct |
6 ms |
7764 KB |
Output is correct |
90 |
Correct |
6 ms |
7676 KB |
Output is correct |
91 |
Correct |
7 ms |
7836 KB |
Output is correct |
92 |
Correct |
6 ms |
7764 KB |
Output is correct |
93 |
Correct |
6 ms |
7748 KB |
Output is correct |
94 |
Correct |
4 ms |
7380 KB |
Output is correct |
95 |
Correct |
4 ms |
7444 KB |
Output is correct |
96 |
Correct |
4 ms |
7380 KB |
Output is correct |
97 |
Correct |
6 ms |
7380 KB |
Output is correct |
98 |
Correct |
4 ms |
7380 KB |
Output is correct |
99 |
Correct |
4 ms |
7444 KB |
Output is correct |
100 |
Correct |
4 ms |
7380 KB |
Output is correct |
101 |
Correct |
4 ms |
7440 KB |
Output is correct |
102 |
Correct |
4 ms |
7380 KB |
Output is correct |
103 |
Correct |
4 ms |
7440 KB |
Output is correct |
104 |
Correct |
12 ms |
8940 KB |
Output is correct |
105 |
Correct |
20 ms |
11588 KB |
Output is correct |
106 |
Correct |
6 ms |
7508 KB |
Output is correct |
107 |
Correct |
44 ms |
13680 KB |
Output is correct |
108 |
Correct |
52 ms |
16460 KB |
Output is correct |
109 |
Correct |
6 ms |
7508 KB |
Output is correct |
110 |
Correct |
77 ms |
19276 KB |
Output is correct |
111 |
Correct |
86 ms |
22708 KB |
Output is correct |
112 |
Correct |
5 ms |
7508 KB |
Output is correct |
113 |
Correct |
120 ms |
27940 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1088 ms |
12932 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
7380 KB |
Output is correct |
2 |
Correct |
4 ms |
7380 KB |
Output is correct |
3 |
Correct |
5 ms |
7380 KB |
Output is correct |
4 |
Correct |
6 ms |
7380 KB |
Output is correct |
5 |
Correct |
4 ms |
7380 KB |
Output is correct |
6 |
Correct |
4 ms |
7380 KB |
Output is correct |
7 |
Correct |
4 ms |
7380 KB |
Output is correct |
8 |
Correct |
4 ms |
7476 KB |
Output is correct |
9 |
Correct |
5 ms |
7380 KB |
Output is correct |
10 |
Correct |
5 ms |
7380 KB |
Output is correct |
11 |
Correct |
4 ms |
7380 KB |
Output is correct |
12 |
Correct |
4 ms |
7380 KB |
Output is correct |
13 |
Correct |
4 ms |
7380 KB |
Output is correct |
14 |
Correct |
4 ms |
7380 KB |
Output is correct |
15 |
Correct |
4 ms |
7380 KB |
Output is correct |
16 |
Correct |
4 ms |
7380 KB |
Output is correct |
17 |
Correct |
4 ms |
7380 KB |
Output is correct |
18 |
Correct |
4 ms |
7380 KB |
Output is correct |
19 |
Correct |
5 ms |
7380 KB |
Output is correct |
20 |
Correct |
4 ms |
7380 KB |
Output is correct |
21 |
Correct |
4 ms |
7380 KB |
Output is correct |
22 |
Correct |
6 ms |
7380 KB |
Output is correct |
23 |
Correct |
5 ms |
7380 KB |
Output is correct |
24 |
Correct |
4 ms |
7380 KB |
Output is correct |
25 |
Correct |
4 ms |
7380 KB |
Output is correct |
26 |
Correct |
27 ms |
7528 KB |
Output is correct |
27 |
Correct |
42 ms |
7608 KB |
Output is correct |
28 |
Correct |
60 ms |
7712 KB |
Output is correct |
29 |
Correct |
21 ms |
7552 KB |
Output is correct |
30 |
Correct |
39 ms |
7636 KB |
Output is correct |
31 |
Correct |
62 ms |
7728 KB |
Output is correct |
32 |
Correct |
21 ms |
7508 KB |
Output is correct |
33 |
Correct |
35 ms |
7636 KB |
Output is correct |
34 |
Correct |
54 ms |
7636 KB |
Output is correct |
35 |
Correct |
5 ms |
7464 KB |
Output is correct |
36 |
Correct |
4 ms |
7380 KB |
Output is correct |
37 |
Correct |
4 ms |
7376 KB |
Output is correct |
38 |
Correct |
4 ms |
7380 KB |
Output is correct |
39 |
Correct |
4 ms |
7464 KB |
Output is correct |
40 |
Correct |
6 ms |
7380 KB |
Output is correct |
41 |
Correct |
8 ms |
7472 KB |
Output is correct |
42 |
Correct |
4 ms |
7380 KB |
Output is correct |
43 |
Correct |
4 ms |
7380 KB |
Output is correct |
44 |
Correct |
4 ms |
7380 KB |
Output is correct |
45 |
Correct |
4 ms |
7380 KB |
Output is correct |
46 |
Correct |
4 ms |
7380 KB |
Output is correct |
47 |
Correct |
4 ms |
7380 KB |
Output is correct |
48 |
Correct |
4 ms |
7464 KB |
Output is correct |
49 |
Correct |
4 ms |
7380 KB |
Output is correct |
50 |
Correct |
4 ms |
7380 KB |
Output is correct |
51 |
Correct |
4 ms |
7380 KB |
Output is correct |
52 |
Correct |
4 ms |
7380 KB |
Output is correct |
53 |
Correct |
4 ms |
7380 KB |
Output is correct |
54 |
Correct |
6 ms |
8020 KB |
Output is correct |
55 |
Correct |
6 ms |
8020 KB |
Output is correct |
56 |
Correct |
122 ms |
7640 KB |
Output is correct |
57 |
Correct |
87 ms |
7608 KB |
Output is correct |
58 |
Correct |
6 ms |
7764 KB |
Output is correct |
59 |
Correct |
6 ms |
7764 KB |
Output is correct |
60 |
Correct |
108 ms |
7628 KB |
Output is correct |
61 |
Correct |
106 ms |
7736 KB |
Output is correct |
62 |
Correct |
6 ms |
7764 KB |
Output is correct |
63 |
Correct |
8 ms |
7728 KB |
Output is correct |
64 |
Correct |
62 ms |
7616 KB |
Output is correct |
65 |
Correct |
99 ms |
7656 KB |
Output is correct |
66 |
Correct |
6 ms |
7828 KB |
Output is correct |
67 |
Correct |
6 ms |
7764 KB |
Output is correct |
68 |
Correct |
96 ms |
7652 KB |
Output is correct |
69 |
Correct |
99 ms |
7668 KB |
Output is correct |
70 |
Correct |
101 ms |
7616 KB |
Output is correct |
71 |
Correct |
109 ms |
7624 KB |
Output is correct |
72 |
Correct |
6 ms |
7764 KB |
Output is correct |
73 |
Correct |
6 ms |
7764 KB |
Output is correct |
74 |
Correct |
29 ms |
7712 KB |
Output is correct |
75 |
Correct |
25 ms |
7732 KB |
Output is correct |
76 |
Correct |
6 ms |
7764 KB |
Output is correct |
77 |
Correct |
6 ms |
7736 KB |
Output is correct |
78 |
Correct |
100 ms |
7620 KB |
Output is correct |
79 |
Correct |
101 ms |
7632 KB |
Output is correct |
80 |
Correct |
55 ms |
7588 KB |
Output is correct |
81 |
Correct |
44 ms |
7612 KB |
Output is correct |
82 |
Correct |
44 ms |
7636 KB |
Output is correct |
83 |
Correct |
43 ms |
7636 KB |
Output is correct |
84 |
Correct |
48 ms |
7636 KB |
Output is correct |
85 |
Correct |
47 ms |
7596 KB |
Output is correct |
86 |
Correct |
43 ms |
7664 KB |
Output is correct |
87 |
Correct |
21 ms |
7764 KB |
Output is correct |
88 |
Correct |
108 ms |
7636 KB |
Output is correct |
89 |
Correct |
110 ms |
7660 KB |
Output is correct |
90 |
Correct |
109 ms |
7628 KB |
Output is correct |
91 |
Correct |
114 ms |
7636 KB |
Output is correct |
92 |
Correct |
8 ms |
7708 KB |
Output is correct |
93 |
Correct |
7 ms |
7636 KB |
Output is correct |
94 |
Correct |
7 ms |
7680 KB |
Output is correct |
95 |
Correct |
6 ms |
7636 KB |
Output is correct |
96 |
Correct |
6 ms |
7636 KB |
Output is correct |
97 |
Correct |
6 ms |
7636 KB |
Output is correct |
98 |
Correct |
6 ms |
7664 KB |
Output is correct |
99 |
Correct |
6 ms |
7764 KB |
Output is correct |
100 |
Correct |
6 ms |
7764 KB |
Output is correct |
101 |
Correct |
6 ms |
7636 KB |
Output is correct |
102 |
Correct |
4 ms |
7380 KB |
Output is correct |
103 |
Correct |
4 ms |
7380 KB |
Output is correct |
104 |
Correct |
4 ms |
7380 KB |
Output is correct |
105 |
Correct |
5 ms |
7380 KB |
Output is correct |
106 |
Correct |
4 ms |
7380 KB |
Output is correct |
107 |
Correct |
4 ms |
7380 KB |
Output is correct |
108 |
Correct |
5 ms |
7380 KB |
Output is correct |
109 |
Correct |
5 ms |
7380 KB |
Output is correct |
110 |
Correct |
4 ms |
7416 KB |
Output is correct |
111 |
Correct |
4 ms |
7380 KB |
Output is correct |
112 |
Correct |
6 ms |
7508 KB |
Output is correct |
113 |
Correct |
4 ms |
7508 KB |
Output is correct |
114 |
Correct |
4 ms |
7508 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
78 ms |
24428 KB |
Output is correct |
2 |
Correct |
84 ms |
25796 KB |
Output is correct |
3 |
Correct |
55 ms |
19380 KB |
Output is correct |
4 |
Correct |
13 ms |
10076 KB |
Output is correct |
5 |
Correct |
12 ms |
8924 KB |
Output is correct |
6 |
Correct |
21 ms |
11556 KB |
Output is correct |
7 |
Correct |
4 ms |
7508 KB |
Output is correct |
8 |
Correct |
40 ms |
13732 KB |
Output is correct |
9 |
Correct |
51 ms |
16488 KB |
Output is correct |
10 |
Correct |
5 ms |
7508 KB |
Output is correct |
11 |
Correct |
80 ms |
19252 KB |
Output is correct |
12 |
Correct |
101 ms |
22684 KB |
Output is correct |
13 |
Correct |
5 ms |
7508 KB |
Output is correct |
14 |
Correct |
4 ms |
7380 KB |
Output is correct |
15 |
Correct |
4 ms |
7380 KB |
Output is correct |
16 |
Correct |
5 ms |
7380 KB |
Output is correct |
17 |
Correct |
6 ms |
7380 KB |
Output is correct |
18 |
Correct |
4 ms |
7380 KB |
Output is correct |
19 |
Correct |
4 ms |
7380 KB |
Output is correct |
20 |
Correct |
4 ms |
7380 KB |
Output is correct |
21 |
Correct |
4 ms |
7476 KB |
Output is correct |
22 |
Correct |
5 ms |
7380 KB |
Output is correct |
23 |
Correct |
5 ms |
7380 KB |
Output is correct |
24 |
Correct |
4 ms |
7380 KB |
Output is correct |
25 |
Correct |
4 ms |
7380 KB |
Output is correct |
26 |
Correct |
4 ms |
7380 KB |
Output is correct |
27 |
Correct |
4 ms |
7380 KB |
Output is correct |
28 |
Correct |
4 ms |
7380 KB |
Output is correct |
29 |
Correct |
4 ms |
7380 KB |
Output is correct |
30 |
Correct |
4 ms |
7380 KB |
Output is correct |
31 |
Correct |
4 ms |
7380 KB |
Output is correct |
32 |
Correct |
5 ms |
7380 KB |
Output is correct |
33 |
Correct |
4 ms |
7380 KB |
Output is correct |
34 |
Correct |
4 ms |
7380 KB |
Output is correct |
35 |
Correct |
6 ms |
7380 KB |
Output is correct |
36 |
Correct |
5 ms |
7380 KB |
Output is correct |
37 |
Correct |
4 ms |
7380 KB |
Output is correct |
38 |
Correct |
4 ms |
7380 KB |
Output is correct |
39 |
Correct |
85 ms |
25736 KB |
Output is correct |
40 |
Correct |
78 ms |
25636 KB |
Output is correct |
41 |
Correct |
54 ms |
19376 KB |
Output is correct |
42 |
Correct |
13 ms |
10072 KB |
Output is correct |
43 |
Correct |
7 ms |
7380 KB |
Output is correct |
44 |
Correct |
5 ms |
7380 KB |
Output is correct |
45 |
Correct |
6 ms |
7380 KB |
Output is correct |
46 |
Correct |
6 ms |
7372 KB |
Output is correct |
47 |
Correct |
4 ms |
7440 KB |
Output is correct |
48 |
Correct |
4 ms |
7380 KB |
Output is correct |
49 |
Correct |
5 ms |
7440 KB |
Output is correct |
50 |
Correct |
4 ms |
7380 KB |
Output is correct |
51 |
Correct |
4 ms |
7432 KB |
Output is correct |
52 |
Correct |
4 ms |
7380 KB |
Output is correct |
53 |
Correct |
4 ms |
7444 KB |
Output is correct |
54 |
Correct |
4 ms |
7444 KB |
Output is correct |
55 |
Correct |
5 ms |
7440 KB |
Output is correct |
56 |
Correct |
4 ms |
7380 KB |
Output is correct |
57 |
Correct |
119 ms |
20376 KB |
Output is correct |
58 |
Correct |
142 ms |
18844 KB |
Output is correct |
59 |
Correct |
117 ms |
20204 KB |
Output is correct |
60 |
Correct |
111 ms |
18800 KB |
Output is correct |
61 |
Correct |
108 ms |
20348 KB |
Output is correct |
62 |
Correct |
115 ms |
19384 KB |
Output is correct |
63 |
Correct |
105 ms |
20524 KB |
Output is correct |
64 |
Correct |
103 ms |
20440 KB |
Output is correct |
65 |
Correct |
119 ms |
20756 KB |
Output is correct |
66 |
Correct |
108 ms |
20804 KB |
Output is correct |
67 |
Correct |
106 ms |
20288 KB |
Output is correct |
68 |
Correct |
109 ms |
20168 KB |
Output is correct |
69 |
Correct |
134 ms |
19356 KB |
Output is correct |
70 |
Correct |
107 ms |
19304 KB |
Output is correct |
71 |
Correct |
4 ms |
7380 KB |
Output is correct |
72 |
Correct |
6 ms |
7764 KB |
Output is correct |
73 |
Correct |
6 ms |
7764 KB |
Output is correct |
74 |
Correct |
6 ms |
7828 KB |
Output is correct |
75 |
Correct |
6 ms |
7712 KB |
Output is correct |
76 |
Correct |
8 ms |
7764 KB |
Output is correct |
77 |
Correct |
7 ms |
7772 KB |
Output is correct |
78 |
Correct |
7 ms |
7712 KB |
Output is correct |
79 |
Correct |
6 ms |
7764 KB |
Output is correct |
80 |
Correct |
145 ms |
19308 KB |
Output is correct |
81 |
Correct |
115 ms |
19420 KB |
Output is correct |
82 |
Correct |
148 ms |
20248 KB |
Output is correct |
83 |
Correct |
127 ms |
20692 KB |
Output is correct |
84 |
Correct |
6 ms |
7764 KB |
Output is correct |
85 |
Correct |
5 ms |
7708 KB |
Output is correct |
86 |
Correct |
6 ms |
7712 KB |
Output is correct |
87 |
Correct |
6 ms |
7764 KB |
Output is correct |
88 |
Correct |
6 ms |
7764 KB |
Output is correct |
89 |
Correct |
6 ms |
7764 KB |
Output is correct |
90 |
Correct |
6 ms |
7676 KB |
Output is correct |
91 |
Correct |
7 ms |
7836 KB |
Output is correct |
92 |
Correct |
6 ms |
7764 KB |
Output is correct |
93 |
Correct |
6 ms |
7748 KB |
Output is correct |
94 |
Correct |
4 ms |
7380 KB |
Output is correct |
95 |
Correct |
4 ms |
7444 KB |
Output is correct |
96 |
Correct |
4 ms |
7380 KB |
Output is correct |
97 |
Correct |
6 ms |
7380 KB |
Output is correct |
98 |
Correct |
4 ms |
7380 KB |
Output is correct |
99 |
Correct |
4 ms |
7444 KB |
Output is correct |
100 |
Correct |
4 ms |
7380 KB |
Output is correct |
101 |
Correct |
4 ms |
7440 KB |
Output is correct |
102 |
Correct |
4 ms |
7380 KB |
Output is correct |
103 |
Correct |
4 ms |
7440 KB |
Output is correct |
104 |
Correct |
12 ms |
8940 KB |
Output is correct |
105 |
Correct |
20 ms |
11588 KB |
Output is correct |
106 |
Correct |
6 ms |
7508 KB |
Output is correct |
107 |
Correct |
44 ms |
13680 KB |
Output is correct |
108 |
Correct |
52 ms |
16460 KB |
Output is correct |
109 |
Correct |
6 ms |
7508 KB |
Output is correct |
110 |
Correct |
77 ms |
19276 KB |
Output is correct |
111 |
Correct |
86 ms |
22708 KB |
Output is correct |
112 |
Correct |
5 ms |
7508 KB |
Output is correct |
113 |
Correct |
120 ms |
27940 KB |
Output is correct |
114 |
Execution timed out |
1088 ms |
12932 KB |
Time limit exceeded |
115 |
Halted |
0 ms |
0 KB |
- |