#include "bits/stdc++.h"
using namespace std;
#define ar array
#define int long long
signed main(){
ios::sync_with_stdio(0); cin.tie(0);
int n; cin>>n;
vector<ar<int, 2>> p(n);
for(int i=0;i<n;i++) cin>>p[i][0]>>p[i][1];
map<int, deque<int>> m1, m2, x, y;
for(int i=0;i<n;i++){
m1[p[i][0] + p[i][1]].push_back(i);
m2[p[i][0] - p[i][1]].push_back(i);
x[p[i][0]].push_back(i);
y[p[i][1]].push_back(i);
}
for(auto& [x, v] : m1){
sort(v.begin(), v.end(), [&](int i, int j) { return (p[i][0] < p[j][0]); });
} for(auto& [x, v] : m2){
sort(v.begin(), v.end(), [&](int i, int j) { return (p[i][0] < p[j][0]); });
} for(auto& [x, v] : x){
sort(v.begin(), v.end(), [&](int i, int j) { return (p[i][0] < p[j][0]); });
} for(auto& [x, v] : y){
sort(v.begin(), v.end(), [&](int i, int j) { return (p[i][1] < p[j][1]); });
}
int ans = 0;
for(int t=0;t<4;t++){
auto t1 = m1, t2 = m2;
vector<int> T(n, 1e18); T[0] = 0;
priority_queue<ar<int, 3>, vector<ar<int, 3>>, greater<ar<int, 3>>> qq;
qq.push({0, t, 0}); int res = 0;
while(!qq.empty()){
auto u = qq.top(); qq.pop();
int i = u[2], t = u[1];
//~ if(u[0] > T[i]) continue;
{
auto& v = m1[p[i][0] + p[i][1]];
auto tmp = v;
while(!v.empty()){
if(t == 0){
int x = v.front();
if((p[i][0] - p[x][0]) * 2 < T[i]) break;
v.pop_front();
if(T[x] > abs(p[i][0] - p[x][0]) * 2){
T[x] = abs(p[i][0] - p[x][0]) * 2;
qq.push({T[x], 1, x});
}
} if(t == 1){
int x = v.back();
if((p[x][0] - p[i][0]) * 2 < T[i]) break;
v.pop_back();
if(T[x] > abs(p[i][0] - p[x][0]) * 2){
T[x] = abs(p[i][0] - p[x][0]) * 2;
qq.push({T[x], 0, x});
}
} if(t == 2){
int x = v.back();
if((p[x][0] - p[i][0]) * 2 < T[i]) break;
v.pop_back();
if(T[x] > 2 * abs(p[i][0] - p[x][0])){
T[x] = 2 * abs(p[i][0] - p[x][0]);
qq.push({T[x], 3, x});
}
} if(t == 3){
int x = v.front();
if((p[i][0] - p[x][0]) * 2 < T[i]) break;
v.pop_front();
if(T[x] > 2 * abs(p[i][0] - p[x][0])){
T[x] = 2 * abs(p[i][0] - p[x][0]);
qq.push({T[x], 2, x});
}
}
} swap(tmp, v);
}
{
auto& v = m2[p[i][0] - p[i][1]];
auto tmp = v;
while(!v.empty()){
if(t == 0){
int x = v.back();
if(2 * (p[x][0] - p[i][0]) < T[i]) break;
v.pop_back();
if(T[x] > 2 * abs(p[i][0] - p[x][0])){
T[x] = 2 * abs(p[i][0] - p[x][0]);
qq.push({T[x], 3, x});
}
} if(t == 1){
int x = v.back();
if(2 * (p[x][0] - p[i][0]) < T[i]) break;
v.pop_back();
if(T[x] > 2 * abs(p[i][0] - p[x][0])){
T[x] = 2 * abs(p[i][0] - p[x][0]);
qq.push({T[x], 2, x});
}
} if(t == 2){
int x = v.front();
if(2 * (p[i][0] - p[x][0]) < T[i]) break;
v.pop_front();
if(T[x] > 2 * abs(p[i][0] - p[x][0])){
T[x] = 2 * abs(p[i][0] - p[x][0]);
qq.push({T[x], 1, x});
}
} if(t == 3){
int x = v.front();
if(2 * (p[i][0] - p[x][0]) < T[i]) break;
v.pop_front();
if(T[x] > 2 * abs(p[i][0] - p[x][0])){
T[x] = 2 * abs(p[i][0] - p[x][0]);
qq.push({T[x], 0, x});
}
}
}
swap(tmp, v);
}
if(t&1){
auto& v = y[p[i][1]];
for(auto x : v){
if(t == 1 && T[i] <= p[x][0] - p[i][0] && T[x] > p[x][0] - p[i][0]){
T[x] = p[x][0] - p[i][0];
qq.push({T[x], 3, x});
} if(t == 3 && T[i] <= p[i][0] - p[x][0] && T[x] > p[i][0] - p[x][0]){
T[x] = p[i][0] - p[x][0];
qq.push({T[x], 1, x});
}
}
} else {
auto& v = x[p[i][0]];
for(auto x : v){
if(t == 0 && T[i] <= p[x][1] - p[i][1] && T[x] > p[x][1] - p[i][1]){
T[x] = p[x][1] - p[i][1];
qq.push({T[x], 2, x});
} if(t == 2 && T[i] <= p[i][1] - p[x][1] && T[x] > p[i][1] - p[x][1]){
T[x] = p[i][1] - p[x][1];
qq.push({T[x], 0, x});
}
}
}
}
for(int i=0;i<n;i++){
res += (T[i] < 1e18);
}
ans = max(ans, res);
m1 = t1, m2 = t2;
}
cout<<ans<<"\n";
}
Compilation message
fever.cpp: In function 'int main()':
fever.cpp:21:12: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
21 | for(auto& [x, v] : m1){
| ^
fever.cpp:23:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
23 | } for(auto& [x, v] : m2){
| ^
fever.cpp:25:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
25 | } for(auto& [x, v] : x){
| ^
fever.cpp:27:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
27 | } for(auto& [x, v] : y){
| ^
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
0 ms |
204 KB |
Output is correct |
9 |
Correct |
0 ms |
332 KB |
Output is correct |
10 |
Correct |
0 ms |
204 KB |
Output is correct |
11 |
Correct |
1 ms |
204 KB |
Output is correct |
12 |
Correct |
1 ms |
332 KB |
Output is correct |
13 |
Correct |
1 ms |
332 KB |
Output is correct |
14 |
Correct |
0 ms |
332 KB |
Output is correct |
15 |
Correct |
1 ms |
332 KB |
Output is correct |
16 |
Correct |
0 ms |
204 KB |
Output is correct |
17 |
Correct |
1 ms |
204 KB |
Output is correct |
18 |
Correct |
1 ms |
332 KB |
Output is correct |
19 |
Correct |
0 ms |
320 KB |
Output is correct |
20 |
Correct |
0 ms |
332 KB |
Output is correct |
21 |
Correct |
0 ms |
332 KB |
Output is correct |
22 |
Correct |
1 ms |
332 KB |
Output is correct |
23 |
Correct |
0 ms |
332 KB |
Output is correct |
24 |
Correct |
0 ms |
332 KB |
Output is correct |
25 |
Correct |
0 ms |
204 KB |
Output is correct |
26 |
Correct |
0 ms |
332 KB |
Output is correct |
27 |
Correct |
0 ms |
332 KB |
Output is correct |
28 |
Correct |
0 ms |
332 KB |
Output is correct |
29 |
Correct |
1 ms |
332 KB |
Output is correct |
30 |
Correct |
0 ms |
204 KB |
Output is correct |
31 |
Correct |
1 ms |
204 KB |
Output is correct |
32 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
0 ms |
204 KB |
Output is correct |
9 |
Correct |
0 ms |
332 KB |
Output is correct |
10 |
Correct |
0 ms |
204 KB |
Output is correct |
11 |
Correct |
1 ms |
204 KB |
Output is correct |
12 |
Correct |
1 ms |
332 KB |
Output is correct |
13 |
Correct |
1 ms |
332 KB |
Output is correct |
14 |
Correct |
0 ms |
332 KB |
Output is correct |
15 |
Correct |
1 ms |
332 KB |
Output is correct |
16 |
Correct |
0 ms |
204 KB |
Output is correct |
17 |
Correct |
1 ms |
204 KB |
Output is correct |
18 |
Correct |
1 ms |
332 KB |
Output is correct |
19 |
Correct |
0 ms |
320 KB |
Output is correct |
20 |
Correct |
0 ms |
332 KB |
Output is correct |
21 |
Correct |
0 ms |
332 KB |
Output is correct |
22 |
Correct |
1 ms |
332 KB |
Output is correct |
23 |
Correct |
0 ms |
332 KB |
Output is correct |
24 |
Correct |
0 ms |
332 KB |
Output is correct |
25 |
Correct |
0 ms |
204 KB |
Output is correct |
26 |
Correct |
0 ms |
332 KB |
Output is correct |
27 |
Correct |
0 ms |
332 KB |
Output is correct |
28 |
Correct |
0 ms |
332 KB |
Output is correct |
29 |
Correct |
1 ms |
332 KB |
Output is correct |
30 |
Correct |
0 ms |
204 KB |
Output is correct |
31 |
Correct |
1 ms |
204 KB |
Output is correct |
32 |
Correct |
1 ms |
204 KB |
Output is correct |
33 |
Correct |
0 ms |
312 KB |
Output is correct |
34 |
Correct |
1 ms |
332 KB |
Output is correct |
35 |
Correct |
1 ms |
332 KB |
Output is correct |
36 |
Correct |
1 ms |
332 KB |
Output is correct |
37 |
Correct |
1 ms |
332 KB |
Output is correct |
38 |
Correct |
1 ms |
332 KB |
Output is correct |
39 |
Correct |
1 ms |
308 KB |
Output is correct |
40 |
Correct |
0 ms |
332 KB |
Output is correct |
41 |
Correct |
1 ms |
332 KB |
Output is correct |
42 |
Correct |
0 ms |
332 KB |
Output is correct |
43 |
Correct |
0 ms |
332 KB |
Output is correct |
44 |
Correct |
1 ms |
332 KB |
Output is correct |
45 |
Correct |
1 ms |
308 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
588 KB |
Output is correct |
2 |
Correct |
1 ms |
588 KB |
Output is correct |
3 |
Correct |
1 ms |
588 KB |
Output is correct |
4 |
Correct |
1 ms |
588 KB |
Output is correct |
5 |
Correct |
1 ms |
716 KB |
Output is correct |
6 |
Correct |
1 ms |
588 KB |
Output is correct |
7 |
Correct |
1 ms |
588 KB |
Output is correct |
8 |
Correct |
1 ms |
588 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
0 ms |
204 KB |
Output is correct |
9 |
Correct |
0 ms |
332 KB |
Output is correct |
10 |
Correct |
0 ms |
204 KB |
Output is correct |
11 |
Correct |
1 ms |
204 KB |
Output is correct |
12 |
Correct |
1 ms |
332 KB |
Output is correct |
13 |
Correct |
1 ms |
332 KB |
Output is correct |
14 |
Correct |
0 ms |
332 KB |
Output is correct |
15 |
Correct |
1 ms |
332 KB |
Output is correct |
16 |
Correct |
0 ms |
204 KB |
Output is correct |
17 |
Correct |
1 ms |
204 KB |
Output is correct |
18 |
Correct |
1 ms |
332 KB |
Output is correct |
19 |
Correct |
0 ms |
320 KB |
Output is correct |
20 |
Correct |
0 ms |
332 KB |
Output is correct |
21 |
Correct |
0 ms |
332 KB |
Output is correct |
22 |
Correct |
1 ms |
332 KB |
Output is correct |
23 |
Correct |
0 ms |
332 KB |
Output is correct |
24 |
Correct |
0 ms |
332 KB |
Output is correct |
25 |
Correct |
0 ms |
204 KB |
Output is correct |
26 |
Correct |
0 ms |
332 KB |
Output is correct |
27 |
Correct |
0 ms |
332 KB |
Output is correct |
28 |
Correct |
0 ms |
332 KB |
Output is correct |
29 |
Correct |
1 ms |
332 KB |
Output is correct |
30 |
Correct |
0 ms |
204 KB |
Output is correct |
31 |
Correct |
1 ms |
204 KB |
Output is correct |
32 |
Correct |
1 ms |
204 KB |
Output is correct |
33 |
Correct |
0 ms |
312 KB |
Output is correct |
34 |
Correct |
1 ms |
332 KB |
Output is correct |
35 |
Correct |
1 ms |
332 KB |
Output is correct |
36 |
Correct |
1 ms |
332 KB |
Output is correct |
37 |
Correct |
1 ms |
332 KB |
Output is correct |
38 |
Correct |
1 ms |
332 KB |
Output is correct |
39 |
Correct |
1 ms |
308 KB |
Output is correct |
40 |
Correct |
0 ms |
332 KB |
Output is correct |
41 |
Correct |
1 ms |
332 KB |
Output is correct |
42 |
Correct |
0 ms |
332 KB |
Output is correct |
43 |
Correct |
0 ms |
332 KB |
Output is correct |
44 |
Correct |
1 ms |
332 KB |
Output is correct |
45 |
Correct |
1 ms |
308 KB |
Output is correct |
46 |
Correct |
1 ms |
588 KB |
Output is correct |
47 |
Correct |
1 ms |
588 KB |
Output is correct |
48 |
Correct |
1 ms |
588 KB |
Output is correct |
49 |
Correct |
1 ms |
588 KB |
Output is correct |
50 |
Correct |
1 ms |
716 KB |
Output is correct |
51 |
Correct |
1 ms |
588 KB |
Output is correct |
52 |
Correct |
1 ms |
588 KB |
Output is correct |
53 |
Correct |
1 ms |
588 KB |
Output is correct |
54 |
Correct |
1 ms |
588 KB |
Output is correct |
55 |
Correct |
1 ms |
588 KB |
Output is correct |
56 |
Correct |
1 ms |
696 KB |
Output is correct |
57 |
Correct |
1 ms |
696 KB |
Output is correct |
58 |
Correct |
1 ms |
588 KB |
Output is correct |
59 |
Correct |
1 ms |
588 KB |
Output is correct |
60 |
Correct |
1 ms |
588 KB |
Output is correct |
61 |
Correct |
1 ms |
588 KB |
Output is correct |
62 |
Correct |
1 ms |
588 KB |
Output is correct |
63 |
Correct |
1 ms |
588 KB |
Output is correct |
64 |
Correct |
1 ms |
588 KB |
Output is correct |
65 |
Correct |
1 ms |
588 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
0 ms |
204 KB |
Output is correct |
9 |
Correct |
0 ms |
332 KB |
Output is correct |
10 |
Correct |
0 ms |
204 KB |
Output is correct |
11 |
Correct |
1 ms |
204 KB |
Output is correct |
12 |
Correct |
1 ms |
332 KB |
Output is correct |
13 |
Correct |
1 ms |
332 KB |
Output is correct |
14 |
Correct |
0 ms |
332 KB |
Output is correct |
15 |
Correct |
1 ms |
332 KB |
Output is correct |
16 |
Correct |
0 ms |
204 KB |
Output is correct |
17 |
Correct |
1 ms |
204 KB |
Output is correct |
18 |
Correct |
1 ms |
332 KB |
Output is correct |
19 |
Correct |
0 ms |
320 KB |
Output is correct |
20 |
Correct |
0 ms |
332 KB |
Output is correct |
21 |
Correct |
0 ms |
332 KB |
Output is correct |
22 |
Correct |
1 ms |
332 KB |
Output is correct |
23 |
Correct |
0 ms |
332 KB |
Output is correct |
24 |
Correct |
0 ms |
332 KB |
Output is correct |
25 |
Correct |
0 ms |
204 KB |
Output is correct |
26 |
Correct |
0 ms |
332 KB |
Output is correct |
27 |
Correct |
0 ms |
332 KB |
Output is correct |
28 |
Correct |
0 ms |
332 KB |
Output is correct |
29 |
Correct |
1 ms |
332 KB |
Output is correct |
30 |
Correct |
0 ms |
204 KB |
Output is correct |
31 |
Correct |
1 ms |
204 KB |
Output is correct |
32 |
Correct |
1 ms |
204 KB |
Output is correct |
33 |
Correct |
0 ms |
312 KB |
Output is correct |
34 |
Correct |
1 ms |
332 KB |
Output is correct |
35 |
Correct |
1 ms |
332 KB |
Output is correct |
36 |
Correct |
1 ms |
332 KB |
Output is correct |
37 |
Correct |
1 ms |
332 KB |
Output is correct |
38 |
Correct |
1 ms |
332 KB |
Output is correct |
39 |
Correct |
1 ms |
308 KB |
Output is correct |
40 |
Correct |
0 ms |
332 KB |
Output is correct |
41 |
Correct |
1 ms |
332 KB |
Output is correct |
42 |
Correct |
0 ms |
332 KB |
Output is correct |
43 |
Correct |
0 ms |
332 KB |
Output is correct |
44 |
Correct |
1 ms |
332 KB |
Output is correct |
45 |
Correct |
1 ms |
308 KB |
Output is correct |
46 |
Correct |
1 ms |
588 KB |
Output is correct |
47 |
Correct |
1 ms |
588 KB |
Output is correct |
48 |
Correct |
1 ms |
588 KB |
Output is correct |
49 |
Correct |
1 ms |
588 KB |
Output is correct |
50 |
Correct |
1 ms |
716 KB |
Output is correct |
51 |
Correct |
1 ms |
588 KB |
Output is correct |
52 |
Correct |
1 ms |
588 KB |
Output is correct |
53 |
Correct |
1 ms |
588 KB |
Output is correct |
54 |
Correct |
1 ms |
588 KB |
Output is correct |
55 |
Correct |
1 ms |
588 KB |
Output is correct |
56 |
Correct |
1 ms |
696 KB |
Output is correct |
57 |
Correct |
1 ms |
696 KB |
Output is correct |
58 |
Correct |
1 ms |
588 KB |
Output is correct |
59 |
Correct |
1 ms |
588 KB |
Output is correct |
60 |
Correct |
1 ms |
588 KB |
Output is correct |
61 |
Correct |
1 ms |
588 KB |
Output is correct |
62 |
Correct |
1 ms |
588 KB |
Output is correct |
63 |
Correct |
1 ms |
588 KB |
Output is correct |
64 |
Correct |
1 ms |
588 KB |
Output is correct |
65 |
Correct |
1 ms |
588 KB |
Output is correct |
66 |
Correct |
18 ms |
11020 KB |
Output is correct |
67 |
Correct |
19 ms |
11084 KB |
Output is correct |
68 |
Correct |
26 ms |
13260 KB |
Output is correct |
69 |
Correct |
18 ms |
1232 KB |
Output is correct |
70 |
Correct |
8 ms |
2380 KB |
Output is correct |
71 |
Correct |
6 ms |
3396 KB |
Output is correct |
72 |
Correct |
15 ms |
9572 KB |
Output is correct |
73 |
Correct |
22 ms |
13408 KB |
Output is correct |
74 |
Correct |
33 ms |
9296 KB |
Output is correct |
75 |
Correct |
72 ms |
9312 KB |
Output is correct |
76 |
Correct |
23 ms |
11660 KB |
Output is correct |
77 |
Correct |
18 ms |
9340 KB |
Output is correct |
78 |
Correct |
22 ms |
11572 KB |
Output is correct |
79 |
Correct |
22 ms |
11344 KB |
Output is correct |
80 |
Correct |
23 ms |
13004 KB |
Output is correct |
81 |
Correct |
19 ms |
11164 KB |
Output is correct |
82 |
Correct |
55 ms |
11340 KB |
Output is correct |
83 |
Correct |
76 ms |
11420 KB |
Output is correct |
84 |
Correct |
14 ms |
5824 KB |
Output is correct |
85 |
Correct |
3 ms |
1356 KB |
Output is correct |
86 |
Correct |
3 ms |
844 KB |
Output is correct |
87 |
Correct |
8 ms |
3020 KB |
Output is correct |
88 |
Correct |
40 ms |
9292 KB |
Output is correct |
89 |
Correct |
17 ms |
9084 KB |
Output is correct |
90 |
Correct |
16 ms |
8872 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
0 ms |
204 KB |
Output is correct |
9 |
Correct |
0 ms |
332 KB |
Output is correct |
10 |
Correct |
0 ms |
204 KB |
Output is correct |
11 |
Correct |
1 ms |
204 KB |
Output is correct |
12 |
Correct |
1 ms |
332 KB |
Output is correct |
13 |
Correct |
1 ms |
332 KB |
Output is correct |
14 |
Correct |
0 ms |
332 KB |
Output is correct |
15 |
Correct |
1 ms |
332 KB |
Output is correct |
16 |
Correct |
0 ms |
204 KB |
Output is correct |
17 |
Correct |
1 ms |
204 KB |
Output is correct |
18 |
Correct |
1 ms |
332 KB |
Output is correct |
19 |
Correct |
0 ms |
320 KB |
Output is correct |
20 |
Correct |
0 ms |
332 KB |
Output is correct |
21 |
Correct |
0 ms |
332 KB |
Output is correct |
22 |
Correct |
1 ms |
332 KB |
Output is correct |
23 |
Correct |
0 ms |
332 KB |
Output is correct |
24 |
Correct |
0 ms |
332 KB |
Output is correct |
25 |
Correct |
0 ms |
204 KB |
Output is correct |
26 |
Correct |
0 ms |
332 KB |
Output is correct |
27 |
Correct |
0 ms |
332 KB |
Output is correct |
28 |
Correct |
0 ms |
332 KB |
Output is correct |
29 |
Correct |
1 ms |
332 KB |
Output is correct |
30 |
Correct |
0 ms |
204 KB |
Output is correct |
31 |
Correct |
1 ms |
204 KB |
Output is correct |
32 |
Correct |
1 ms |
204 KB |
Output is correct |
33 |
Correct |
0 ms |
312 KB |
Output is correct |
34 |
Correct |
1 ms |
332 KB |
Output is correct |
35 |
Correct |
1 ms |
332 KB |
Output is correct |
36 |
Correct |
1 ms |
332 KB |
Output is correct |
37 |
Correct |
1 ms |
332 KB |
Output is correct |
38 |
Correct |
1 ms |
332 KB |
Output is correct |
39 |
Correct |
1 ms |
308 KB |
Output is correct |
40 |
Correct |
0 ms |
332 KB |
Output is correct |
41 |
Correct |
1 ms |
332 KB |
Output is correct |
42 |
Correct |
0 ms |
332 KB |
Output is correct |
43 |
Correct |
0 ms |
332 KB |
Output is correct |
44 |
Correct |
1 ms |
332 KB |
Output is correct |
45 |
Correct |
1 ms |
308 KB |
Output is correct |
46 |
Correct |
1 ms |
588 KB |
Output is correct |
47 |
Correct |
1 ms |
588 KB |
Output is correct |
48 |
Correct |
1 ms |
588 KB |
Output is correct |
49 |
Correct |
1 ms |
588 KB |
Output is correct |
50 |
Correct |
1 ms |
716 KB |
Output is correct |
51 |
Correct |
1 ms |
588 KB |
Output is correct |
52 |
Correct |
1 ms |
588 KB |
Output is correct |
53 |
Correct |
1 ms |
588 KB |
Output is correct |
54 |
Correct |
1 ms |
588 KB |
Output is correct |
55 |
Correct |
1 ms |
588 KB |
Output is correct |
56 |
Correct |
1 ms |
696 KB |
Output is correct |
57 |
Correct |
1 ms |
696 KB |
Output is correct |
58 |
Correct |
1 ms |
588 KB |
Output is correct |
59 |
Correct |
1 ms |
588 KB |
Output is correct |
60 |
Correct |
1 ms |
588 KB |
Output is correct |
61 |
Correct |
1 ms |
588 KB |
Output is correct |
62 |
Correct |
1 ms |
588 KB |
Output is correct |
63 |
Correct |
1 ms |
588 KB |
Output is correct |
64 |
Correct |
1 ms |
588 KB |
Output is correct |
65 |
Correct |
1 ms |
588 KB |
Output is correct |
66 |
Correct |
1079 ms |
287328 KB |
Output is correct |
67 |
Correct |
1178 ms |
358772 KB |
Output is correct |
68 |
Correct |
1593 ms |
434816 KB |
Output is correct |
69 |
Execution timed out |
5098 ms |
296380 KB |
Time limit exceeded |
70 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
0 ms |
204 KB |
Output is correct |
9 |
Correct |
0 ms |
332 KB |
Output is correct |
10 |
Correct |
0 ms |
204 KB |
Output is correct |
11 |
Correct |
1 ms |
204 KB |
Output is correct |
12 |
Correct |
1 ms |
332 KB |
Output is correct |
13 |
Correct |
1 ms |
332 KB |
Output is correct |
14 |
Correct |
0 ms |
332 KB |
Output is correct |
15 |
Correct |
1 ms |
332 KB |
Output is correct |
16 |
Correct |
0 ms |
204 KB |
Output is correct |
17 |
Correct |
1 ms |
204 KB |
Output is correct |
18 |
Correct |
1 ms |
332 KB |
Output is correct |
19 |
Correct |
0 ms |
320 KB |
Output is correct |
20 |
Correct |
0 ms |
332 KB |
Output is correct |
21 |
Correct |
0 ms |
332 KB |
Output is correct |
22 |
Correct |
1 ms |
332 KB |
Output is correct |
23 |
Correct |
0 ms |
332 KB |
Output is correct |
24 |
Correct |
0 ms |
332 KB |
Output is correct |
25 |
Correct |
0 ms |
204 KB |
Output is correct |
26 |
Correct |
0 ms |
332 KB |
Output is correct |
27 |
Correct |
0 ms |
332 KB |
Output is correct |
28 |
Correct |
0 ms |
332 KB |
Output is correct |
29 |
Correct |
1 ms |
332 KB |
Output is correct |
30 |
Correct |
0 ms |
204 KB |
Output is correct |
31 |
Correct |
1 ms |
204 KB |
Output is correct |
32 |
Correct |
1 ms |
204 KB |
Output is correct |
33 |
Correct |
0 ms |
312 KB |
Output is correct |
34 |
Correct |
1 ms |
332 KB |
Output is correct |
35 |
Correct |
1 ms |
332 KB |
Output is correct |
36 |
Correct |
1 ms |
332 KB |
Output is correct |
37 |
Correct |
1 ms |
332 KB |
Output is correct |
38 |
Correct |
1 ms |
332 KB |
Output is correct |
39 |
Correct |
1 ms |
308 KB |
Output is correct |
40 |
Correct |
0 ms |
332 KB |
Output is correct |
41 |
Correct |
1 ms |
332 KB |
Output is correct |
42 |
Correct |
0 ms |
332 KB |
Output is correct |
43 |
Correct |
0 ms |
332 KB |
Output is correct |
44 |
Correct |
1 ms |
332 KB |
Output is correct |
45 |
Correct |
1 ms |
308 KB |
Output is correct |
46 |
Correct |
1 ms |
588 KB |
Output is correct |
47 |
Correct |
1 ms |
588 KB |
Output is correct |
48 |
Correct |
1 ms |
588 KB |
Output is correct |
49 |
Correct |
1 ms |
588 KB |
Output is correct |
50 |
Correct |
1 ms |
716 KB |
Output is correct |
51 |
Correct |
1 ms |
588 KB |
Output is correct |
52 |
Correct |
1 ms |
588 KB |
Output is correct |
53 |
Correct |
1 ms |
588 KB |
Output is correct |
54 |
Correct |
1 ms |
588 KB |
Output is correct |
55 |
Correct |
1 ms |
588 KB |
Output is correct |
56 |
Correct |
1 ms |
696 KB |
Output is correct |
57 |
Correct |
1 ms |
696 KB |
Output is correct |
58 |
Correct |
1 ms |
588 KB |
Output is correct |
59 |
Correct |
1 ms |
588 KB |
Output is correct |
60 |
Correct |
1 ms |
588 KB |
Output is correct |
61 |
Correct |
1 ms |
588 KB |
Output is correct |
62 |
Correct |
1 ms |
588 KB |
Output is correct |
63 |
Correct |
1 ms |
588 KB |
Output is correct |
64 |
Correct |
1 ms |
588 KB |
Output is correct |
65 |
Correct |
1 ms |
588 KB |
Output is correct |
66 |
Correct |
18 ms |
11020 KB |
Output is correct |
67 |
Correct |
19 ms |
11084 KB |
Output is correct |
68 |
Correct |
26 ms |
13260 KB |
Output is correct |
69 |
Correct |
18 ms |
1232 KB |
Output is correct |
70 |
Correct |
8 ms |
2380 KB |
Output is correct |
71 |
Correct |
6 ms |
3396 KB |
Output is correct |
72 |
Correct |
15 ms |
9572 KB |
Output is correct |
73 |
Correct |
22 ms |
13408 KB |
Output is correct |
74 |
Correct |
33 ms |
9296 KB |
Output is correct |
75 |
Correct |
72 ms |
9312 KB |
Output is correct |
76 |
Correct |
23 ms |
11660 KB |
Output is correct |
77 |
Correct |
18 ms |
9340 KB |
Output is correct |
78 |
Correct |
22 ms |
11572 KB |
Output is correct |
79 |
Correct |
22 ms |
11344 KB |
Output is correct |
80 |
Correct |
23 ms |
13004 KB |
Output is correct |
81 |
Correct |
19 ms |
11164 KB |
Output is correct |
82 |
Correct |
55 ms |
11340 KB |
Output is correct |
83 |
Correct |
76 ms |
11420 KB |
Output is correct |
84 |
Correct |
14 ms |
5824 KB |
Output is correct |
85 |
Correct |
3 ms |
1356 KB |
Output is correct |
86 |
Correct |
3 ms |
844 KB |
Output is correct |
87 |
Correct |
8 ms |
3020 KB |
Output is correct |
88 |
Correct |
40 ms |
9292 KB |
Output is correct |
89 |
Correct |
17 ms |
9084 KB |
Output is correct |
90 |
Correct |
16 ms |
8872 KB |
Output is correct |
91 |
Correct |
1079 ms |
287328 KB |
Output is correct |
92 |
Correct |
1178 ms |
358772 KB |
Output is correct |
93 |
Correct |
1593 ms |
434816 KB |
Output is correct |
94 |
Execution timed out |
5098 ms |
296380 KB |
Time limit exceeded |
95 |
Halted |
0 ms |
0 KB |
- |