//#pragma GCC optimize ("O3")
#include <cstdio>
#include <algorithm>
#include <vector>
#include <map>
#include <iterator>
using namespace std;
const int INF = 100000000;
static char buf[33554432];
static int fio_idx = 0;
static inline int _readInt() {
int x = 0;
int c = buf[fio_idx++];
if(c <= 32) c = buf[fio_idx++];
while(c > 32) x = 10 * x + (c - '0'), c = buf[fio_idx++];
return x;
}
int n, k, q, bp;
int com[524288];
int c_sz;
inline int idx(int x)
{
return lower_bound(com, com + c_sz, x) - com;
}
struct eve
{
int t, x, d;
bool operator <(const eve &e) const
{
return t != e.t ? t < e.t : d > e.d;
}
};
struct pos
{
int c, l, lt, r, rt;
};
eve arr[1048576];
map<int, pos> loc[524288];
struct seg
{
int t1, t2, x, y;
bool operator <(const seg &e) const
{
return x < e.x;
}
};
seg sor0[1048576];
seg sor1[1048576];
int s_sz0, s_sz1;
inline void add_seg(const int &t1, const int &t2, const int &x, const int &y)
{
if(t1 < 0 || t1 > t2 || x == y)
return;
if(y < x)
sor0[s_sz0++] = { bp + t1, bp + t2, y, x };
else
sor1[s_sz1++] = { bp + t1, bp + t2, -y, -x };
}
struct ent
{
// v0 : dec, v1 : inc, q : query
// v : { x, y }
// q : { x, i }
vector<pair<int, int>> v0, v1;
vector<pair<int, int>> q;
};
ent mem[1048576];
struct que
{
int l, y, i;
bool operator <(const que &x) const
{
return l < x.l;
}
};
que inp[524288];
bool chk[524288];
int ans[524288];
int main()
{
fread(buf, sizeof(buf[0]), sizeof(buf), stdin);
n = _readInt();
k = _readInt();
q = _readInt();
n *= 2;
for(int i = 0; i < n; i += 2)
{
int x, t, a, b;
x = _readInt();
t = _readInt();
a = _readInt();
b = _readInt();
arr[i] = { a, x, t };
arr[i + 1] = { b, x, -t };
}
for(int i = 0; i < q; i++)
{
int l, y;
l = _readInt();
y = _readInt();
inp[i] = { l, y, i };
com[i] = y;
}
sort(com, com + q);
c_sz = unique(com, com + q) - com;
for(int i = 0; i < n; i += 2)
{
arr[i].t = idx(arr[i].t);
arr[i + 1].t = idx(arr[i + 1].t + 1) - 1;
if(arr[i].t > arr[i + 1].t)
arr[i].d = arr[i + 1].d = 0;
}
for(int i = 0; i < q; i++)
inp[i].y = idx(inp[i].y);
for(bp = 1; bp < c_sz; bp *= 2);
sort(arr, arr + n);
int cur, cnt = 0;
for(int u = 0; u < n; u++)
{
eve &e = arr[u];
if(e.d > 0)
{
if(loc[e.d].size() == 0)
{
cnt++;
if(cnt == k)
cur = e.t;
}
auto it = loc[e.d].find(e.x);
if(it != loc[e.d].end())
{
it->second.c++;
continue;
}
it = loc[e.d].insert({ e.x,{ 1, 1, e.t, INF, e.t } }).first;
pos &p = it->second;
if(it != loc[e.d].begin())
{
int x = prev(it)->first;
pos &q = prev(it)->second;
add_seg(q.rt, e.t - 1, x, q.r);
q.rt = e.t;
q.r = (x + e.x) / 2;
p.l = (x + e.x + 1) / 2;
}
it++;
if(it != loc[e.d].end())
{
int x = it->first;
pos &q = it->second;
add_seg(q.lt, e.t - 1, x, q.l);
q.lt = e.t;
q.l = (x + e.x + 1) / 2;
p.r = (x + e.x) / 2;
}
}
else if(e.d < 0)
{
e.d = -e.d;
auto it = loc[e.d].find(e.x);
pos &p = it->second;
if(p.c > 1)
{
p.c--;
continue;
}
add_seg(p.lt, e.t, e.x, p.l);
add_seg(p.rt, e.t, e.x, p.r);
if(it != loc[e.d].begin())
{
int x = prev(it)->first;
pos &q = prev(it)->second;
add_seg(q.rt, e.t, x, q.r);
q.rt = e.t + 1;
if(next(it) != loc[e.d].end())
{
int y = next(it)->first;
q.r = (x + y) / 2;
}
else
q.r = INF;
}
if(next(it) != loc[e.d].end())
{
int x = next(it)->first;
pos &q = next(it)->second;
add_seg(q.lt, e.t, x, q.l);
q.lt = e.t + 1;
if(it != loc[e.d].begin())
{
int y = prev(it)->first;
q.l = (y + x + 1) / 2;
}
else
q.l = 1;
}
loc[e.d].erase(it);
if(loc[e.d].size() == 0)
{
if(cnt == k)
{
for(int i = cur; i <= e.t; i++)
chk[i] = 1;
}
cnt--;
}
}
}
sort(inp, inp + q);
for(int u = 0; u < q; u++)
{
que &e = inp[u];
if(chk[e.y])
{
e.y += bp;
while(e.y)
{
mem[e.y].q.push_back({ e.l, e.i });
e.y /= 2;
}
}
else
ans[e.i] = -1;
}
{
sort(sor0, sor0 + s_sz0);
for(int u = 0; u < s_sz0; u++)
{
seg &e = sor0[u];
while(e.t1 < e.t2)
{
if(e.t1 % 2 == 1)
{
mem[e.t1].v0.push_back({ e.x, e.y });
e.t1++;
}
if(e.t2 % 2 == 0)
{
mem[e.t2].v0.push_back({ e.x, e.y });
e.t2--;
}
e.t1 /= 2;
e.t2 /= 2;
}
if(e.t1 == e.t2)
mem[e.t1].v0.push_back({ e.x, e.y });
}
}
{
sort(sor1, sor1 + s_sz1);
for(int u = 0; u < s_sz1; u++)
{
seg &e = sor1[u];
while(e.t1 < e.t2)
{
if(e.t1 % 2 == 1)
{
mem[e.t1].v1.push_back({ e.x, e.y });
e.t1++;
}
if(e.t2 % 2 == 0)
{
mem[e.t2].v1.push_back({ e.x, e.y });
e.t2--;
}
e.t1 /= 2;
e.t2 /= 2;
}
if(e.t1 == e.t2)
mem[e.t1].v1.push_back({ e.x, e.y });
}
}
for(int x = 1; x <= bp + c_sz - 1; x++)
{
if(mem[x].q.empty())
continue;
int mx, p1, p2;
if(!mem[x].v0.empty())
{
mx = p1 = p2 = 0;
while(p2 < mem[x].q.size())
{
if(p1 != mem[x].v0.size() && mem[x].v0[p1].first <= mem[x].q[p2].first)
{
mx = max(mx, mem[x].v0[p1].second);
p1++;
}
else
{
ans[mem[x].q[p2].second] = max(ans[mem[x].q[p2].second], mx - mem[x].q[p2].first);
p2++;
}
}
}
if(!mem[x].v1.empty())
{
mx = -INF;
p1 = 0;
p2 = mem[x].q.size() - 1;
while(p2 >= 0)
{
if(p1 != mem[x].v1.size() && mem[x].v1[p1].first <= -mem[x].q[p2].first)
{
mx = max(mx, mem[x].v1[p1].second);
p1++;
}
else
{
ans[mem[x].q[p2].second] = max(ans[mem[x].q[p2].second], mx + mem[x].q[p2].first);
p2--;
}
}
}
}
for(int i = 0; i < q; i++)
printf("%d\n", ans[i]);
return 0;
}
Compilation message
new_home.cpp: In function 'int main()':
new_home.cpp:324:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(p2 < mem[x].q.size())
~~~^~~~~~~~~~~~~~~~~
new_home.cpp:326:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(p1 != mem[x].v0.size() && mem[x].v0[p1].first <= mem[x].q[p2].first)
~~~^~~~~~~~~~~~~~~~~~~
new_home.cpp:345:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(p1 != mem[x].v1.size() && mem[x].v1[p1].first <= -mem[x].q[p2].first)
~~~^~~~~~~~~~~~~~~~~~~
new_home.cpp:98:10: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
fread(buf, sizeof(buf[0]), sizeof(buf), stdin);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
new_home.cpp:139:9: warning: 'cur' may be used uninitialized in this function [-Wmaybe-uninitialized]
int cur, cnt = 0;
^~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
78 ms |
98936 KB |
Output is correct |
2 |
Correct |
79 ms |
98936 KB |
Output is correct |
3 |
Correct |
86 ms |
98992 KB |
Output is correct |
4 |
Correct |
79 ms |
98992 KB |
Output is correct |
5 |
Correct |
79 ms |
99104 KB |
Output is correct |
6 |
Correct |
80 ms |
99376 KB |
Output is correct |
7 |
Correct |
79 ms |
99376 KB |
Output is correct |
8 |
Correct |
82 ms |
99376 KB |
Output is correct |
9 |
Correct |
80 ms |
99376 KB |
Output is correct |
10 |
Correct |
80 ms |
99408 KB |
Output is correct |
11 |
Correct |
80 ms |
99408 KB |
Output is correct |
12 |
Correct |
87 ms |
99500 KB |
Output is correct |
13 |
Correct |
86 ms |
99500 KB |
Output is correct |
14 |
Correct |
84 ms |
99500 KB |
Output is correct |
15 |
Correct |
95 ms |
99500 KB |
Output is correct |
16 |
Correct |
88 ms |
99500 KB |
Output is correct |
17 |
Correct |
88 ms |
99616 KB |
Output is correct |
18 |
Correct |
90 ms |
99616 KB |
Output is correct |
19 |
Correct |
90 ms |
99616 KB |
Output is correct |
20 |
Correct |
88 ms |
99616 KB |
Output is correct |
21 |
Correct |
89 ms |
99616 KB |
Output is correct |
22 |
Correct |
90 ms |
99616 KB |
Output is correct |
23 |
Correct |
79 ms |
99616 KB |
Output is correct |
24 |
Correct |
80 ms |
99616 KB |
Output is correct |
25 |
Correct |
83 ms |
99616 KB |
Output is correct |
26 |
Correct |
81 ms |
99616 KB |
Output is correct |
27 |
Correct |
80 ms |
99616 KB |
Output is correct |
28 |
Correct |
79 ms |
99616 KB |
Output is correct |
29 |
Correct |
80 ms |
99616 KB |
Output is correct |
30 |
Correct |
81 ms |
99616 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
78 ms |
98936 KB |
Output is correct |
2 |
Correct |
79 ms |
98936 KB |
Output is correct |
3 |
Correct |
86 ms |
98992 KB |
Output is correct |
4 |
Correct |
79 ms |
98992 KB |
Output is correct |
5 |
Correct |
79 ms |
99104 KB |
Output is correct |
6 |
Correct |
80 ms |
99376 KB |
Output is correct |
7 |
Correct |
79 ms |
99376 KB |
Output is correct |
8 |
Correct |
82 ms |
99376 KB |
Output is correct |
9 |
Correct |
80 ms |
99376 KB |
Output is correct |
10 |
Correct |
80 ms |
99408 KB |
Output is correct |
11 |
Correct |
80 ms |
99408 KB |
Output is correct |
12 |
Correct |
87 ms |
99500 KB |
Output is correct |
13 |
Correct |
86 ms |
99500 KB |
Output is correct |
14 |
Correct |
84 ms |
99500 KB |
Output is correct |
15 |
Correct |
95 ms |
99500 KB |
Output is correct |
16 |
Correct |
88 ms |
99500 KB |
Output is correct |
17 |
Correct |
88 ms |
99616 KB |
Output is correct |
18 |
Correct |
90 ms |
99616 KB |
Output is correct |
19 |
Correct |
90 ms |
99616 KB |
Output is correct |
20 |
Correct |
88 ms |
99616 KB |
Output is correct |
21 |
Correct |
89 ms |
99616 KB |
Output is correct |
22 |
Correct |
90 ms |
99616 KB |
Output is correct |
23 |
Correct |
79 ms |
99616 KB |
Output is correct |
24 |
Correct |
80 ms |
99616 KB |
Output is correct |
25 |
Correct |
83 ms |
99616 KB |
Output is correct |
26 |
Correct |
81 ms |
99616 KB |
Output is correct |
27 |
Correct |
80 ms |
99616 KB |
Output is correct |
28 |
Correct |
79 ms |
99616 KB |
Output is correct |
29 |
Correct |
80 ms |
99616 KB |
Output is correct |
30 |
Correct |
81 ms |
99616 KB |
Output is correct |
31 |
Correct |
936 ms |
168880 KB |
Output is correct |
32 |
Correct |
138 ms |
168880 KB |
Output is correct |
33 |
Correct |
799 ms |
168880 KB |
Output is correct |
34 |
Correct |
1006 ms |
168880 KB |
Output is correct |
35 |
Correct |
892 ms |
169736 KB |
Output is correct |
36 |
Correct |
1032 ms |
169876 KB |
Output is correct |
37 |
Correct |
560 ms |
169876 KB |
Output is correct |
38 |
Correct |
553 ms |
169876 KB |
Output is correct |
39 |
Correct |
483 ms |
169876 KB |
Output is correct |
40 |
Correct |
496 ms |
169876 KB |
Output is correct |
41 |
Correct |
600 ms |
169876 KB |
Output is correct |
42 |
Correct |
580 ms |
169876 KB |
Output is correct |
43 |
Correct |
110 ms |
169876 KB |
Output is correct |
44 |
Correct |
671 ms |
169876 KB |
Output is correct |
45 |
Correct |
621 ms |
169876 KB |
Output is correct |
46 |
Correct |
365 ms |
169876 KB |
Output is correct |
47 |
Correct |
286 ms |
169876 KB |
Output is correct |
48 |
Correct |
246 ms |
169876 KB |
Output is correct |
49 |
Correct |
333 ms |
169876 KB |
Output is correct |
50 |
Correct |
384 ms |
169876 KB |
Output is correct |
51 |
Correct |
316 ms |
169876 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1456 ms |
252152 KB |
Output is correct |
2 |
Correct |
1695 ms |
253580 KB |
Output is correct |
3 |
Correct |
1437 ms |
253580 KB |
Output is correct |
4 |
Correct |
1546 ms |
253580 KB |
Output is correct |
5 |
Correct |
2062 ms |
273484 KB |
Output is correct |
6 |
Correct |
1778 ms |
273484 KB |
Output is correct |
7 |
Correct |
1381 ms |
273484 KB |
Output is correct |
8 |
Correct |
1369 ms |
273484 KB |
Output is correct |
9 |
Correct |
1507 ms |
276696 KB |
Output is correct |
10 |
Correct |
1595 ms |
276696 KB |
Output is correct |
11 |
Correct |
1053 ms |
276696 KB |
Output is correct |
12 |
Correct |
964 ms |
276696 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4245 ms |
344740 KB |
Output is correct |
2 |
Correct |
244 ms |
344740 KB |
Output is correct |
3 |
Correct |
4357 ms |
365408 KB |
Output is correct |
4 |
Correct |
1010 ms |
365408 KB |
Output is correct |
5 |
Correct |
2368 ms |
365408 KB |
Output is correct |
6 |
Correct |
2122 ms |
365408 KB |
Output is correct |
7 |
Correct |
4461 ms |
365408 KB |
Output is correct |
8 |
Correct |
4442 ms |
365408 KB |
Output is correct |
9 |
Correct |
1366 ms |
365408 KB |
Output is correct |
10 |
Correct |
3004 ms |
365408 KB |
Output is correct |
11 |
Correct |
3905 ms |
365408 KB |
Output is correct |
12 |
Correct |
4118 ms |
365468 KB |
Output is correct |
13 |
Correct |
1501 ms |
365468 KB |
Output is correct |
14 |
Correct |
1588 ms |
365468 KB |
Output is correct |
15 |
Correct |
2009 ms |
365468 KB |
Output is correct |
16 |
Correct |
2156 ms |
365468 KB |
Output is correct |
17 |
Correct |
2287 ms |
365468 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
78 ms |
98936 KB |
Output is correct |
2 |
Correct |
79 ms |
98936 KB |
Output is correct |
3 |
Correct |
86 ms |
98992 KB |
Output is correct |
4 |
Correct |
79 ms |
98992 KB |
Output is correct |
5 |
Correct |
79 ms |
99104 KB |
Output is correct |
6 |
Correct |
80 ms |
99376 KB |
Output is correct |
7 |
Correct |
79 ms |
99376 KB |
Output is correct |
8 |
Correct |
82 ms |
99376 KB |
Output is correct |
9 |
Correct |
80 ms |
99376 KB |
Output is correct |
10 |
Correct |
80 ms |
99408 KB |
Output is correct |
11 |
Correct |
80 ms |
99408 KB |
Output is correct |
12 |
Correct |
87 ms |
99500 KB |
Output is correct |
13 |
Correct |
86 ms |
99500 KB |
Output is correct |
14 |
Correct |
84 ms |
99500 KB |
Output is correct |
15 |
Correct |
95 ms |
99500 KB |
Output is correct |
16 |
Correct |
88 ms |
99500 KB |
Output is correct |
17 |
Correct |
88 ms |
99616 KB |
Output is correct |
18 |
Correct |
90 ms |
99616 KB |
Output is correct |
19 |
Correct |
90 ms |
99616 KB |
Output is correct |
20 |
Correct |
88 ms |
99616 KB |
Output is correct |
21 |
Correct |
89 ms |
99616 KB |
Output is correct |
22 |
Correct |
90 ms |
99616 KB |
Output is correct |
23 |
Correct |
79 ms |
99616 KB |
Output is correct |
24 |
Correct |
80 ms |
99616 KB |
Output is correct |
25 |
Correct |
83 ms |
99616 KB |
Output is correct |
26 |
Correct |
81 ms |
99616 KB |
Output is correct |
27 |
Correct |
80 ms |
99616 KB |
Output is correct |
28 |
Correct |
79 ms |
99616 KB |
Output is correct |
29 |
Correct |
80 ms |
99616 KB |
Output is correct |
30 |
Correct |
81 ms |
99616 KB |
Output is correct |
31 |
Correct |
936 ms |
168880 KB |
Output is correct |
32 |
Correct |
138 ms |
168880 KB |
Output is correct |
33 |
Correct |
799 ms |
168880 KB |
Output is correct |
34 |
Correct |
1006 ms |
168880 KB |
Output is correct |
35 |
Correct |
892 ms |
169736 KB |
Output is correct |
36 |
Correct |
1032 ms |
169876 KB |
Output is correct |
37 |
Correct |
560 ms |
169876 KB |
Output is correct |
38 |
Correct |
553 ms |
169876 KB |
Output is correct |
39 |
Correct |
483 ms |
169876 KB |
Output is correct |
40 |
Correct |
496 ms |
169876 KB |
Output is correct |
41 |
Correct |
600 ms |
169876 KB |
Output is correct |
42 |
Correct |
580 ms |
169876 KB |
Output is correct |
43 |
Correct |
110 ms |
169876 KB |
Output is correct |
44 |
Correct |
671 ms |
169876 KB |
Output is correct |
45 |
Correct |
621 ms |
169876 KB |
Output is correct |
46 |
Correct |
365 ms |
169876 KB |
Output is correct |
47 |
Correct |
286 ms |
169876 KB |
Output is correct |
48 |
Correct |
246 ms |
169876 KB |
Output is correct |
49 |
Correct |
333 ms |
169876 KB |
Output is correct |
50 |
Correct |
384 ms |
169876 KB |
Output is correct |
51 |
Correct |
316 ms |
169876 KB |
Output is correct |
52 |
Correct |
291 ms |
365468 KB |
Output is correct |
53 |
Correct |
283 ms |
365468 KB |
Output is correct |
54 |
Correct |
440 ms |
365468 KB |
Output is correct |
55 |
Correct |
461 ms |
365468 KB |
Output is correct |
56 |
Correct |
443 ms |
365468 KB |
Output is correct |
57 |
Correct |
521 ms |
365468 KB |
Output is correct |
58 |
Correct |
481 ms |
365468 KB |
Output is correct |
59 |
Correct |
461 ms |
365468 KB |
Output is correct |
60 |
Correct |
769 ms |
365468 KB |
Output is correct |
61 |
Correct |
127 ms |
365468 KB |
Output is correct |
62 |
Correct |
325 ms |
365468 KB |
Output is correct |
63 |
Correct |
478 ms |
365468 KB |
Output is correct |
64 |
Correct |
461 ms |
365468 KB |
Output is correct |
65 |
Correct |
601 ms |
365468 KB |
Output is correct |
66 |
Correct |
612 ms |
365468 KB |
Output is correct |
67 |
Correct |
164 ms |
365468 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
78 ms |
98936 KB |
Output is correct |
2 |
Correct |
79 ms |
98936 KB |
Output is correct |
3 |
Correct |
86 ms |
98992 KB |
Output is correct |
4 |
Correct |
79 ms |
98992 KB |
Output is correct |
5 |
Correct |
79 ms |
99104 KB |
Output is correct |
6 |
Correct |
80 ms |
99376 KB |
Output is correct |
7 |
Correct |
79 ms |
99376 KB |
Output is correct |
8 |
Correct |
82 ms |
99376 KB |
Output is correct |
9 |
Correct |
80 ms |
99376 KB |
Output is correct |
10 |
Correct |
80 ms |
99408 KB |
Output is correct |
11 |
Correct |
80 ms |
99408 KB |
Output is correct |
12 |
Correct |
87 ms |
99500 KB |
Output is correct |
13 |
Correct |
86 ms |
99500 KB |
Output is correct |
14 |
Correct |
84 ms |
99500 KB |
Output is correct |
15 |
Correct |
95 ms |
99500 KB |
Output is correct |
16 |
Correct |
88 ms |
99500 KB |
Output is correct |
17 |
Correct |
88 ms |
99616 KB |
Output is correct |
18 |
Correct |
90 ms |
99616 KB |
Output is correct |
19 |
Correct |
90 ms |
99616 KB |
Output is correct |
20 |
Correct |
88 ms |
99616 KB |
Output is correct |
21 |
Correct |
89 ms |
99616 KB |
Output is correct |
22 |
Correct |
90 ms |
99616 KB |
Output is correct |
23 |
Correct |
79 ms |
99616 KB |
Output is correct |
24 |
Correct |
80 ms |
99616 KB |
Output is correct |
25 |
Correct |
83 ms |
99616 KB |
Output is correct |
26 |
Correct |
81 ms |
99616 KB |
Output is correct |
27 |
Correct |
80 ms |
99616 KB |
Output is correct |
28 |
Correct |
79 ms |
99616 KB |
Output is correct |
29 |
Correct |
80 ms |
99616 KB |
Output is correct |
30 |
Correct |
81 ms |
99616 KB |
Output is correct |
31 |
Correct |
936 ms |
168880 KB |
Output is correct |
32 |
Correct |
138 ms |
168880 KB |
Output is correct |
33 |
Correct |
799 ms |
168880 KB |
Output is correct |
34 |
Correct |
1006 ms |
168880 KB |
Output is correct |
35 |
Correct |
892 ms |
169736 KB |
Output is correct |
36 |
Correct |
1032 ms |
169876 KB |
Output is correct |
37 |
Correct |
560 ms |
169876 KB |
Output is correct |
38 |
Correct |
553 ms |
169876 KB |
Output is correct |
39 |
Correct |
483 ms |
169876 KB |
Output is correct |
40 |
Correct |
496 ms |
169876 KB |
Output is correct |
41 |
Correct |
600 ms |
169876 KB |
Output is correct |
42 |
Correct |
580 ms |
169876 KB |
Output is correct |
43 |
Correct |
110 ms |
169876 KB |
Output is correct |
44 |
Correct |
671 ms |
169876 KB |
Output is correct |
45 |
Correct |
621 ms |
169876 KB |
Output is correct |
46 |
Correct |
365 ms |
169876 KB |
Output is correct |
47 |
Correct |
286 ms |
169876 KB |
Output is correct |
48 |
Correct |
246 ms |
169876 KB |
Output is correct |
49 |
Correct |
333 ms |
169876 KB |
Output is correct |
50 |
Correct |
384 ms |
169876 KB |
Output is correct |
51 |
Correct |
316 ms |
169876 KB |
Output is correct |
52 |
Correct |
1456 ms |
252152 KB |
Output is correct |
53 |
Correct |
1695 ms |
253580 KB |
Output is correct |
54 |
Correct |
1437 ms |
253580 KB |
Output is correct |
55 |
Correct |
1546 ms |
253580 KB |
Output is correct |
56 |
Correct |
2062 ms |
273484 KB |
Output is correct |
57 |
Correct |
1778 ms |
273484 KB |
Output is correct |
58 |
Correct |
1381 ms |
273484 KB |
Output is correct |
59 |
Correct |
1369 ms |
273484 KB |
Output is correct |
60 |
Correct |
1507 ms |
276696 KB |
Output is correct |
61 |
Correct |
1595 ms |
276696 KB |
Output is correct |
62 |
Correct |
1053 ms |
276696 KB |
Output is correct |
63 |
Correct |
964 ms |
276696 KB |
Output is correct |
64 |
Correct |
4245 ms |
344740 KB |
Output is correct |
65 |
Correct |
244 ms |
344740 KB |
Output is correct |
66 |
Correct |
4357 ms |
365408 KB |
Output is correct |
67 |
Correct |
1010 ms |
365408 KB |
Output is correct |
68 |
Correct |
2368 ms |
365408 KB |
Output is correct |
69 |
Correct |
2122 ms |
365408 KB |
Output is correct |
70 |
Correct |
4461 ms |
365408 KB |
Output is correct |
71 |
Correct |
4442 ms |
365408 KB |
Output is correct |
72 |
Correct |
1366 ms |
365408 KB |
Output is correct |
73 |
Correct |
3004 ms |
365408 KB |
Output is correct |
74 |
Correct |
3905 ms |
365408 KB |
Output is correct |
75 |
Correct |
4118 ms |
365468 KB |
Output is correct |
76 |
Correct |
1501 ms |
365468 KB |
Output is correct |
77 |
Correct |
1588 ms |
365468 KB |
Output is correct |
78 |
Correct |
2009 ms |
365468 KB |
Output is correct |
79 |
Correct |
2156 ms |
365468 KB |
Output is correct |
80 |
Correct |
2287 ms |
365468 KB |
Output is correct |
81 |
Correct |
291 ms |
365468 KB |
Output is correct |
82 |
Correct |
283 ms |
365468 KB |
Output is correct |
83 |
Correct |
440 ms |
365468 KB |
Output is correct |
84 |
Correct |
461 ms |
365468 KB |
Output is correct |
85 |
Correct |
443 ms |
365468 KB |
Output is correct |
86 |
Correct |
521 ms |
365468 KB |
Output is correct |
87 |
Correct |
481 ms |
365468 KB |
Output is correct |
88 |
Correct |
461 ms |
365468 KB |
Output is correct |
89 |
Correct |
769 ms |
365468 KB |
Output is correct |
90 |
Correct |
127 ms |
365468 KB |
Output is correct |
91 |
Correct |
325 ms |
365468 KB |
Output is correct |
92 |
Correct |
478 ms |
365468 KB |
Output is correct |
93 |
Correct |
461 ms |
365468 KB |
Output is correct |
94 |
Correct |
601 ms |
365468 KB |
Output is correct |
95 |
Correct |
612 ms |
365468 KB |
Output is correct |
96 |
Correct |
164 ms |
365468 KB |
Output is correct |
97 |
Correct |
1789 ms |
365468 KB |
Output is correct |
98 |
Correct |
281 ms |
365468 KB |
Output is correct |
99 |
Execution timed out |
5054 ms |
488088 KB |
Time limit exceeded |
100 |
Halted |
0 ms |
0 KB |
- |