/**
/**
____ ____ ____ ____ ____ ____
||l |||e |||i |||n |||a |||d ||
||__|||__|||__|||__|||__|||__||
|/__\|/__\|/__\|/__\|/__\|/__\|
**/
#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
typedef long long ll;
void speed()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
}
const int maxn = 1e5 + 10;
const int inf = 2e9;
struct point
{
int x, y;
} p[maxn];
int n, used[maxn], dir[maxn];
/**
directions:
0 - north
1 - east
2 - south
3 - west
*/
struct collision
{
int idx1, idx2, tp;
collision(int _idx1, int _idx2, int _tp)
{
idx1 = _idx1;
idx2 = _idx2;
tp = _tp;
}
bool operator < (const collision &c) const
{
if (tp != c.tp)
return tp < c.tp;
if (min(idx2, idx1) != min(c.idx1, c.idx2))
return min(idx2, idx1) < min(c.idx1, c.idx2);
return max(idx1, idx2 ) < max(c.idx1, c.idx2);
}
};
bool cmp(collision c1, collision c2)
{
return c1.tp < c2.tp;
}
unordered_map < int, set < pair < int, int > > > mdig[4], fdig[4];
unordered_map < int, set < pair < int, int > > > mrow[4], fcol[4];
set < collision > event;
int get_collision_time(int i, int j)
{
if (p[i].x == p[j].x)
{
return abs(p[j].y - p[i].y);
}
if (p[i].y == p[j].y)
{
return abs(p[i].x - p[j].x);
}
return 2 * abs(p[i].x - p[j].x);
}
void get_next_collsion(int id)
{
int md = p[id].y - p[id].x;
int fd = p[id].x + p[id].y;
collision nxt(0,0, inf);
set < pair < int, int > > :: iterator it;
int dist = (used[id] + 1) / 2;
if (dir[id] == 0)
{
it = mdig[3][md].lower_bound({p[id].x + dist, -inf});
if (it != mdig[3][md].end())
{
collision cur(id, it -> second, get_collision_time(id, it -> second));
nxt = min(nxt, cur);
}
it = fdig[1][fd].lower_bound({p[id].x - dist, inf});
if (it != fdig[1][fd].begin())
{
it = prev(it);
collision cur(id, it -> second, get_collision_time(id, it -> second));
nxt = min(nxt, cur);
}
it = fcol[2][p[id].x].lower_bound({p[id].y + used[id], -inf});
if (it != fcol[2][p[id].x].end())
{
collision cur(id, it -> second, get_collision_time(id, it -> second));
nxt = min(nxt, cur);
}
}
if (dir[id] == 1)
{
it = mdig[2][md].lower_bound({p[id].x + dist, - inf});
if (it != mdig[2][md].end())
{
collision cur(id, it -> second, get_collision_time(id, it -> second));
nxt = min(nxt, cur);
}
it = fdig[0][fd].lower_bound({p[id].x + dist, -inf});
if (it != fdig[0][fd].end())
{
collision cur(id, it -> second, get_collision_time(id, it -> second));
nxt = min(nxt, cur);
}
it = mrow[3][p[id].y].lower_bound({p[id].x + used[id], -inf});
if (it != mrow[3][p[id].y].end())
{
collision cur(id, it -> second, get_collision_time(id, it -> second));
nxt = min(nxt, cur);
}
}
if (dir[id] == 2)
{
it = mdig[1][md].lower_bound({p[id].x - dist, inf});
if (it != mdig[1][md].begin())
{
it = prev(it);
collision cur(id, it -> second, get_collision_time(id, it -> second));
nxt = min(nxt, cur);
}
it = fdig[3][fd].lower_bound({p[id].x + dist, -inf});
if (it != fdig[3][fd].end())
{
collision cur(id, it -> second, get_collision_time(id, it -> second));
nxt = min(nxt, cur);
}
it = fcol[0][p[id].x].lower_bound({p[id].y - used[id], inf});
if (it != fcol[0][p[id].x].begin())
{
it = prev(it);
collision cur(id, it -> second, get_collision_time(id, it -> second));
nxt = min(nxt, cur);
}
}
if (dir[id] == 3)
{
it = mdig[0][md].lower_bound({p[id].x - dist, inf});
if (it != mdig[0][md].begin())
{
it = prev(it);
collision cur(id, it -> second, get_collision_time(id, it -> second));
nxt = min(nxt, cur);
}
it = fdig[2][fd].lower_bound({p[id].x - dist, inf});
if (it != fdig[2][fd].begin())
{
it = prev(it);
collision cur(id, it -> second, get_collision_time(id, it -> second));
nxt = min(nxt, cur);
}
it = mrow[1][p[id].y].lower_bound({p[id].x - used[id], inf});
if (it != mrow[1][p[id].y].begin())
{
it = prev(it);
collision cur(id, it -> second, get_collision_time(id, it -> second));
nxt = min(nxt, cur);
}
}
///cout << "next collision " << id << " " << nxt.idx2 << " " << nxt.tp << endl;
if (nxt.tp != inf)
event.insert(nxt);
}
void add_point(int i)
{
mdig[dir[i]][p[i].y - p[i].x].insert({p[i].x, i});
fdig[dir[i]][p[i].y + p[i].x].insert({p[i].x, i});
mrow[dir[i]][p[i].y].insert({p[i].x, i});
fcol[dir[i]][p[i].x].insert({p[i].y, i});
}
void rem_point(int i)
{
mdig[dir[i]][p[i].y - p[i].x].erase({p[i].x, i});
fdig[dir[i]][p[i].y + p[i].x].erase({p[i].x, i});
mrow[dir[i]][p[i].y].erase({p[i].x, i});
fcol[dir[i]][p[i].x].erase({p[i].y, i});
}
int simulate()
{
for (int i = 0; i < 4; i ++)
{
mdig[i].clear();
fdig[i].clear();
mrow[i].clear();
fcol[i].clear();
}
event.clear();
dir[1] = 1;
for (int i = 2; i <= n; i ++)
{
if (p[i].x > 0 && p[i].y > 0)
{
if (p[i].x > p[i].y)
dir[i] = 3;
else
dir[i] = 2;
}
else if (p[i].x > 0 && p[i].y < 0)
{
if (p[i].x > abs(p[i].y))
dir[i] = 3;
else
dir[i] = 0;
}
else if (p[i].x < 0 && p[i].y > 0)
{
if (abs(p[i].x) < p[i].y)
dir[i] = 2;
else
dir[i] = 1;
}
else if (p[i].x < 0 && p[i].y < 0)
{
if (abs(p[i].x) < abs(p[i].y))
dir[i] = 0;
else
dir[i] = 1;
}
else
{
if (p[i].x == 0)
{
if (p[i].y > 0)
dir[i] = 2;
else
dir[i] = 0;
}
else
{
if (p[i].x > 0)
dir[i] = 3;
else
dir[i] = 1;
}
}
add_point(i);
}
for (int i = 1; i <= n; i ++)
{
used[i] = -1;
}
used[1] = 0;
get_next_collsion(1);
int ans = 1;
while(!event.empty())
{
collision cur = *event.begin();
event.erase(event.begin());
if (used[cur.idx1] != -1 && used[cur.idx2] != -1)
{
get_next_collsion(cur.idx1);
continue;
}
///cout << "collision " << cur.idx1 << " " << cur.idx2 << " " << cur.tp << endl;
used[cur.idx2] = cur.tp;
ans ++;
rem_point(cur.idx2);
get_next_collsion(cur.idx1);
get_next_collsion(cur.idx2);
}
///cout << ans << endl;
///exit(0);
return ans;
}
void perform90()
{
for (int i = 1; i <= n; i ++)
{
int nx = p[i].y, ny = - p[i].x;
p[i].x = nx;
p[i].y = ny;
}
}
void solve()
{
cin >> n;
for (int i = 1; i <= n; i ++)
{
cin >> p[i].x >> p[i].y;
if (i != 1)
{
p[i].x -= p[1].x;
p[i].y -= p[1].y;
}
}
p[1].x = p[1].y = 0;
int ans = 0;
/**perform90();
perform90();
perform90();
simulate();*/
for (int d = 0; d < 4; d ++)
{
ans = max(ans, simulate());
perform90();
}
cout << ans << endl;
}
int main()
{
speed();
solve();
return 0;
}
/**
15
107 139
114 146
105 137
88 120
130 130
112 148
123 123
93 93
128 128
113 113
106 140
99 147
146 100
108 142
115 135
7
64 52
68 56
65 53
62 62
44 44
60 60
59 59
3
0 0
1 1
-1 3
15
0 0
7 7
-2 -2
-19 -19
23 -9
5 9
16 -16
-14 -46
21 -11
6 -26
-1 1
-8 8
39 -39
1 3
8 -4
collision 1 3 4
collision 2 3 18
collision 1 7 32
collision 2 5 32
collision 11 7 34
collision 5 10 34
collision 6 5 36
collision 1 4 38
collision 12 7 48
collision 7 8 60
collision 9 8 70
collision 1 13 78
*/
Compilation message
fever.cpp:2:1: warning: "/*" within comment [-Wcomment]
2 | /**
|
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
544 KB |
Output is correct |
5 |
Correct |
0 ms |
600 KB |
Output is correct |
6 |
Correct |
1 ms |
344 KB |
Output is correct |
7 |
Correct |
0 ms |
344 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
344 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
1 ms |
344 KB |
Output is correct |
13 |
Correct |
1 ms |
344 KB |
Output is correct |
14 |
Correct |
0 ms |
344 KB |
Output is correct |
15 |
Correct |
1 ms |
344 KB |
Output is correct |
16 |
Correct |
1 ms |
344 KB |
Output is correct |
17 |
Correct |
0 ms |
344 KB |
Output is correct |
18 |
Correct |
1 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
1 ms |
344 KB |
Output is correct |
22 |
Correct |
0 ms |
516 KB |
Output is correct |
23 |
Correct |
0 ms |
344 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
344 KB |
Output is correct |
27 |
Correct |
0 ms |
344 KB |
Output is correct |
28 |
Correct |
1 ms |
344 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
344 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
544 KB |
Output is correct |
5 |
Correct |
0 ms |
600 KB |
Output is correct |
6 |
Correct |
1 ms |
344 KB |
Output is correct |
7 |
Correct |
0 ms |
344 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
344 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
1 ms |
344 KB |
Output is correct |
13 |
Correct |
1 ms |
344 KB |
Output is correct |
14 |
Correct |
0 ms |
344 KB |
Output is correct |
15 |
Correct |
1 ms |
344 KB |
Output is correct |
16 |
Correct |
1 ms |
344 KB |
Output is correct |
17 |
Correct |
0 ms |
344 KB |
Output is correct |
18 |
Correct |
1 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
1 ms |
344 KB |
Output is correct |
22 |
Correct |
0 ms |
516 KB |
Output is correct |
23 |
Correct |
0 ms |
344 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
344 KB |
Output is correct |
27 |
Correct |
0 ms |
344 KB |
Output is correct |
28 |
Correct |
1 ms |
344 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
344 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
344 KB |
Output is correct |
33 |
Correct |
0 ms |
344 KB |
Output is correct |
34 |
Correct |
0 ms |
344 KB |
Output is correct |
35 |
Correct |
0 ms |
344 KB |
Output is correct |
36 |
Correct |
0 ms |
356 KB |
Output is correct |
37 |
Correct |
1 ms |
344 KB |
Output is correct |
38 |
Correct |
1 ms |
344 KB |
Output is correct |
39 |
Correct |
0 ms |
344 KB |
Output is correct |
40 |
Correct |
1 ms |
344 KB |
Output is correct |
41 |
Correct |
1 ms |
344 KB |
Output is correct |
42 |
Correct |
1 ms |
344 KB |
Output is correct |
43 |
Correct |
1 ms |
600 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
1 ms |
344 KB |
Output is correct |
4 |
Correct |
0 ms |
344 KB |
Output is correct |
5 |
Correct |
1 ms |
344 KB |
Output is correct |
6 |
Correct |
1 ms |
344 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
1 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
544 KB |
Output is correct |
5 |
Correct |
0 ms |
600 KB |
Output is correct |
6 |
Correct |
1 ms |
344 KB |
Output is correct |
7 |
Correct |
0 ms |
344 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
344 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
1 ms |
344 KB |
Output is correct |
13 |
Correct |
1 ms |
344 KB |
Output is correct |
14 |
Correct |
0 ms |
344 KB |
Output is correct |
15 |
Correct |
1 ms |
344 KB |
Output is correct |
16 |
Correct |
1 ms |
344 KB |
Output is correct |
17 |
Correct |
0 ms |
344 KB |
Output is correct |
18 |
Correct |
1 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
1 ms |
344 KB |
Output is correct |
22 |
Correct |
0 ms |
516 KB |
Output is correct |
23 |
Correct |
0 ms |
344 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
344 KB |
Output is correct |
27 |
Correct |
0 ms |
344 KB |
Output is correct |
28 |
Correct |
1 ms |
344 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
344 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
344 KB |
Output is correct |
33 |
Correct |
0 ms |
344 KB |
Output is correct |
34 |
Correct |
0 ms |
344 KB |
Output is correct |
35 |
Correct |
0 ms |
344 KB |
Output is correct |
36 |
Correct |
0 ms |
356 KB |
Output is correct |
37 |
Correct |
1 ms |
344 KB |
Output is correct |
38 |
Correct |
1 ms |
344 KB |
Output is correct |
39 |
Correct |
0 ms |
344 KB |
Output is correct |
40 |
Correct |
1 ms |
344 KB |
Output is correct |
41 |
Correct |
1 ms |
344 KB |
Output is correct |
42 |
Correct |
1 ms |
344 KB |
Output is correct |
43 |
Correct |
1 ms |
600 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
344 KB |
Output is correct |
46 |
Correct |
1 ms |
344 KB |
Output is correct |
47 |
Correct |
1 ms |
344 KB |
Output is correct |
48 |
Correct |
1 ms |
344 KB |
Output is correct |
49 |
Correct |
0 ms |
344 KB |
Output is correct |
50 |
Correct |
1 ms |
344 KB |
Output is correct |
51 |
Correct |
1 ms |
344 KB |
Output is correct |
52 |
Correct |
1 ms |
348 KB |
Output is correct |
53 |
Correct |
1 ms |
344 KB |
Output is correct |
54 |
Correct |
1 ms |
344 KB |
Output is correct |
55 |
Correct |
0 ms |
348 KB |
Output is correct |
56 |
Correct |
1 ms |
344 KB |
Output is correct |
57 |
Correct |
1 ms |
344 KB |
Output is correct |
58 |
Correct |
1 ms |
344 KB |
Output is correct |
59 |
Correct |
1 ms |
344 KB |
Output is correct |
60 |
Correct |
0 ms |
344 KB |
Output is correct |
61 |
Correct |
1 ms |
344 KB |
Output is correct |
62 |
Correct |
1 ms |
344 KB |
Output is correct |
63 |
Correct |
1 ms |
344 KB |
Output is correct |
64 |
Correct |
1 ms |
344 KB |
Output is correct |
65 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
544 KB |
Output is correct |
5 |
Correct |
0 ms |
600 KB |
Output is correct |
6 |
Correct |
1 ms |
344 KB |
Output is correct |
7 |
Correct |
0 ms |
344 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
344 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
1 ms |
344 KB |
Output is correct |
13 |
Correct |
1 ms |
344 KB |
Output is correct |
14 |
Correct |
0 ms |
344 KB |
Output is correct |
15 |
Correct |
1 ms |
344 KB |
Output is correct |
16 |
Correct |
1 ms |
344 KB |
Output is correct |
17 |
Correct |
0 ms |
344 KB |
Output is correct |
18 |
Correct |
1 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
1 ms |
344 KB |
Output is correct |
22 |
Correct |
0 ms |
516 KB |
Output is correct |
23 |
Correct |
0 ms |
344 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
344 KB |
Output is correct |
27 |
Correct |
0 ms |
344 KB |
Output is correct |
28 |
Correct |
1 ms |
344 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
344 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
344 KB |
Output is correct |
33 |
Correct |
0 ms |
344 KB |
Output is correct |
34 |
Correct |
0 ms |
344 KB |
Output is correct |
35 |
Correct |
0 ms |
344 KB |
Output is correct |
36 |
Correct |
0 ms |
356 KB |
Output is correct |
37 |
Correct |
1 ms |
344 KB |
Output is correct |
38 |
Correct |
1 ms |
344 KB |
Output is correct |
39 |
Correct |
0 ms |
344 KB |
Output is correct |
40 |
Correct |
1 ms |
344 KB |
Output is correct |
41 |
Correct |
1 ms |
344 KB |
Output is correct |
42 |
Correct |
1 ms |
344 KB |
Output is correct |
43 |
Correct |
1 ms |
600 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
344 KB |
Output is correct |
46 |
Correct |
1 ms |
344 KB |
Output is correct |
47 |
Correct |
1 ms |
344 KB |
Output is correct |
48 |
Correct |
1 ms |
344 KB |
Output is correct |
49 |
Correct |
0 ms |
344 KB |
Output is correct |
50 |
Correct |
1 ms |
344 KB |
Output is correct |
51 |
Correct |
1 ms |
344 KB |
Output is correct |
52 |
Correct |
1 ms |
348 KB |
Output is correct |
53 |
Correct |
1 ms |
344 KB |
Output is correct |
54 |
Correct |
1 ms |
344 KB |
Output is correct |
55 |
Correct |
0 ms |
348 KB |
Output is correct |
56 |
Correct |
1 ms |
344 KB |
Output is correct |
57 |
Correct |
1 ms |
344 KB |
Output is correct |
58 |
Correct |
1 ms |
344 KB |
Output is correct |
59 |
Correct |
1 ms |
344 KB |
Output is correct |
60 |
Correct |
0 ms |
344 KB |
Output is correct |
61 |
Correct |
1 ms |
344 KB |
Output is correct |
62 |
Correct |
1 ms |
344 KB |
Output is correct |
63 |
Correct |
1 ms |
344 KB |
Output is correct |
64 |
Correct |
1 ms |
344 KB |
Output is correct |
65 |
Correct |
1 ms |
348 KB |
Output is correct |
66 |
Correct |
9 ms |
2136 KB |
Output is correct |
67 |
Correct |
8 ms |
2136 KB |
Output is correct |
68 |
Correct |
7 ms |
2140 KB |
Output is correct |
69 |
Correct |
23 ms |
1316 KB |
Output is correct |
70 |
Correct |
11 ms |
1368 KB |
Output is correct |
71 |
Correct |
8 ms |
1368 KB |
Output is correct |
72 |
Correct |
8 ms |
2136 KB |
Output is correct |
73 |
Correct |
8 ms |
2392 KB |
Output is correct |
74 |
Correct |
10 ms |
2392 KB |
Output is correct |
75 |
Correct |
30 ms |
2576 KB |
Output is correct |
76 |
Correct |
11 ms |
2136 KB |
Output is correct |
77 |
Correct |
10 ms |
1880 KB |
Output is correct |
78 |
Correct |
8 ms |
2136 KB |
Output is correct |
79 |
Correct |
8 ms |
2136 KB |
Output is correct |
80 |
Correct |
7 ms |
2140 KB |
Output is correct |
81 |
Correct |
8 ms |
2136 KB |
Output is correct |
82 |
Correct |
16 ms |
2396 KB |
Output is correct |
83 |
Correct |
21 ms |
2560 KB |
Output is correct |
84 |
Correct |
6 ms |
1624 KB |
Output is correct |
85 |
Correct |
5 ms |
1112 KB |
Output is correct |
86 |
Correct |
6 ms |
1116 KB |
Output is correct |
87 |
Correct |
5 ms |
1368 KB |
Output is correct |
88 |
Correct |
9 ms |
2396 KB |
Output is correct |
89 |
Correct |
10 ms |
2392 KB |
Output is correct |
90 |
Correct |
9 ms |
2392 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
544 KB |
Output is correct |
5 |
Correct |
0 ms |
600 KB |
Output is correct |
6 |
Correct |
1 ms |
344 KB |
Output is correct |
7 |
Correct |
0 ms |
344 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
344 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
1 ms |
344 KB |
Output is correct |
13 |
Correct |
1 ms |
344 KB |
Output is correct |
14 |
Correct |
0 ms |
344 KB |
Output is correct |
15 |
Correct |
1 ms |
344 KB |
Output is correct |
16 |
Correct |
1 ms |
344 KB |
Output is correct |
17 |
Correct |
0 ms |
344 KB |
Output is correct |
18 |
Correct |
1 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
1 ms |
344 KB |
Output is correct |
22 |
Correct |
0 ms |
516 KB |
Output is correct |
23 |
Correct |
0 ms |
344 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
344 KB |
Output is correct |
27 |
Correct |
0 ms |
344 KB |
Output is correct |
28 |
Correct |
1 ms |
344 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
344 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
344 KB |
Output is correct |
33 |
Correct |
0 ms |
344 KB |
Output is correct |
34 |
Correct |
0 ms |
344 KB |
Output is correct |
35 |
Correct |
0 ms |
344 KB |
Output is correct |
36 |
Correct |
0 ms |
356 KB |
Output is correct |
37 |
Correct |
1 ms |
344 KB |
Output is correct |
38 |
Correct |
1 ms |
344 KB |
Output is correct |
39 |
Correct |
0 ms |
344 KB |
Output is correct |
40 |
Correct |
1 ms |
344 KB |
Output is correct |
41 |
Correct |
1 ms |
344 KB |
Output is correct |
42 |
Correct |
1 ms |
344 KB |
Output is correct |
43 |
Correct |
1 ms |
600 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
344 KB |
Output is correct |
46 |
Correct |
1 ms |
344 KB |
Output is correct |
47 |
Correct |
1 ms |
344 KB |
Output is correct |
48 |
Correct |
1 ms |
344 KB |
Output is correct |
49 |
Correct |
0 ms |
344 KB |
Output is correct |
50 |
Correct |
1 ms |
344 KB |
Output is correct |
51 |
Correct |
1 ms |
344 KB |
Output is correct |
52 |
Correct |
1 ms |
348 KB |
Output is correct |
53 |
Correct |
1 ms |
344 KB |
Output is correct |
54 |
Correct |
1 ms |
344 KB |
Output is correct |
55 |
Correct |
0 ms |
348 KB |
Output is correct |
56 |
Correct |
1 ms |
344 KB |
Output is correct |
57 |
Correct |
1 ms |
344 KB |
Output is correct |
58 |
Correct |
1 ms |
344 KB |
Output is correct |
59 |
Correct |
1 ms |
344 KB |
Output is correct |
60 |
Correct |
0 ms |
344 KB |
Output is correct |
61 |
Correct |
1 ms |
344 KB |
Output is correct |
62 |
Correct |
1 ms |
344 KB |
Output is correct |
63 |
Correct |
1 ms |
344 KB |
Output is correct |
64 |
Correct |
1 ms |
344 KB |
Output is correct |
65 |
Correct |
1 ms |
348 KB |
Output is correct |
66 |
Correct |
782 ms |
46096 KB |
Output is correct |
67 |
Correct |
1097 ms |
57452 KB |
Output is correct |
68 |
Correct |
1247 ms |
64908 KB |
Output is correct |
69 |
Correct |
1035 ms |
62692 KB |
Output is correct |
70 |
Correct |
4700 ms |
68376 KB |
Output is correct |
71 |
Correct |
1110 ms |
58328 KB |
Output is correct |
72 |
Correct |
1131 ms |
58988 KB |
Output is correct |
73 |
Correct |
1351 ms |
55460 KB |
Output is correct |
74 |
Correct |
1200 ms |
58396 KB |
Output is correct |
75 |
Correct |
1080 ms |
58004 KB |
Output is correct |
76 |
Correct |
1546 ms |
59384 KB |
Output is correct |
77 |
Correct |
1067 ms |
57252 KB |
Output is correct |
78 |
Correct |
1261 ms |
66624 KB |
Output is correct |
79 |
Correct |
1303 ms |
66620 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
544 KB |
Output is correct |
5 |
Correct |
0 ms |
600 KB |
Output is correct |
6 |
Correct |
1 ms |
344 KB |
Output is correct |
7 |
Correct |
0 ms |
344 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
344 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
1 ms |
344 KB |
Output is correct |
13 |
Correct |
1 ms |
344 KB |
Output is correct |
14 |
Correct |
0 ms |
344 KB |
Output is correct |
15 |
Correct |
1 ms |
344 KB |
Output is correct |
16 |
Correct |
1 ms |
344 KB |
Output is correct |
17 |
Correct |
0 ms |
344 KB |
Output is correct |
18 |
Correct |
1 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
1 ms |
344 KB |
Output is correct |
22 |
Correct |
0 ms |
516 KB |
Output is correct |
23 |
Correct |
0 ms |
344 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
344 KB |
Output is correct |
27 |
Correct |
0 ms |
344 KB |
Output is correct |
28 |
Correct |
1 ms |
344 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
344 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
344 KB |
Output is correct |
33 |
Correct |
0 ms |
344 KB |
Output is correct |
34 |
Correct |
0 ms |
344 KB |
Output is correct |
35 |
Correct |
0 ms |
344 KB |
Output is correct |
36 |
Correct |
0 ms |
356 KB |
Output is correct |
37 |
Correct |
1 ms |
344 KB |
Output is correct |
38 |
Correct |
1 ms |
344 KB |
Output is correct |
39 |
Correct |
0 ms |
344 KB |
Output is correct |
40 |
Correct |
1 ms |
344 KB |
Output is correct |
41 |
Correct |
1 ms |
344 KB |
Output is correct |
42 |
Correct |
1 ms |
344 KB |
Output is correct |
43 |
Correct |
1 ms |
600 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
344 KB |
Output is correct |
46 |
Correct |
1 ms |
344 KB |
Output is correct |
47 |
Correct |
1 ms |
344 KB |
Output is correct |
48 |
Correct |
1 ms |
344 KB |
Output is correct |
49 |
Correct |
0 ms |
344 KB |
Output is correct |
50 |
Correct |
1 ms |
344 KB |
Output is correct |
51 |
Correct |
1 ms |
344 KB |
Output is correct |
52 |
Correct |
1 ms |
348 KB |
Output is correct |
53 |
Correct |
1 ms |
344 KB |
Output is correct |
54 |
Correct |
1 ms |
344 KB |
Output is correct |
55 |
Correct |
0 ms |
348 KB |
Output is correct |
56 |
Correct |
1 ms |
344 KB |
Output is correct |
57 |
Correct |
1 ms |
344 KB |
Output is correct |
58 |
Correct |
1 ms |
344 KB |
Output is correct |
59 |
Correct |
1 ms |
344 KB |
Output is correct |
60 |
Correct |
0 ms |
344 KB |
Output is correct |
61 |
Correct |
1 ms |
344 KB |
Output is correct |
62 |
Correct |
1 ms |
344 KB |
Output is correct |
63 |
Correct |
1 ms |
344 KB |
Output is correct |
64 |
Correct |
1 ms |
344 KB |
Output is correct |
65 |
Correct |
1 ms |
348 KB |
Output is correct |
66 |
Correct |
9 ms |
2136 KB |
Output is correct |
67 |
Correct |
8 ms |
2136 KB |
Output is correct |
68 |
Correct |
7 ms |
2140 KB |
Output is correct |
69 |
Correct |
23 ms |
1316 KB |
Output is correct |
70 |
Correct |
11 ms |
1368 KB |
Output is correct |
71 |
Correct |
8 ms |
1368 KB |
Output is correct |
72 |
Correct |
8 ms |
2136 KB |
Output is correct |
73 |
Correct |
8 ms |
2392 KB |
Output is correct |
74 |
Correct |
10 ms |
2392 KB |
Output is correct |
75 |
Correct |
30 ms |
2576 KB |
Output is correct |
76 |
Correct |
11 ms |
2136 KB |
Output is correct |
77 |
Correct |
10 ms |
1880 KB |
Output is correct |
78 |
Correct |
8 ms |
2136 KB |
Output is correct |
79 |
Correct |
8 ms |
2136 KB |
Output is correct |
80 |
Correct |
7 ms |
2140 KB |
Output is correct |
81 |
Correct |
8 ms |
2136 KB |
Output is correct |
82 |
Correct |
16 ms |
2396 KB |
Output is correct |
83 |
Correct |
21 ms |
2560 KB |
Output is correct |
84 |
Correct |
6 ms |
1624 KB |
Output is correct |
85 |
Correct |
5 ms |
1112 KB |
Output is correct |
86 |
Correct |
6 ms |
1116 KB |
Output is correct |
87 |
Correct |
5 ms |
1368 KB |
Output is correct |
88 |
Correct |
9 ms |
2396 KB |
Output is correct |
89 |
Correct |
10 ms |
2392 KB |
Output is correct |
90 |
Correct |
9 ms |
2392 KB |
Output is correct |
91 |
Correct |
782 ms |
46096 KB |
Output is correct |
92 |
Correct |
1097 ms |
57452 KB |
Output is correct |
93 |
Correct |
1247 ms |
64908 KB |
Output is correct |
94 |
Correct |
1035 ms |
62692 KB |
Output is correct |
95 |
Correct |
4700 ms |
68376 KB |
Output is correct |
96 |
Correct |
1110 ms |
58328 KB |
Output is correct |
97 |
Correct |
1131 ms |
58988 KB |
Output is correct |
98 |
Correct |
1351 ms |
55460 KB |
Output is correct |
99 |
Correct |
1200 ms |
58396 KB |
Output is correct |
100 |
Correct |
1080 ms |
58004 KB |
Output is correct |
101 |
Correct |
1546 ms |
59384 KB |
Output is correct |
102 |
Correct |
1067 ms |
57252 KB |
Output is correct |
103 |
Correct |
1261 ms |
66624 KB |
Output is correct |
104 |
Correct |
1303 ms |
66620 KB |
Output is correct |
105 |
Correct |
1617 ms |
17984 KB |
Output is correct |
106 |
Correct |
1767 ms |
22280 KB |
Output is correct |
107 |
Correct |
3262 ms |
22688 KB |
Output is correct |
108 |
Correct |
1827 ms |
23832 KB |
Output is correct |
109 |
Correct |
767 ms |
32060 KB |
Output is correct |
110 |
Correct |
1055 ms |
59420 KB |
Output is correct |
111 |
Correct |
1103 ms |
65396 KB |
Output is correct |
112 |
Correct |
1018 ms |
58592 KB |
Output is correct |
113 |
Correct |
991 ms |
57872 KB |
Output is correct |
114 |
Correct |
2557 ms |
42840 KB |
Output is correct |
115 |
Correct |
1367 ms |
56972 KB |
Output is correct |
116 |
Correct |
1102 ms |
58420 KB |
Output is correct |
117 |
Correct |
1127 ms |
58412 KB |
Output is correct |
118 |
Correct |
1729 ms |
51984 KB |
Output is correct |
119 |
Correct |
1749 ms |
61044 KB |
Output is correct |
120 |
Correct |
1083 ms |
57540 KB |
Output is correct |
121 |
Correct |
1102 ms |
60412 KB |
Output is correct |
122 |
Correct |
1178 ms |
61176 KB |
Output is correct |
123 |
Correct |
1975 ms |
72888 KB |
Output is correct |
124 |
Correct |
2346 ms |
68968 KB |
Output is correct |
125 |
Correct |
379 ms |
41984 KB |
Output is correct |
126 |
Correct |
285 ms |
25360 KB |
Output is correct |
127 |
Correct |
577 ms |
23200 KB |
Output is correct |
128 |
Correct |
319 ms |
23656 KB |
Output is correct |
129 |
Correct |
302 ms |
32352 KB |
Output is correct |