# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
801939 |
2023-08-02T08:31:41 Z |
이온조(#10130) |
IOI Fever (JOI21_fever) |
C++17 |
|
1176 ms |
70288 KB |
#include <bits/stdc++.h>
#define int long long
#define sz(V) ((int)V.size())
using namespace std;
using pii = pair<int, int>;
using tiii = tuple<int, int, int>;
const int INF = 1LL * 5e9;
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) >> 1});
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);
}
signed main() {
int x0, y0; scanf("%lld%lld%lld", &N, &x0, &y0);
for(int i=1; i<N; i++) {
scanf("%lld%lld", &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("%lld", ans);
return 0;
}
Compilation message
fever.cpp: In function 'long long int g(std::vector<long long int>&, long long int, long long int, long long int)':
fever.cpp:27:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
27 | int m = l+r >> 1;
| ~^~
fever.cpp: In function 'int main()':
fever.cpp:168:19: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
168 | int x0, y0; scanf("%lld%lld%lld", &N, &x0, &y0);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fever.cpp:170:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
170 | scanf("%lld%lld", &X[i], &Y[i]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
fever.cpp: In function 'void solve()':
fever.cpp:148:14: warning: 'qv' may be used uninitialized in this function [-Wmaybe-uninitialized]
148 | int c = f(x, qv) >> 1;
| ~^~~~~~~
fever.cpp:141:14: warning: 'pv' may be used uninitialized in this function [-Wmaybe-uninitialized]
141 | int c = f(x, pv) >> 1;
| ~^~~~~~~
fever.cpp:134:14: warning: 'lv' may be used uninitialized in this function [-Wmaybe-uninitialized]
134 | int c = f(x, lv) >> 1;
| ~^~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
0 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 |
1 ms |
308 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
312 KB |
Output is correct |
9 |
Correct |
1 ms |
312 KB |
Output is correct |
10 |
Correct |
1 ms |
212 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 |
0 ms |
308 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
1 ms |
212 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
1 ms |
308 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
212 KB |
Output is correct |
23 |
Correct |
0 ms |
212 KB |
Output is correct |
24 |
Correct |
1 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 |
0 ms |
212 KB |
Output is correct |
28 |
Correct |
0 ms |
212 KB |
Output is correct |
29 |
Correct |
0 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
212 KB |
Output is correct |
31 |
Correct |
0 ms |
308 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
0 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 |
1 ms |
308 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
312 KB |
Output is correct |
9 |
Correct |
1 ms |
312 KB |
Output is correct |
10 |
Correct |
1 ms |
212 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 |
0 ms |
308 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
1 ms |
212 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
1 ms |
308 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
212 KB |
Output is correct |
23 |
Correct |
0 ms |
212 KB |
Output is correct |
24 |
Correct |
1 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 |
0 ms |
212 KB |
Output is correct |
28 |
Correct |
0 ms |
212 KB |
Output is correct |
29 |
Correct |
0 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
212 KB |
Output is correct |
31 |
Correct |
0 ms |
308 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
1 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 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 |
0 ms |
304 KB |
Output is correct |
41 |
Correct |
1 ms |
212 KB |
Output is correct |
42 |
Correct |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
212 KB |
Output is correct |
44 |
Correct |
0 ms |
212 KB |
Output is correct |
45 |
Correct |
0 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 |
304 KB |
Output is correct |
4 |
Correct |
1 ms |
340 KB |
Output is correct |
5 |
Correct |
1 ms |
304 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 |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
0 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 |
1 ms |
308 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
312 KB |
Output is correct |
9 |
Correct |
1 ms |
312 KB |
Output is correct |
10 |
Correct |
1 ms |
212 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 |
0 ms |
308 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
1 ms |
212 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
1 ms |
308 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
212 KB |
Output is correct |
23 |
Correct |
0 ms |
212 KB |
Output is correct |
24 |
Correct |
1 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 |
0 ms |
212 KB |
Output is correct |
28 |
Correct |
0 ms |
212 KB |
Output is correct |
29 |
Correct |
0 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
212 KB |
Output is correct |
31 |
Correct |
0 ms |
308 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
1 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 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 |
0 ms |
304 KB |
Output is correct |
41 |
Correct |
1 ms |
212 KB |
Output is correct |
42 |
Correct |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
212 KB |
Output is correct |
44 |
Correct |
0 ms |
212 KB |
Output is correct |
45 |
Correct |
0 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 |
304 KB |
Output is correct |
49 |
Correct |
1 ms |
340 KB |
Output is correct |
50 |
Correct |
1 ms |
304 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 |
340 KB |
Output is correct |
54 |
Correct |
1 ms |
308 KB |
Output is correct |
55 |
Correct |
1 ms |
340 KB |
Output is correct |
56 |
Correct |
1 ms |
340 KB |
Output is correct |
57 |
Correct |
1 ms |
340 KB |
Output is correct |
58 |
Correct |
1 ms |
340 KB |
Output is correct |
59 |
Correct |
1 ms |
340 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 |
340 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 |
0 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 |
1 ms |
308 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
312 KB |
Output is correct |
9 |
Correct |
1 ms |
312 KB |
Output is correct |
10 |
Correct |
1 ms |
212 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 |
0 ms |
308 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
1 ms |
212 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
1 ms |
308 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
212 KB |
Output is correct |
23 |
Correct |
0 ms |
212 KB |
Output is correct |
24 |
Correct |
1 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 |
0 ms |
212 KB |
Output is correct |
28 |
Correct |
0 ms |
212 KB |
Output is correct |
29 |
Correct |
0 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
212 KB |
Output is correct |
31 |
Correct |
0 ms |
308 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
1 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 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 |
0 ms |
304 KB |
Output is correct |
41 |
Correct |
1 ms |
212 KB |
Output is correct |
42 |
Correct |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
212 KB |
Output is correct |
44 |
Correct |
0 ms |
212 KB |
Output is correct |
45 |
Correct |
0 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 |
304 KB |
Output is correct |
49 |
Correct |
1 ms |
340 KB |
Output is correct |
50 |
Correct |
1 ms |
304 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 |
340 KB |
Output is correct |
54 |
Correct |
1 ms |
308 KB |
Output is correct |
55 |
Correct |
1 ms |
340 KB |
Output is correct |
56 |
Correct |
1 ms |
340 KB |
Output is correct |
57 |
Correct |
1 ms |
340 KB |
Output is correct |
58 |
Correct |
1 ms |
340 KB |
Output is correct |
59 |
Correct |
1 ms |
340 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 |
340 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 |
2200 KB |
Output is correct |
67 |
Correct |
11 ms |
2152 KB |
Output is correct |
68 |
Correct |
10 ms |
2304 KB |
Output is correct |
69 |
Correct |
16 ms |
1852 KB |
Output is correct |
70 |
Correct |
12 ms |
1852 KB |
Output is correct |
71 |
Correct |
11 ms |
1848 KB |
Output is correct |
72 |
Correct |
11 ms |
2132 KB |
Output is correct |
73 |
Correct |
11 ms |
2260 KB |
Output is correct |
74 |
Correct |
10 ms |
2132 KB |
Output is correct |
75 |
Correct |
10 ms |
2188 KB |
Output is correct |
76 |
Correct |
10 ms |
2260 KB |
Output is correct |
77 |
Correct |
10 ms |
2132 KB |
Output is correct |
78 |
Correct |
11 ms |
2272 KB |
Output is correct |
79 |
Correct |
11 ms |
2284 KB |
Output is correct |
80 |
Correct |
11 ms |
2340 KB |
Output is correct |
81 |
Correct |
13 ms |
2368 KB |
Output is correct |
82 |
Correct |
10 ms |
2272 KB |
Output is correct |
83 |
Correct |
9 ms |
2316 KB |
Output is correct |
84 |
Correct |
7 ms |
1876 KB |
Output is correct |
85 |
Correct |
7 ms |
1884 KB |
Output is correct |
86 |
Correct |
8 ms |
1796 KB |
Output is correct |
87 |
Correct |
8 ms |
1816 KB |
Output is correct |
88 |
Correct |
7 ms |
2112 KB |
Output is correct |
89 |
Correct |
10 ms |
2112 KB |
Output is correct |
90 |
Correct |
12 ms |
2016 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
0 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 |
1 ms |
308 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
312 KB |
Output is correct |
9 |
Correct |
1 ms |
312 KB |
Output is correct |
10 |
Correct |
1 ms |
212 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 |
0 ms |
308 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
1 ms |
212 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
1 ms |
308 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
212 KB |
Output is correct |
23 |
Correct |
0 ms |
212 KB |
Output is correct |
24 |
Correct |
1 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 |
0 ms |
212 KB |
Output is correct |
28 |
Correct |
0 ms |
212 KB |
Output is correct |
29 |
Correct |
0 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
212 KB |
Output is correct |
31 |
Correct |
0 ms |
308 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
1 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 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 |
0 ms |
304 KB |
Output is correct |
41 |
Correct |
1 ms |
212 KB |
Output is correct |
42 |
Correct |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
212 KB |
Output is correct |
44 |
Correct |
0 ms |
212 KB |
Output is correct |
45 |
Correct |
0 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 |
304 KB |
Output is correct |
49 |
Correct |
1 ms |
340 KB |
Output is correct |
50 |
Correct |
1 ms |
304 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 |
340 KB |
Output is correct |
54 |
Correct |
1 ms |
308 KB |
Output is correct |
55 |
Correct |
1 ms |
340 KB |
Output is correct |
56 |
Correct |
1 ms |
340 KB |
Output is correct |
57 |
Correct |
1 ms |
340 KB |
Output is correct |
58 |
Correct |
1 ms |
340 KB |
Output is correct |
59 |
Correct |
1 ms |
340 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 |
340 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 |
531 ms |
50992 KB |
Output is correct |
67 |
Correct |
657 ms |
62976 KB |
Output is correct |
68 |
Correct |
665 ms |
68652 KB |
Output is correct |
69 |
Correct |
541 ms |
62604 KB |
Output is correct |
70 |
Correct |
649 ms |
61840 KB |
Output is correct |
71 |
Correct |
704 ms |
67796 KB |
Output is correct |
72 |
Correct |
704 ms |
67316 KB |
Output is correct |
73 |
Correct |
617 ms |
60144 KB |
Output is correct |
74 |
Correct |
716 ms |
68252 KB |
Output is correct |
75 |
Correct |
713 ms |
67020 KB |
Output is correct |
76 |
Correct |
585 ms |
60076 KB |
Output is correct |
77 |
Correct |
702 ms |
68368 KB |
Output is correct |
78 |
Correct |
681 ms |
58992 KB |
Output is correct |
79 |
Correct |
662 ms |
59076 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
0 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 |
1 ms |
308 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
312 KB |
Output is correct |
9 |
Correct |
1 ms |
312 KB |
Output is correct |
10 |
Correct |
1 ms |
212 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 |
0 ms |
308 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
1 ms |
212 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
1 ms |
308 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
212 KB |
Output is correct |
23 |
Correct |
0 ms |
212 KB |
Output is correct |
24 |
Correct |
1 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 |
0 ms |
212 KB |
Output is correct |
28 |
Correct |
0 ms |
212 KB |
Output is correct |
29 |
Correct |
0 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
212 KB |
Output is correct |
31 |
Correct |
0 ms |
308 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
1 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 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 |
0 ms |
304 KB |
Output is correct |
41 |
Correct |
1 ms |
212 KB |
Output is correct |
42 |
Correct |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
212 KB |
Output is correct |
44 |
Correct |
0 ms |
212 KB |
Output is correct |
45 |
Correct |
0 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 |
304 KB |
Output is correct |
49 |
Correct |
1 ms |
340 KB |
Output is correct |
50 |
Correct |
1 ms |
304 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 |
340 KB |
Output is correct |
54 |
Correct |
1 ms |
308 KB |
Output is correct |
55 |
Correct |
1 ms |
340 KB |
Output is correct |
56 |
Correct |
1 ms |
340 KB |
Output is correct |
57 |
Correct |
1 ms |
340 KB |
Output is correct |
58 |
Correct |
1 ms |
340 KB |
Output is correct |
59 |
Correct |
1 ms |
340 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 |
340 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 |
2200 KB |
Output is correct |
67 |
Correct |
11 ms |
2152 KB |
Output is correct |
68 |
Correct |
10 ms |
2304 KB |
Output is correct |
69 |
Correct |
16 ms |
1852 KB |
Output is correct |
70 |
Correct |
12 ms |
1852 KB |
Output is correct |
71 |
Correct |
11 ms |
1848 KB |
Output is correct |
72 |
Correct |
11 ms |
2132 KB |
Output is correct |
73 |
Correct |
11 ms |
2260 KB |
Output is correct |
74 |
Correct |
10 ms |
2132 KB |
Output is correct |
75 |
Correct |
10 ms |
2188 KB |
Output is correct |
76 |
Correct |
10 ms |
2260 KB |
Output is correct |
77 |
Correct |
10 ms |
2132 KB |
Output is correct |
78 |
Correct |
11 ms |
2272 KB |
Output is correct |
79 |
Correct |
11 ms |
2284 KB |
Output is correct |
80 |
Correct |
11 ms |
2340 KB |
Output is correct |
81 |
Correct |
13 ms |
2368 KB |
Output is correct |
82 |
Correct |
10 ms |
2272 KB |
Output is correct |
83 |
Correct |
9 ms |
2316 KB |
Output is correct |
84 |
Correct |
7 ms |
1876 KB |
Output is correct |
85 |
Correct |
7 ms |
1884 KB |
Output is correct |
86 |
Correct |
8 ms |
1796 KB |
Output is correct |
87 |
Correct |
8 ms |
1816 KB |
Output is correct |
88 |
Correct |
7 ms |
2112 KB |
Output is correct |
89 |
Correct |
10 ms |
2112 KB |
Output is correct |
90 |
Correct |
12 ms |
2016 KB |
Output is correct |
91 |
Correct |
531 ms |
50992 KB |
Output is correct |
92 |
Correct |
657 ms |
62976 KB |
Output is correct |
93 |
Correct |
665 ms |
68652 KB |
Output is correct |
94 |
Correct |
541 ms |
62604 KB |
Output is correct |
95 |
Correct |
649 ms |
61840 KB |
Output is correct |
96 |
Correct |
704 ms |
67796 KB |
Output is correct |
97 |
Correct |
704 ms |
67316 KB |
Output is correct |
98 |
Correct |
617 ms |
60144 KB |
Output is correct |
99 |
Correct |
716 ms |
68252 KB |
Output is correct |
100 |
Correct |
713 ms |
67020 KB |
Output is correct |
101 |
Correct |
585 ms |
60076 KB |
Output is correct |
102 |
Correct |
702 ms |
68368 KB |
Output is correct |
103 |
Correct |
681 ms |
58992 KB |
Output is correct |
104 |
Correct |
662 ms |
59076 KB |
Output is correct |
105 |
Correct |
659 ms |
36048 KB |
Output is correct |
106 |
Correct |
806 ms |
44968 KB |
Output is correct |
107 |
Correct |
1176 ms |
45328 KB |
Output is correct |
108 |
Correct |
912 ms |
45516 KB |
Output is correct |
109 |
Correct |
575 ms |
48212 KB |
Output is correct |
110 |
Correct |
672 ms |
60480 KB |
Output is correct |
111 |
Correct |
734 ms |
70288 KB |
Output is correct |
112 |
Correct |
692 ms |
66876 KB |
Output is correct |
113 |
Correct |
704 ms |
67276 KB |
Output is correct |
114 |
Correct |
873 ms |
52980 KB |
Output is correct |
115 |
Correct |
631 ms |
62000 KB |
Output is correct |
116 |
Correct |
682 ms |
67120 KB |
Output is correct |
117 |
Correct |
706 ms |
66348 KB |
Output is correct |
118 |
Correct |
878 ms |
58784 KB |
Output is correct |
119 |
Correct |
654 ms |
61288 KB |
Output is correct |
120 |
Correct |
715 ms |
66868 KB |
Output is correct |
121 |
Correct |
757 ms |
68232 KB |
Output is correct |
122 |
Correct |
765 ms |
66588 KB |
Output is correct |
123 |
Correct |
598 ms |
65432 KB |
Output is correct |
124 |
Correct |
577 ms |
65976 KB |
Output is correct |
125 |
Correct |
256 ms |
54964 KB |
Output is correct |
126 |
Correct |
284 ms |
46340 KB |
Output is correct |
127 |
Correct |
318 ms |
45176 KB |
Output is correct |
128 |
Correct |
315 ms |
45568 KB |
Output is correct |
129 |
Correct |
279 ms |
49236 KB |
Output is correct |