#include<bits/stdc++.h>
using namespace std;
#define int int64_t
#define pb push_back
#define pii pair<int, int>
#define st first
#define nd second
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
const int MAXN = 100'009;
const int INF = 1e18;
int n;
pii tab[MAXN];
int dis[MAXN];
int dir[MAXN];
pii sdis[8][MAXN];
unordered_map<int, int> remap[4];
set<pii> S[8][MAXN];
int D(int x, int y) {
return max(abs(tab[x].st-tab[y].st), abs(tab[x].nd-tab[y].nd));
}
int id(int x, int i) {
if(i%4==0) {
return remap[i%4][tab[x].nd];
}
if(i%4==1) {
return remap[i%4][tab[x].st-tab[x].nd];
}
if(i%4==2) {
return remap[i%4][tab[x].st];
}
if(i%4==3) {
return remap[i%4][tab[x].st+tab[x].nd];
}
}
int f(int x, int i) {
int ret = 0;
if(i/2==0||i/2==2) {
ret = tab[x].st;
} else {
ret = tab[x].nd;
}
if(i>=4) ret*=-1;
return ret;
}
int opp(int x, int i) {
if(x==i) {
return (x+4)%8;
}
if((x+1)%8==i) {
return (x+6)%8;
}
return (x+2)%8;
}
priority_queue<pii, vector<pii>, greater<pii>> Q;
void push(int x) {
for(int i=0;i<8;i++) {
int num = id(x, i);
auto it = S[i][num].upper_bound({f(x, i), INF});
if(it!=S[i][num].end()) {
int nxt = (*it).nd;
int X = 2-i%2;
int ndis = sdis[i][x].st+D(x, nxt)/X;
if(ndis<sdis[i][nxt].st) {
sdis[i][nxt] = {ndis, sdis[i][x].nd};
}
if(ndis<dis[nxt]) {
dis[nxt] = ndis;
dir[nxt] = opp(sdis[i][x].nd, i);
Q.push({dis[nxt], nxt});
}
}
}
}
int dijkstra(int I) {
int ret = 0;
fill(dis, dis+n, INF);
fill(dir, dir+n, INF);
for(int i=0;i<8;i++) {
fill(sdis[i], sdis[i]+n, make_pair(INF, -1));
}
dis[0] = 0;
dir[0] = I;
Q.push({0, 0});
while(sz(Q)) {
auto [x_dis, x] = Q.top();
Q.pop();
if(x_dis!=dis[x]) continue;
ret++;
for(int i=0;i<8;i++) {
S[i][id(x, i)].erase(make_pair(f(x, i), x));
}
push(x);
int tmp = (dir[x]-1);
if(tmp<0) tmp += 8;
vector<int> v = {tmp, dir[x], (dir[x]+1)%8};
for(int i:v) {
int X = 2-i%2;
auto it = S[i][id(x, i)].lower_bound(make_pair(f(x, i)+dis[x]*X, -1));
if(it!=S[i][id(x, i)].end()) {
int y = (*it).nd;
int ndis = D(x, y)/X;
if(ndis<sdis[i][y].st) {
sdis[i][y] = {ndis, dir[x]};
}
if(ndis<dis[y]) {
dis[y] = ndis;
dir[y] = opp(dir[x], i);
Q.push({dis[y], y});
}
}
}
}
return ret;
}
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> n;
vector<int> vals[4];
for(int i=0;i<n;i++) {
cin >> tab[i].st >> tab[i].nd;
tab[i].st*=2, tab[i].nd*=2;
swap(tab[i].st, tab[i].nd);
vals[0].pb(tab[i].nd), vals[2].pb(tab[i].st);
vals[1].pb(tab[i].st-tab[i].nd), vals[3].pb(tab[i].st+tab[i].nd);
}
for(int i=0;i<4;i++) {
sort(all(vals[i]));
vals[i].erase(unique(all(vals[i])), vals[i].end());
for(int j=0;j<sz(vals[i]);j++) {
remap[i][vals[i][j]] = j;
}
}
int ans = 0;
for(int I=0;I<8;I+=2) {
for(int i=0;i<n;i++) {
for(int j=0;j<8;j++) {
S[j][i].clear();
}
}
for(int i=0;i<n;i++) {
for(int j=0;j<8;j++) {
S[j][id(i, j)].insert(make_pair(f(i, j), i));
}
}
ans = max(ans, dijkstra(I));
}
cout << ans << "\n";
}
Compilation message
fever.cpp: In function 'int64_t id(int64_t, int64_t)':
fever.cpp:41:1: warning: control reaches end of non-void function [-Wreturn-type]
41 | }
| ^
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
51804 KB |
Output is correct |
2 |
Correct |
10 ms |
51932 KB |
Output is correct |
3 |
Correct |
10 ms |
51924 KB |
Output is correct |
4 |
Correct |
11 ms |
51804 KB |
Output is correct |
5 |
Correct |
10 ms |
51804 KB |
Output is correct |
6 |
Correct |
10 ms |
51836 KB |
Output is correct |
7 |
Correct |
10 ms |
51804 KB |
Output is correct |
8 |
Correct |
10 ms |
51804 KB |
Output is correct |
9 |
Correct |
10 ms |
51804 KB |
Output is correct |
10 |
Correct |
10 ms |
51804 KB |
Output is correct |
11 |
Correct |
10 ms |
51804 KB |
Output is correct |
12 |
Correct |
9 ms |
51800 KB |
Output is correct |
13 |
Correct |
10 ms |
51932 KB |
Output is correct |
14 |
Correct |
10 ms |
51832 KB |
Output is correct |
15 |
Correct |
10 ms |
51804 KB |
Output is correct |
16 |
Correct |
11 ms |
51804 KB |
Output is correct |
17 |
Correct |
10 ms |
51844 KB |
Output is correct |
18 |
Correct |
10 ms |
51804 KB |
Output is correct |
19 |
Correct |
10 ms |
51836 KB |
Output is correct |
20 |
Correct |
10 ms |
51804 KB |
Output is correct |
21 |
Correct |
10 ms |
51804 KB |
Output is correct |
22 |
Correct |
10 ms |
51804 KB |
Output is correct |
23 |
Correct |
10 ms |
51920 KB |
Output is correct |
24 |
Correct |
10 ms |
51804 KB |
Output is correct |
25 |
Correct |
10 ms |
51804 KB |
Output is correct |
26 |
Correct |
10 ms |
52056 KB |
Output is correct |
27 |
Correct |
10 ms |
51800 KB |
Output is correct |
28 |
Correct |
10 ms |
51804 KB |
Output is correct |
29 |
Correct |
10 ms |
51936 KB |
Output is correct |
30 |
Correct |
10 ms |
51864 KB |
Output is correct |
31 |
Correct |
10 ms |
51804 KB |
Output is correct |
32 |
Correct |
11 ms |
51932 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
51804 KB |
Output is correct |
2 |
Correct |
10 ms |
51932 KB |
Output is correct |
3 |
Correct |
10 ms |
51924 KB |
Output is correct |
4 |
Correct |
11 ms |
51804 KB |
Output is correct |
5 |
Correct |
10 ms |
51804 KB |
Output is correct |
6 |
Correct |
10 ms |
51836 KB |
Output is correct |
7 |
Correct |
10 ms |
51804 KB |
Output is correct |
8 |
Correct |
10 ms |
51804 KB |
Output is correct |
9 |
Correct |
10 ms |
51804 KB |
Output is correct |
10 |
Correct |
10 ms |
51804 KB |
Output is correct |
11 |
Correct |
10 ms |
51804 KB |
Output is correct |
12 |
Correct |
9 ms |
51800 KB |
Output is correct |
13 |
Correct |
10 ms |
51932 KB |
Output is correct |
14 |
Correct |
10 ms |
51832 KB |
Output is correct |
15 |
Correct |
10 ms |
51804 KB |
Output is correct |
16 |
Correct |
11 ms |
51804 KB |
Output is correct |
17 |
Correct |
10 ms |
51844 KB |
Output is correct |
18 |
Correct |
10 ms |
51804 KB |
Output is correct |
19 |
Correct |
10 ms |
51836 KB |
Output is correct |
20 |
Correct |
10 ms |
51804 KB |
Output is correct |
21 |
Correct |
10 ms |
51804 KB |
Output is correct |
22 |
Correct |
10 ms |
51804 KB |
Output is correct |
23 |
Correct |
10 ms |
51920 KB |
Output is correct |
24 |
Correct |
10 ms |
51804 KB |
Output is correct |
25 |
Correct |
10 ms |
51804 KB |
Output is correct |
26 |
Correct |
10 ms |
52056 KB |
Output is correct |
27 |
Correct |
10 ms |
51800 KB |
Output is correct |
28 |
Correct |
10 ms |
51804 KB |
Output is correct |
29 |
Correct |
10 ms |
51936 KB |
Output is correct |
30 |
Correct |
10 ms |
51864 KB |
Output is correct |
31 |
Correct |
10 ms |
51804 KB |
Output is correct |
32 |
Correct |
11 ms |
51932 KB |
Output is correct |
33 |
Correct |
10 ms |
52056 KB |
Output is correct |
34 |
Correct |
10 ms |
51804 KB |
Output is correct |
35 |
Correct |
10 ms |
51800 KB |
Output is correct |
36 |
Correct |
10 ms |
51804 KB |
Output is correct |
37 |
Correct |
10 ms |
51800 KB |
Output is correct |
38 |
Correct |
10 ms |
51804 KB |
Output is correct |
39 |
Correct |
11 ms |
51804 KB |
Output is correct |
40 |
Correct |
10 ms |
51804 KB |
Output is correct |
41 |
Correct |
10 ms |
52060 KB |
Output is correct |
42 |
Correct |
10 ms |
51804 KB |
Output is correct |
43 |
Correct |
10 ms |
51804 KB |
Output is correct |
44 |
Correct |
10 ms |
51820 KB |
Output is correct |
45 |
Correct |
10 ms |
51800 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
52016 KB |
Output is correct |
2 |
Correct |
10 ms |
51800 KB |
Output is correct |
3 |
Correct |
10 ms |
51808 KB |
Output is correct |
4 |
Correct |
12 ms |
52004 KB |
Output is correct |
5 |
Correct |
10 ms |
51804 KB |
Output is correct |
6 |
Correct |
12 ms |
51844 KB |
Output is correct |
7 |
Correct |
10 ms |
51804 KB |
Output is correct |
8 |
Correct |
10 ms |
51804 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
51804 KB |
Output is correct |
2 |
Correct |
10 ms |
51932 KB |
Output is correct |
3 |
Correct |
10 ms |
51924 KB |
Output is correct |
4 |
Correct |
11 ms |
51804 KB |
Output is correct |
5 |
Correct |
10 ms |
51804 KB |
Output is correct |
6 |
Correct |
10 ms |
51836 KB |
Output is correct |
7 |
Correct |
10 ms |
51804 KB |
Output is correct |
8 |
Correct |
10 ms |
51804 KB |
Output is correct |
9 |
Correct |
10 ms |
51804 KB |
Output is correct |
10 |
Correct |
10 ms |
51804 KB |
Output is correct |
11 |
Correct |
10 ms |
51804 KB |
Output is correct |
12 |
Correct |
9 ms |
51800 KB |
Output is correct |
13 |
Correct |
10 ms |
51932 KB |
Output is correct |
14 |
Correct |
10 ms |
51832 KB |
Output is correct |
15 |
Correct |
10 ms |
51804 KB |
Output is correct |
16 |
Correct |
11 ms |
51804 KB |
Output is correct |
17 |
Correct |
10 ms |
51844 KB |
Output is correct |
18 |
Correct |
10 ms |
51804 KB |
Output is correct |
19 |
Correct |
10 ms |
51836 KB |
Output is correct |
20 |
Correct |
10 ms |
51804 KB |
Output is correct |
21 |
Correct |
10 ms |
51804 KB |
Output is correct |
22 |
Correct |
10 ms |
51804 KB |
Output is correct |
23 |
Correct |
10 ms |
51920 KB |
Output is correct |
24 |
Correct |
10 ms |
51804 KB |
Output is correct |
25 |
Correct |
10 ms |
51804 KB |
Output is correct |
26 |
Correct |
10 ms |
52056 KB |
Output is correct |
27 |
Correct |
10 ms |
51800 KB |
Output is correct |
28 |
Correct |
10 ms |
51804 KB |
Output is correct |
29 |
Correct |
10 ms |
51936 KB |
Output is correct |
30 |
Correct |
10 ms |
51864 KB |
Output is correct |
31 |
Correct |
10 ms |
51804 KB |
Output is correct |
32 |
Correct |
11 ms |
51932 KB |
Output is correct |
33 |
Correct |
10 ms |
52056 KB |
Output is correct |
34 |
Correct |
10 ms |
51804 KB |
Output is correct |
35 |
Correct |
10 ms |
51800 KB |
Output is correct |
36 |
Correct |
10 ms |
51804 KB |
Output is correct |
37 |
Correct |
10 ms |
51800 KB |
Output is correct |
38 |
Correct |
10 ms |
51804 KB |
Output is correct |
39 |
Correct |
11 ms |
51804 KB |
Output is correct |
40 |
Correct |
10 ms |
51804 KB |
Output is correct |
41 |
Correct |
10 ms |
52060 KB |
Output is correct |
42 |
Correct |
10 ms |
51804 KB |
Output is correct |
43 |
Correct |
10 ms |
51804 KB |
Output is correct |
44 |
Correct |
10 ms |
51820 KB |
Output is correct |
45 |
Correct |
10 ms |
51800 KB |
Output is correct |
46 |
Correct |
10 ms |
52016 KB |
Output is correct |
47 |
Correct |
10 ms |
51800 KB |
Output is correct |
48 |
Correct |
10 ms |
51808 KB |
Output is correct |
49 |
Correct |
12 ms |
52004 KB |
Output is correct |
50 |
Correct |
10 ms |
51804 KB |
Output is correct |
51 |
Correct |
12 ms |
51844 KB |
Output is correct |
52 |
Correct |
10 ms |
51804 KB |
Output is correct |
53 |
Correct |
10 ms |
51804 KB |
Output is correct |
54 |
Correct |
10 ms |
51804 KB |
Output is correct |
55 |
Correct |
10 ms |
51804 KB |
Output is correct |
56 |
Correct |
11 ms |
51804 KB |
Output is correct |
57 |
Correct |
11 ms |
51804 KB |
Output is correct |
58 |
Correct |
11 ms |
51804 KB |
Output is correct |
59 |
Correct |
10 ms |
51804 KB |
Output is correct |
60 |
Correct |
12 ms |
51988 KB |
Output is correct |
61 |
Correct |
10 ms |
51804 KB |
Output is correct |
62 |
Correct |
10 ms |
51804 KB |
Output is correct |
63 |
Correct |
10 ms |
51800 KB |
Output is correct |
64 |
Correct |
10 ms |
52008 KB |
Output is correct |
65 |
Correct |
10 ms |
51800 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
51804 KB |
Output is correct |
2 |
Correct |
10 ms |
51932 KB |
Output is correct |
3 |
Correct |
10 ms |
51924 KB |
Output is correct |
4 |
Correct |
11 ms |
51804 KB |
Output is correct |
5 |
Correct |
10 ms |
51804 KB |
Output is correct |
6 |
Correct |
10 ms |
51836 KB |
Output is correct |
7 |
Correct |
10 ms |
51804 KB |
Output is correct |
8 |
Correct |
10 ms |
51804 KB |
Output is correct |
9 |
Correct |
10 ms |
51804 KB |
Output is correct |
10 |
Correct |
10 ms |
51804 KB |
Output is correct |
11 |
Correct |
10 ms |
51804 KB |
Output is correct |
12 |
Correct |
9 ms |
51800 KB |
Output is correct |
13 |
Correct |
10 ms |
51932 KB |
Output is correct |
14 |
Correct |
10 ms |
51832 KB |
Output is correct |
15 |
Correct |
10 ms |
51804 KB |
Output is correct |
16 |
Correct |
11 ms |
51804 KB |
Output is correct |
17 |
Correct |
10 ms |
51844 KB |
Output is correct |
18 |
Correct |
10 ms |
51804 KB |
Output is correct |
19 |
Correct |
10 ms |
51836 KB |
Output is correct |
20 |
Correct |
10 ms |
51804 KB |
Output is correct |
21 |
Correct |
10 ms |
51804 KB |
Output is correct |
22 |
Correct |
10 ms |
51804 KB |
Output is correct |
23 |
Correct |
10 ms |
51920 KB |
Output is correct |
24 |
Correct |
10 ms |
51804 KB |
Output is correct |
25 |
Correct |
10 ms |
51804 KB |
Output is correct |
26 |
Correct |
10 ms |
52056 KB |
Output is correct |
27 |
Correct |
10 ms |
51800 KB |
Output is correct |
28 |
Correct |
10 ms |
51804 KB |
Output is correct |
29 |
Correct |
10 ms |
51936 KB |
Output is correct |
30 |
Correct |
10 ms |
51864 KB |
Output is correct |
31 |
Correct |
10 ms |
51804 KB |
Output is correct |
32 |
Correct |
11 ms |
51932 KB |
Output is correct |
33 |
Correct |
10 ms |
52056 KB |
Output is correct |
34 |
Correct |
10 ms |
51804 KB |
Output is correct |
35 |
Correct |
10 ms |
51800 KB |
Output is correct |
36 |
Correct |
10 ms |
51804 KB |
Output is correct |
37 |
Correct |
10 ms |
51800 KB |
Output is correct |
38 |
Correct |
10 ms |
51804 KB |
Output is correct |
39 |
Correct |
11 ms |
51804 KB |
Output is correct |
40 |
Correct |
10 ms |
51804 KB |
Output is correct |
41 |
Correct |
10 ms |
52060 KB |
Output is correct |
42 |
Correct |
10 ms |
51804 KB |
Output is correct |
43 |
Correct |
10 ms |
51804 KB |
Output is correct |
44 |
Correct |
10 ms |
51820 KB |
Output is correct |
45 |
Correct |
10 ms |
51800 KB |
Output is correct |
46 |
Correct |
10 ms |
52016 KB |
Output is correct |
47 |
Correct |
10 ms |
51800 KB |
Output is correct |
48 |
Correct |
10 ms |
51808 KB |
Output is correct |
49 |
Correct |
12 ms |
52004 KB |
Output is correct |
50 |
Correct |
10 ms |
51804 KB |
Output is correct |
51 |
Correct |
12 ms |
51844 KB |
Output is correct |
52 |
Correct |
10 ms |
51804 KB |
Output is correct |
53 |
Correct |
10 ms |
51804 KB |
Output is correct |
54 |
Correct |
10 ms |
51804 KB |
Output is correct |
55 |
Correct |
10 ms |
51804 KB |
Output is correct |
56 |
Correct |
11 ms |
51804 KB |
Output is correct |
57 |
Correct |
11 ms |
51804 KB |
Output is correct |
58 |
Correct |
11 ms |
51804 KB |
Output is correct |
59 |
Correct |
10 ms |
51804 KB |
Output is correct |
60 |
Correct |
12 ms |
51988 KB |
Output is correct |
61 |
Correct |
10 ms |
51804 KB |
Output is correct |
62 |
Correct |
10 ms |
51804 KB |
Output is correct |
63 |
Correct |
10 ms |
51800 KB |
Output is correct |
64 |
Correct |
10 ms |
52008 KB |
Output is correct |
65 |
Correct |
10 ms |
51800 KB |
Output is correct |
66 |
Correct |
20 ms |
53852 KB |
Output is correct |
67 |
Correct |
19 ms |
54104 KB |
Output is correct |
68 |
Correct |
19 ms |
54108 KB |
Output is correct |
69 |
Correct |
41 ms |
53596 KB |
Output is correct |
70 |
Correct |
30 ms |
53592 KB |
Output is correct |
71 |
Correct |
25 ms |
53592 KB |
Output is correct |
72 |
Correct |
21 ms |
53852 KB |
Output is correct |
73 |
Correct |
23 ms |
53980 KB |
Output is correct |
74 |
Correct |
26 ms |
53848 KB |
Output is correct |
75 |
Correct |
29 ms |
53852 KB |
Output is correct |
76 |
Correct |
25 ms |
53852 KB |
Output is correct |
77 |
Correct |
24 ms |
53852 KB |
Output is correct |
78 |
Correct |
22 ms |
54108 KB |
Output is correct |
79 |
Correct |
22 ms |
53852 KB |
Output is correct |
80 |
Correct |
21 ms |
54140 KB |
Output is correct |
81 |
Correct |
24 ms |
54052 KB |
Output is correct |
82 |
Correct |
26 ms |
53980 KB |
Output is correct |
83 |
Correct |
27 ms |
53752 KB |
Output is correct |
84 |
Correct |
21 ms |
53596 KB |
Output is correct |
85 |
Correct |
21 ms |
53596 KB |
Output is correct |
86 |
Correct |
23 ms |
53620 KB |
Output is correct |
87 |
Correct |
20 ms |
53596 KB |
Output is correct |
88 |
Correct |
24 ms |
54016 KB |
Output is correct |
89 |
Correct |
28 ms |
53852 KB |
Output is correct |
90 |
Correct |
27 ms |
53848 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
51804 KB |
Output is correct |
2 |
Correct |
10 ms |
51932 KB |
Output is correct |
3 |
Correct |
10 ms |
51924 KB |
Output is correct |
4 |
Correct |
11 ms |
51804 KB |
Output is correct |
5 |
Correct |
10 ms |
51804 KB |
Output is correct |
6 |
Correct |
10 ms |
51836 KB |
Output is correct |
7 |
Correct |
10 ms |
51804 KB |
Output is correct |
8 |
Correct |
10 ms |
51804 KB |
Output is correct |
9 |
Correct |
10 ms |
51804 KB |
Output is correct |
10 |
Correct |
10 ms |
51804 KB |
Output is correct |
11 |
Correct |
10 ms |
51804 KB |
Output is correct |
12 |
Correct |
9 ms |
51800 KB |
Output is correct |
13 |
Correct |
10 ms |
51932 KB |
Output is correct |
14 |
Correct |
10 ms |
51832 KB |
Output is correct |
15 |
Correct |
10 ms |
51804 KB |
Output is correct |
16 |
Correct |
11 ms |
51804 KB |
Output is correct |
17 |
Correct |
10 ms |
51844 KB |
Output is correct |
18 |
Correct |
10 ms |
51804 KB |
Output is correct |
19 |
Correct |
10 ms |
51836 KB |
Output is correct |
20 |
Correct |
10 ms |
51804 KB |
Output is correct |
21 |
Correct |
10 ms |
51804 KB |
Output is correct |
22 |
Correct |
10 ms |
51804 KB |
Output is correct |
23 |
Correct |
10 ms |
51920 KB |
Output is correct |
24 |
Correct |
10 ms |
51804 KB |
Output is correct |
25 |
Correct |
10 ms |
51804 KB |
Output is correct |
26 |
Correct |
10 ms |
52056 KB |
Output is correct |
27 |
Correct |
10 ms |
51800 KB |
Output is correct |
28 |
Correct |
10 ms |
51804 KB |
Output is correct |
29 |
Correct |
10 ms |
51936 KB |
Output is correct |
30 |
Correct |
10 ms |
51864 KB |
Output is correct |
31 |
Correct |
10 ms |
51804 KB |
Output is correct |
32 |
Correct |
11 ms |
51932 KB |
Output is correct |
33 |
Correct |
10 ms |
52056 KB |
Output is correct |
34 |
Correct |
10 ms |
51804 KB |
Output is correct |
35 |
Correct |
10 ms |
51800 KB |
Output is correct |
36 |
Correct |
10 ms |
51804 KB |
Output is correct |
37 |
Correct |
10 ms |
51800 KB |
Output is correct |
38 |
Correct |
10 ms |
51804 KB |
Output is correct |
39 |
Correct |
11 ms |
51804 KB |
Output is correct |
40 |
Correct |
10 ms |
51804 KB |
Output is correct |
41 |
Correct |
10 ms |
52060 KB |
Output is correct |
42 |
Correct |
10 ms |
51804 KB |
Output is correct |
43 |
Correct |
10 ms |
51804 KB |
Output is correct |
44 |
Correct |
10 ms |
51820 KB |
Output is correct |
45 |
Correct |
10 ms |
51800 KB |
Output is correct |
46 |
Correct |
10 ms |
52016 KB |
Output is correct |
47 |
Correct |
10 ms |
51800 KB |
Output is correct |
48 |
Correct |
10 ms |
51808 KB |
Output is correct |
49 |
Correct |
12 ms |
52004 KB |
Output is correct |
50 |
Correct |
10 ms |
51804 KB |
Output is correct |
51 |
Correct |
12 ms |
51844 KB |
Output is correct |
52 |
Correct |
10 ms |
51804 KB |
Output is correct |
53 |
Correct |
10 ms |
51804 KB |
Output is correct |
54 |
Correct |
10 ms |
51804 KB |
Output is correct |
55 |
Correct |
10 ms |
51804 KB |
Output is correct |
56 |
Correct |
11 ms |
51804 KB |
Output is correct |
57 |
Correct |
11 ms |
51804 KB |
Output is correct |
58 |
Correct |
11 ms |
51804 KB |
Output is correct |
59 |
Correct |
10 ms |
51804 KB |
Output is correct |
60 |
Correct |
12 ms |
51988 KB |
Output is correct |
61 |
Correct |
10 ms |
51804 KB |
Output is correct |
62 |
Correct |
10 ms |
51804 KB |
Output is correct |
63 |
Correct |
10 ms |
51800 KB |
Output is correct |
64 |
Correct |
10 ms |
52008 KB |
Output is correct |
65 |
Correct |
10 ms |
51800 KB |
Output is correct |
66 |
Correct |
1037 ms |
107196 KB |
Output is correct |
67 |
Correct |
1349 ms |
123248 KB |
Output is correct |
68 |
Correct |
1334 ms |
126668 KB |
Output is correct |
69 |
Correct |
1467 ms |
121540 KB |
Output is correct |
70 |
Correct |
2056 ms |
122372 KB |
Output is correct |
71 |
Correct |
1353 ms |
126844 KB |
Output is correct |
72 |
Correct |
1329 ms |
126288 KB |
Output is correct |
73 |
Correct |
2011 ms |
122372 KB |
Output is correct |
74 |
Correct |
1276 ms |
126748 KB |
Output is correct |
75 |
Correct |
1357 ms |
126440 KB |
Output is correct |
76 |
Correct |
2045 ms |
122188 KB |
Output is correct |
77 |
Correct |
1430 ms |
126828 KB |
Output is correct |
78 |
Correct |
1581 ms |
122164 KB |
Output is correct |
79 |
Correct |
1580 ms |
121864 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
51804 KB |
Output is correct |
2 |
Correct |
10 ms |
51932 KB |
Output is correct |
3 |
Correct |
10 ms |
51924 KB |
Output is correct |
4 |
Correct |
11 ms |
51804 KB |
Output is correct |
5 |
Correct |
10 ms |
51804 KB |
Output is correct |
6 |
Correct |
10 ms |
51836 KB |
Output is correct |
7 |
Correct |
10 ms |
51804 KB |
Output is correct |
8 |
Correct |
10 ms |
51804 KB |
Output is correct |
9 |
Correct |
10 ms |
51804 KB |
Output is correct |
10 |
Correct |
10 ms |
51804 KB |
Output is correct |
11 |
Correct |
10 ms |
51804 KB |
Output is correct |
12 |
Correct |
9 ms |
51800 KB |
Output is correct |
13 |
Correct |
10 ms |
51932 KB |
Output is correct |
14 |
Correct |
10 ms |
51832 KB |
Output is correct |
15 |
Correct |
10 ms |
51804 KB |
Output is correct |
16 |
Correct |
11 ms |
51804 KB |
Output is correct |
17 |
Correct |
10 ms |
51844 KB |
Output is correct |
18 |
Correct |
10 ms |
51804 KB |
Output is correct |
19 |
Correct |
10 ms |
51836 KB |
Output is correct |
20 |
Correct |
10 ms |
51804 KB |
Output is correct |
21 |
Correct |
10 ms |
51804 KB |
Output is correct |
22 |
Correct |
10 ms |
51804 KB |
Output is correct |
23 |
Correct |
10 ms |
51920 KB |
Output is correct |
24 |
Correct |
10 ms |
51804 KB |
Output is correct |
25 |
Correct |
10 ms |
51804 KB |
Output is correct |
26 |
Correct |
10 ms |
52056 KB |
Output is correct |
27 |
Correct |
10 ms |
51800 KB |
Output is correct |
28 |
Correct |
10 ms |
51804 KB |
Output is correct |
29 |
Correct |
10 ms |
51936 KB |
Output is correct |
30 |
Correct |
10 ms |
51864 KB |
Output is correct |
31 |
Correct |
10 ms |
51804 KB |
Output is correct |
32 |
Correct |
11 ms |
51932 KB |
Output is correct |
33 |
Correct |
10 ms |
52056 KB |
Output is correct |
34 |
Correct |
10 ms |
51804 KB |
Output is correct |
35 |
Correct |
10 ms |
51800 KB |
Output is correct |
36 |
Correct |
10 ms |
51804 KB |
Output is correct |
37 |
Correct |
10 ms |
51800 KB |
Output is correct |
38 |
Correct |
10 ms |
51804 KB |
Output is correct |
39 |
Correct |
11 ms |
51804 KB |
Output is correct |
40 |
Correct |
10 ms |
51804 KB |
Output is correct |
41 |
Correct |
10 ms |
52060 KB |
Output is correct |
42 |
Correct |
10 ms |
51804 KB |
Output is correct |
43 |
Correct |
10 ms |
51804 KB |
Output is correct |
44 |
Correct |
10 ms |
51820 KB |
Output is correct |
45 |
Correct |
10 ms |
51800 KB |
Output is correct |
46 |
Correct |
10 ms |
52016 KB |
Output is correct |
47 |
Correct |
10 ms |
51800 KB |
Output is correct |
48 |
Correct |
10 ms |
51808 KB |
Output is correct |
49 |
Correct |
12 ms |
52004 KB |
Output is correct |
50 |
Correct |
10 ms |
51804 KB |
Output is correct |
51 |
Correct |
12 ms |
51844 KB |
Output is correct |
52 |
Correct |
10 ms |
51804 KB |
Output is correct |
53 |
Correct |
10 ms |
51804 KB |
Output is correct |
54 |
Correct |
10 ms |
51804 KB |
Output is correct |
55 |
Correct |
10 ms |
51804 KB |
Output is correct |
56 |
Correct |
11 ms |
51804 KB |
Output is correct |
57 |
Correct |
11 ms |
51804 KB |
Output is correct |
58 |
Correct |
11 ms |
51804 KB |
Output is correct |
59 |
Correct |
10 ms |
51804 KB |
Output is correct |
60 |
Correct |
12 ms |
51988 KB |
Output is correct |
61 |
Correct |
10 ms |
51804 KB |
Output is correct |
62 |
Correct |
10 ms |
51804 KB |
Output is correct |
63 |
Correct |
10 ms |
51800 KB |
Output is correct |
64 |
Correct |
10 ms |
52008 KB |
Output is correct |
65 |
Correct |
10 ms |
51800 KB |
Output is correct |
66 |
Correct |
20 ms |
53852 KB |
Output is correct |
67 |
Correct |
19 ms |
54104 KB |
Output is correct |
68 |
Correct |
19 ms |
54108 KB |
Output is correct |
69 |
Correct |
41 ms |
53596 KB |
Output is correct |
70 |
Correct |
30 ms |
53592 KB |
Output is correct |
71 |
Correct |
25 ms |
53592 KB |
Output is correct |
72 |
Correct |
21 ms |
53852 KB |
Output is correct |
73 |
Correct |
23 ms |
53980 KB |
Output is correct |
74 |
Correct |
26 ms |
53848 KB |
Output is correct |
75 |
Correct |
29 ms |
53852 KB |
Output is correct |
76 |
Correct |
25 ms |
53852 KB |
Output is correct |
77 |
Correct |
24 ms |
53852 KB |
Output is correct |
78 |
Correct |
22 ms |
54108 KB |
Output is correct |
79 |
Correct |
22 ms |
53852 KB |
Output is correct |
80 |
Correct |
21 ms |
54140 KB |
Output is correct |
81 |
Correct |
24 ms |
54052 KB |
Output is correct |
82 |
Correct |
26 ms |
53980 KB |
Output is correct |
83 |
Correct |
27 ms |
53752 KB |
Output is correct |
84 |
Correct |
21 ms |
53596 KB |
Output is correct |
85 |
Correct |
21 ms |
53596 KB |
Output is correct |
86 |
Correct |
23 ms |
53620 KB |
Output is correct |
87 |
Correct |
20 ms |
53596 KB |
Output is correct |
88 |
Correct |
24 ms |
54016 KB |
Output is correct |
89 |
Correct |
28 ms |
53852 KB |
Output is correct |
90 |
Correct |
27 ms |
53848 KB |
Output is correct |
91 |
Correct |
1037 ms |
107196 KB |
Output is correct |
92 |
Correct |
1349 ms |
123248 KB |
Output is correct |
93 |
Correct |
1334 ms |
126668 KB |
Output is correct |
94 |
Correct |
1467 ms |
121540 KB |
Output is correct |
95 |
Correct |
2056 ms |
122372 KB |
Output is correct |
96 |
Correct |
1353 ms |
126844 KB |
Output is correct |
97 |
Correct |
1329 ms |
126288 KB |
Output is correct |
98 |
Correct |
2011 ms |
122372 KB |
Output is correct |
99 |
Correct |
1276 ms |
126748 KB |
Output is correct |
100 |
Correct |
1357 ms |
126440 KB |
Output is correct |
101 |
Correct |
2045 ms |
122188 KB |
Output is correct |
102 |
Correct |
1430 ms |
126828 KB |
Output is correct |
103 |
Correct |
1581 ms |
122164 KB |
Output is correct |
104 |
Correct |
1580 ms |
121864 KB |
Output is correct |
105 |
Correct |
2152 ms |
96508 KB |
Output is correct |
106 |
Correct |
3212 ms |
107944 KB |
Output is correct |
107 |
Correct |
3003 ms |
108204 KB |
Output is correct |
108 |
Correct |
2829 ms |
108408 KB |
Output is correct |
109 |
Correct |
2025 ms |
110240 KB |
Output is correct |
110 |
Correct |
1441 ms |
119328 KB |
Output is correct |
111 |
Correct |
1338 ms |
126684 KB |
Output is correct |
112 |
Correct |
1324 ms |
125216 KB |
Output is correct |
113 |
Correct |
1371 ms |
125172 KB |
Output is correct |
114 |
Correct |
2913 ms |
114756 KB |
Output is correct |
115 |
Correct |
1925 ms |
122320 KB |
Output is correct |
116 |
Correct |
1318 ms |
125216 KB |
Output is correct |
117 |
Correct |
1357 ms |
125172 KB |
Output is correct |
118 |
Correct |
2212 ms |
118952 KB |
Output is correct |
119 |
Correct |
2074 ms |
122316 KB |
Output is correct |
120 |
Correct |
1253 ms |
125072 KB |
Output is correct |
121 |
Correct |
1325 ms |
126304 KB |
Output is correct |
122 |
Correct |
1544 ms |
124548 KB |
Output is correct |
123 |
Correct |
1699 ms |
121744 KB |
Output is correct |
124 |
Correct |
2093 ms |
122460 KB |
Output is correct |
125 |
Correct |
941 ms |
115116 KB |
Output is correct |
126 |
Correct |
1067 ms |
109700 KB |
Output is correct |
127 |
Correct |
1442 ms |
108968 KB |
Output is correct |
128 |
Correct |
1856 ms |
108984 KB |
Output is correct |
129 |
Correct |
1089 ms |
111696 KB |
Output is correct |