# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
801901 |
2023-08-02T08:19:58 Z |
이온조(#10130) |
IOI Fever (JOI21_fever) |
C++17 |
|
714 ms |
64400 KB |
#include <bits/stdc++.h>
#define sz(V) ((int)V.size())
using namespace std;
using pii = pair<int, int>;
using tiii = tuple<int, int, int>;
const int INF = 1e9;
int N, X[100009], Y[100009], ans = 1;
void comp(vector<int> &P) {
sort(P.begin(), P.end());
P.resize(unique(P.begin(), P.end()) - P.begin());
}
int get(vector<int> &P, int x) {
return lower_bound(P.begin(), P.end(), x) - P.begin();
}
int f(int p, int q) {
return max(X[p] - X[q], X[q] - X[p]) + max(Y[p] - Y[q], Y[q] - Y[p]);
}
int g(vector<int> &V, int x, int y, int v) {
int l = 0, r = sz(V) - 1, f = -1;
while(l <= r) {
int m = l+r >> 1;
if(v <= X[V[m]]*x + Y[V[m]]*y) r = m-1, f = V[m];
else l = m+1;
}
return f;
}
void solve() {
vector<int> D(N);
for(int i=1; i<N; i++) {
if(X[i] + Y[i] <= 0 && X[i] - Y[i] <= 0) D[i] = 0;
if(X[i] + Y[i] > 0 && X[i] - Y[i] <= 0) D[i] = 1;
if(X[i] + Y[i] > 0 && X[i] - Y[i] > 0) D[i] = 2;
if(X[i] + Y[i] <= 0 && X[i] - Y[i] > 0) D[i] = 3;
}
vector<int> XP(N), YP(N), PP(N), QP(N), LI(N), PI(N), QI(N);
for(int i=0; i<N; i++) {
XP[i] = X[i];
YP[i] = Y[i];
PP[i] = X[i] + Y[i];
QP[i] = X[i] - Y[i];
}
comp(XP); comp(YP); comp(PP); comp(QP);
vector<vector<int>> LV[4], PV[4], QV[4];
vector<vector<tiii>> G[4];
for(int d=0; d<4; d++) {
if(d&1) LV[d].resize(sz(XP));
else LV[d].resize(sz(YP));
PV[d].resize(sz(PP));
QV[d].resize(sz(QP));
G[d].resize(N);
}
for(int i=0; i<N; i++) {
if(D[i]&1) LV[D[i]][LI[i] = get(XP, X[i])].push_back(i);
else LV[D[i]][LI[i] = get(YP, Y[i])].push_back(i);
PV[D[i]][PI[i] = get(PP, X[i] + Y[i])].push_back(i);
QV[D[i]][QI[i] = get(QP, X[i] - Y[i])].push_back(i);
}
for(int d=0, p; d<4; d++) {
for(auto& jt: LV[d]) {
sort(jt.begin(), jt.end(), [&](int p, int q) {
if(d == 0 || d == 3) return X[p] + Y[p] > X[q] + Y[q];
return X[p] + Y[p] < X[q] + Y[q];
});
p = -1;
for(auto& it: jt) {
if(p != -1) G[1][p].push_back({1, it, f(it, p)});
p = it;
}
}
for(auto& jt: PV[d]) {
sort(jt.begin(), jt.end(), [&](int p, int q) {
if(d == 0 || d == 1) return X[p] > X[q];
return X[p] < X[q];
});
p = -1;
for(auto& it: jt) {
if(p != -1) G[2][p].push_back({2, it, f(it, p) >> 1});
p = it;
}
}
for(auto& jt: QV[d]) {
sort(jt.begin(), jt.end(), [&](int p, int q) {
if(d == 0 || d == 3) return X[p] > X[q];
return X[p] < X[q];
});
p = -1;
for(auto& it: jt) {
if(p != -1) G[3][p].push_back({3, it, f(it, p) >> 1});
p = it;
}
}
}
for(int i=1; i<=3; i++) for(int j=0; j<N; j++) G[i][j].push_back({0, j, 0});
vector<int> L[4];
for(int d=0; d<4; d++) L[d] = vector<int>(N, INF + 9);
priority_queue<tiii> pq; pq.push({L[0][0] = 0, 0, 0});
while(pq.size()) {
auto [l, t, x] = pq.top(); pq.pop(); l = -l;
if(L[t][x] != l) continue;
if(t == 0) {
int lv, pv, qv;
if(D[x] == 0) {
lv = g(LV[D[x] ^ 2][LI[x]], 1, 0, X[x] + 2*l);
pv = g(PV[D[x] ^ 3][PI[x]], 1, 0, X[x] + l);
qv = g(QV[D[x] ^ 1][QI[x]], 1, 0, X[x] + l);
}
if(D[x] == 1) {
lv = g(LV[D[x] ^ 2][LI[x]], 0, -1, -(Y[x] - 2*l));
pv = g(PV[D[x] ^ 3][PI[x]], 1, 0, X[x] + l);
qv = g(QV[D[x] ^ 1][QI[x]], -1, 0, -(X[x] - l));
}
if(D[x] == 2) {
lv = g(LV[D[x] ^ 2][LI[x]], -1, 0, -(X[x] - 2*l));
pv = g(PV[D[x] ^ 3][PI[x]], -1, 0, -(X[x] - l));
qv = g(QV[D[x] ^ 1][QI[x]], -1, 0, -(X[x] - l));
}
if(D[x] == 3) {
lv = g(LV[D[x] ^ 2][LI[x]], 0, 1, Y[x] + 2*l);
pv = g(PV[D[x] ^ 3][PI[x]], -1, 0, -(X[x] - l));
qv = g(QV[D[x] ^ 1][QI[x]], 1, 0, X[x] + l);
}
if(lv != -1) {
int c = f(x, lv) >> 1;
if(L[1][lv] > c) {
L[1][lv] = c;
pq.push({-c, 1, lv});
}
}
if(pv != -1) {
int c = f(x, pv) >> 1;
if(L[2][pv] > c) {
L[2][pv] = c;
pq.push({-c, 2, pv});
}
}
if(qv != -1) {
int c = f(x, qv) >> 1;
if(L[3][qv] > c) {
L[3][qv] = c;
pq.push({-c, 3, qv});
}
}
}
else {
for(auto& [it, ix, c]: G[t][x]) if(l + c < L[it][ix]) {
L[it][ix] = l + c;
pq.push({-L[it][ix], it, ix});
}
}
}
int cnt = 0;
for(int i=0; i<N; i++) if(L[0][i] != INF + 9) ++cnt;
ans = max(ans, cnt);
}
int main() {
int x0, y0; scanf("%d%d%d", &N, &x0, &y0);
for(int i=1; i<N; i++) {
scanf("%d%d", &X[i], &Y[i]);
X[i] -= x0; Y[i] -= y0;
X[i] *= 2; Y[i] *= 2;
}
for(int d=0; d<4; d++) {
solve();
for(int i=0; i<N; i++) {
swap(X[i], Y[i]);
X[i] = -X[i];
}
}
printf("%d", ans);
return 0;
}
Compilation message
fever.cpp: In function 'int g(std::vector<int>&, int, int, int)':
fever.cpp:26:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
26 | int m = l+r >> 1;
| ~^~
fever.cpp: In function 'int main()':
fever.cpp:167:19: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
167 | int x0, y0; scanf("%d%d%d", &N, &x0, &y0);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
fever.cpp:169:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
169 | scanf("%d%d", &X[i], &Y[i]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~
fever.cpp: In function 'void solve()':
fever.cpp:147:14: warning: 'qv' may be used uninitialized in this function [-Wmaybe-uninitialized]
147 | int c = f(x, qv) >> 1;
| ~^~~~~~~
fever.cpp:140:14: warning: 'pv' may be used uninitialized in this function [-Wmaybe-uninitialized]
140 | int c = f(x, pv) >> 1;
| ~^~~~~~~
fever.cpp:133:14: warning: 'lv' may be used uninitialized in this function [-Wmaybe-uninitialized]
133 | int c = f(x, lv) >> 1;
| ~^~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
316 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
312 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
212 KB |
Output is correct |
10 |
Correct |
0 ms |
308 KB |
Output is correct |
11 |
Correct |
1 ms |
212 KB |
Output is correct |
12 |
Correct |
0 ms |
212 KB |
Output is correct |
13 |
Correct |
1 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
1 ms |
212 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
1 ms |
212 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
312 KB |
Output is correct |
23 |
Correct |
1 ms |
212 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
1 ms |
212 KB |
Output is correct |
26 |
Correct |
1 ms |
212 KB |
Output is correct |
27 |
Correct |
1 ms |
212 KB |
Output is correct |
28 |
Correct |
1 ms |
312 KB |
Output is correct |
29 |
Correct |
1 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
212 KB |
Output is correct |
31 |
Correct |
1 ms |
316 KB |
Output is correct |
32 |
Correct |
1 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
316 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
312 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
212 KB |
Output is correct |
10 |
Correct |
0 ms |
308 KB |
Output is correct |
11 |
Correct |
1 ms |
212 KB |
Output is correct |
12 |
Correct |
0 ms |
212 KB |
Output is correct |
13 |
Correct |
1 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
1 ms |
212 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
1 ms |
212 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
312 KB |
Output is correct |
23 |
Correct |
1 ms |
212 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
1 ms |
212 KB |
Output is correct |
26 |
Correct |
1 ms |
212 KB |
Output is correct |
27 |
Correct |
1 ms |
212 KB |
Output is correct |
28 |
Correct |
1 ms |
312 KB |
Output is correct |
29 |
Correct |
1 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
212 KB |
Output is correct |
31 |
Correct |
1 ms |
316 KB |
Output is correct |
32 |
Correct |
1 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
1 ms |
340 KB |
Output is correct |
35 |
Correct |
1 ms |
308 KB |
Output is correct |
36 |
Correct |
1 ms |
212 KB |
Output is correct |
37 |
Correct |
1 ms |
212 KB |
Output is correct |
38 |
Correct |
1 ms |
212 KB |
Output is correct |
39 |
Correct |
1 ms |
212 KB |
Output is correct |
40 |
Correct |
1 ms |
212 KB |
Output is correct |
41 |
Correct |
1 ms |
212 KB |
Output is correct |
42 |
Correct |
0 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
308 KB |
Output is correct |
44 |
Correct |
1 ms |
308 KB |
Output is correct |
45 |
Correct |
1 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
340 KB |
Output is correct |
3 |
Correct |
1 ms |
340 KB |
Output is correct |
4 |
Correct |
1 ms |
340 KB |
Output is correct |
5 |
Correct |
1 ms |
340 KB |
Output is correct |
6 |
Correct |
1 ms |
340 KB |
Output is correct |
7 |
Correct |
1 ms |
340 KB |
Output is correct |
8 |
Correct |
1 ms |
308 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
316 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
312 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
212 KB |
Output is correct |
10 |
Correct |
0 ms |
308 KB |
Output is correct |
11 |
Correct |
1 ms |
212 KB |
Output is correct |
12 |
Correct |
0 ms |
212 KB |
Output is correct |
13 |
Correct |
1 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
1 ms |
212 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
1 ms |
212 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
312 KB |
Output is correct |
23 |
Correct |
1 ms |
212 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
1 ms |
212 KB |
Output is correct |
26 |
Correct |
1 ms |
212 KB |
Output is correct |
27 |
Correct |
1 ms |
212 KB |
Output is correct |
28 |
Correct |
1 ms |
312 KB |
Output is correct |
29 |
Correct |
1 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
212 KB |
Output is correct |
31 |
Correct |
1 ms |
316 KB |
Output is correct |
32 |
Correct |
1 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
1 ms |
340 KB |
Output is correct |
35 |
Correct |
1 ms |
308 KB |
Output is correct |
36 |
Correct |
1 ms |
212 KB |
Output is correct |
37 |
Correct |
1 ms |
212 KB |
Output is correct |
38 |
Correct |
1 ms |
212 KB |
Output is correct |
39 |
Correct |
1 ms |
212 KB |
Output is correct |
40 |
Correct |
1 ms |
212 KB |
Output is correct |
41 |
Correct |
1 ms |
212 KB |
Output is correct |
42 |
Correct |
0 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
308 KB |
Output is correct |
44 |
Correct |
1 ms |
308 KB |
Output is correct |
45 |
Correct |
1 ms |
212 KB |
Output is correct |
46 |
Correct |
1 ms |
340 KB |
Output is correct |
47 |
Correct |
1 ms |
340 KB |
Output is correct |
48 |
Correct |
1 ms |
340 KB |
Output is correct |
49 |
Correct |
1 ms |
340 KB |
Output is correct |
50 |
Correct |
1 ms |
340 KB |
Output is correct |
51 |
Correct |
1 ms |
340 KB |
Output is correct |
52 |
Correct |
1 ms |
340 KB |
Output is correct |
53 |
Correct |
1 ms |
308 KB |
Output is correct |
54 |
Correct |
1 ms |
340 KB |
Output is correct |
55 |
Correct |
1 ms |
284 KB |
Output is correct |
56 |
Correct |
1 ms |
340 KB |
Output is correct |
57 |
Correct |
1 ms |
404 KB |
Output is correct |
58 |
Correct |
1 ms |
340 KB |
Output is correct |
59 |
Correct |
1 ms |
308 KB |
Output is correct |
60 |
Correct |
1 ms |
340 KB |
Output is correct |
61 |
Correct |
1 ms |
340 KB |
Output is correct |
62 |
Correct |
1 ms |
308 KB |
Output is correct |
63 |
Correct |
1 ms |
340 KB |
Output is correct |
64 |
Correct |
1 ms |
340 KB |
Output is correct |
65 |
Correct |
1 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
316 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
312 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
212 KB |
Output is correct |
10 |
Correct |
0 ms |
308 KB |
Output is correct |
11 |
Correct |
1 ms |
212 KB |
Output is correct |
12 |
Correct |
0 ms |
212 KB |
Output is correct |
13 |
Correct |
1 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
1 ms |
212 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
1 ms |
212 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
312 KB |
Output is correct |
23 |
Correct |
1 ms |
212 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
1 ms |
212 KB |
Output is correct |
26 |
Correct |
1 ms |
212 KB |
Output is correct |
27 |
Correct |
1 ms |
212 KB |
Output is correct |
28 |
Correct |
1 ms |
312 KB |
Output is correct |
29 |
Correct |
1 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
212 KB |
Output is correct |
31 |
Correct |
1 ms |
316 KB |
Output is correct |
32 |
Correct |
1 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
1 ms |
340 KB |
Output is correct |
35 |
Correct |
1 ms |
308 KB |
Output is correct |
36 |
Correct |
1 ms |
212 KB |
Output is correct |
37 |
Correct |
1 ms |
212 KB |
Output is correct |
38 |
Correct |
1 ms |
212 KB |
Output is correct |
39 |
Correct |
1 ms |
212 KB |
Output is correct |
40 |
Correct |
1 ms |
212 KB |
Output is correct |
41 |
Correct |
1 ms |
212 KB |
Output is correct |
42 |
Correct |
0 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
308 KB |
Output is correct |
44 |
Correct |
1 ms |
308 KB |
Output is correct |
45 |
Correct |
1 ms |
212 KB |
Output is correct |
46 |
Correct |
1 ms |
340 KB |
Output is correct |
47 |
Correct |
1 ms |
340 KB |
Output is correct |
48 |
Correct |
1 ms |
340 KB |
Output is correct |
49 |
Correct |
1 ms |
340 KB |
Output is correct |
50 |
Correct |
1 ms |
340 KB |
Output is correct |
51 |
Correct |
1 ms |
340 KB |
Output is correct |
52 |
Correct |
1 ms |
340 KB |
Output is correct |
53 |
Correct |
1 ms |
308 KB |
Output is correct |
54 |
Correct |
1 ms |
340 KB |
Output is correct |
55 |
Correct |
1 ms |
284 KB |
Output is correct |
56 |
Correct |
1 ms |
340 KB |
Output is correct |
57 |
Correct |
1 ms |
404 KB |
Output is correct |
58 |
Correct |
1 ms |
340 KB |
Output is correct |
59 |
Correct |
1 ms |
308 KB |
Output is correct |
60 |
Correct |
1 ms |
340 KB |
Output is correct |
61 |
Correct |
1 ms |
340 KB |
Output is correct |
62 |
Correct |
1 ms |
308 KB |
Output is correct |
63 |
Correct |
1 ms |
340 KB |
Output is correct |
64 |
Correct |
1 ms |
340 KB |
Output is correct |
65 |
Correct |
1 ms |
340 KB |
Output is correct |
66 |
Correct |
11 ms |
2020 KB |
Output is correct |
67 |
Correct |
10 ms |
1988 KB |
Output is correct |
68 |
Correct |
12 ms |
2160 KB |
Output is correct |
69 |
Correct |
15 ms |
1092 KB |
Output is correct |
70 |
Incorrect |
13 ms |
1236 KB |
Output isn't correct |
71 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
316 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
312 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
212 KB |
Output is correct |
10 |
Correct |
0 ms |
308 KB |
Output is correct |
11 |
Correct |
1 ms |
212 KB |
Output is correct |
12 |
Correct |
0 ms |
212 KB |
Output is correct |
13 |
Correct |
1 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
1 ms |
212 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
1 ms |
212 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
312 KB |
Output is correct |
23 |
Correct |
1 ms |
212 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
1 ms |
212 KB |
Output is correct |
26 |
Correct |
1 ms |
212 KB |
Output is correct |
27 |
Correct |
1 ms |
212 KB |
Output is correct |
28 |
Correct |
1 ms |
312 KB |
Output is correct |
29 |
Correct |
1 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
212 KB |
Output is correct |
31 |
Correct |
1 ms |
316 KB |
Output is correct |
32 |
Correct |
1 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
1 ms |
340 KB |
Output is correct |
35 |
Correct |
1 ms |
308 KB |
Output is correct |
36 |
Correct |
1 ms |
212 KB |
Output is correct |
37 |
Correct |
1 ms |
212 KB |
Output is correct |
38 |
Correct |
1 ms |
212 KB |
Output is correct |
39 |
Correct |
1 ms |
212 KB |
Output is correct |
40 |
Correct |
1 ms |
212 KB |
Output is correct |
41 |
Correct |
1 ms |
212 KB |
Output is correct |
42 |
Correct |
0 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
308 KB |
Output is correct |
44 |
Correct |
1 ms |
308 KB |
Output is correct |
45 |
Correct |
1 ms |
212 KB |
Output is correct |
46 |
Correct |
1 ms |
340 KB |
Output is correct |
47 |
Correct |
1 ms |
340 KB |
Output is correct |
48 |
Correct |
1 ms |
340 KB |
Output is correct |
49 |
Correct |
1 ms |
340 KB |
Output is correct |
50 |
Correct |
1 ms |
340 KB |
Output is correct |
51 |
Correct |
1 ms |
340 KB |
Output is correct |
52 |
Correct |
1 ms |
340 KB |
Output is correct |
53 |
Correct |
1 ms |
308 KB |
Output is correct |
54 |
Correct |
1 ms |
340 KB |
Output is correct |
55 |
Correct |
1 ms |
284 KB |
Output is correct |
56 |
Correct |
1 ms |
340 KB |
Output is correct |
57 |
Correct |
1 ms |
404 KB |
Output is correct |
58 |
Correct |
1 ms |
340 KB |
Output is correct |
59 |
Correct |
1 ms |
308 KB |
Output is correct |
60 |
Correct |
1 ms |
340 KB |
Output is correct |
61 |
Correct |
1 ms |
340 KB |
Output is correct |
62 |
Correct |
1 ms |
308 KB |
Output is correct |
63 |
Correct |
1 ms |
340 KB |
Output is correct |
64 |
Correct |
1 ms |
340 KB |
Output is correct |
65 |
Correct |
1 ms |
340 KB |
Output is correct |
66 |
Correct |
472 ms |
46000 KB |
Output is correct |
67 |
Correct |
653 ms |
57112 KB |
Output is correct |
68 |
Correct |
639 ms |
63900 KB |
Output is correct |
69 |
Correct |
493 ms |
51188 KB |
Output is correct |
70 |
Correct |
572 ms |
52072 KB |
Output is correct |
71 |
Correct |
714 ms |
64040 KB |
Output is correct |
72 |
Correct |
626 ms |
63308 KB |
Output is correct |
73 |
Correct |
560 ms |
52192 KB |
Output is correct |
74 |
Correct |
682 ms |
64400 KB |
Output is correct |
75 |
Correct |
651 ms |
63564 KB |
Output is correct |
76 |
Correct |
570 ms |
52384 KB |
Output is correct |
77 |
Correct |
656 ms |
64396 KB |
Output is correct |
78 |
Correct |
619 ms |
55064 KB |
Output is correct |
79 |
Correct |
617 ms |
54956 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
316 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
312 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
212 KB |
Output is correct |
10 |
Correct |
0 ms |
308 KB |
Output is correct |
11 |
Correct |
1 ms |
212 KB |
Output is correct |
12 |
Correct |
0 ms |
212 KB |
Output is correct |
13 |
Correct |
1 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
1 ms |
212 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
1 ms |
212 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
312 KB |
Output is correct |
23 |
Correct |
1 ms |
212 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
1 ms |
212 KB |
Output is correct |
26 |
Correct |
1 ms |
212 KB |
Output is correct |
27 |
Correct |
1 ms |
212 KB |
Output is correct |
28 |
Correct |
1 ms |
312 KB |
Output is correct |
29 |
Correct |
1 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
212 KB |
Output is correct |
31 |
Correct |
1 ms |
316 KB |
Output is correct |
32 |
Correct |
1 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
1 ms |
340 KB |
Output is correct |
35 |
Correct |
1 ms |
308 KB |
Output is correct |
36 |
Correct |
1 ms |
212 KB |
Output is correct |
37 |
Correct |
1 ms |
212 KB |
Output is correct |
38 |
Correct |
1 ms |
212 KB |
Output is correct |
39 |
Correct |
1 ms |
212 KB |
Output is correct |
40 |
Correct |
1 ms |
212 KB |
Output is correct |
41 |
Correct |
1 ms |
212 KB |
Output is correct |
42 |
Correct |
0 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
308 KB |
Output is correct |
44 |
Correct |
1 ms |
308 KB |
Output is correct |
45 |
Correct |
1 ms |
212 KB |
Output is correct |
46 |
Correct |
1 ms |
340 KB |
Output is correct |
47 |
Correct |
1 ms |
340 KB |
Output is correct |
48 |
Correct |
1 ms |
340 KB |
Output is correct |
49 |
Correct |
1 ms |
340 KB |
Output is correct |
50 |
Correct |
1 ms |
340 KB |
Output is correct |
51 |
Correct |
1 ms |
340 KB |
Output is correct |
52 |
Correct |
1 ms |
340 KB |
Output is correct |
53 |
Correct |
1 ms |
308 KB |
Output is correct |
54 |
Correct |
1 ms |
340 KB |
Output is correct |
55 |
Correct |
1 ms |
284 KB |
Output is correct |
56 |
Correct |
1 ms |
340 KB |
Output is correct |
57 |
Correct |
1 ms |
404 KB |
Output is correct |
58 |
Correct |
1 ms |
340 KB |
Output is correct |
59 |
Correct |
1 ms |
308 KB |
Output is correct |
60 |
Correct |
1 ms |
340 KB |
Output is correct |
61 |
Correct |
1 ms |
340 KB |
Output is correct |
62 |
Correct |
1 ms |
308 KB |
Output is correct |
63 |
Correct |
1 ms |
340 KB |
Output is correct |
64 |
Correct |
1 ms |
340 KB |
Output is correct |
65 |
Correct |
1 ms |
340 KB |
Output is correct |
66 |
Correct |
11 ms |
2020 KB |
Output is correct |
67 |
Correct |
10 ms |
1988 KB |
Output is correct |
68 |
Correct |
12 ms |
2160 KB |
Output is correct |
69 |
Correct |
15 ms |
1092 KB |
Output is correct |
70 |
Incorrect |
13 ms |
1236 KB |
Output isn't correct |
71 |
Halted |
0 ms |
0 KB |
- |