#include <cstdio>
#include <cstring>
#include <vector>
#include <set>
#include <algorithm>
#define X first
#define Y second
#define PB push_back
using namespace std;
typedef pair < int, int > pii;
const int N = 3e5 + 500;
const int OFF = (1 << 20);
const int KRJ = 1e8;
int zadL[N], zadR[N];
int x[N], ty[N], a[N], b[N], lst_op[N];
int kd[N], gdje[N], n, q, k;
set < pii > S[N];
vector < int > saz;
vector < pair < pii, pii > > s_l, s_r;
vector < int > red;
bool cmp(int A, int B){
return gdje[A] < gdje[B];
}
bool fl = 0; int NULA = -KRJ;
int tour[2 * OFF], ans[N], neee[OFF];
void sazmi(){
for(int i = 0;i < q;i++)
saz.PB(kd[i]);
for(int i = 1;i <= n;i++)
saz.PB(a[i]), saz.PB(b[i]);
sort(saz.begin(), saz.end());
saz.erase(unique(saz.begin(), saz.end()), saz.end());
for(int i = 0;i < q;i++)
kd[i] = lower_bound(saz.begin(), saz.end(), kd[i]) - saz.begin();
for(int i = 1;i <= n;i++){
a[i] = lower_bound(saz.begin(), saz.end(), a[i]) - saz.begin();
b[i] = lower_bound(saz.begin(), saz.end(), b[i]) - saz.begin();
}
}
void pocisti(){
for(int i = 0;i < 2 * OFF;i++)
tour[i] = NULA;
}
int mrg(int A,int B){
if(!fl)
return max(A, B);
return min(A, B);
}
void update(int i, int a, int b, int lo, int hi, int x){
if(lo <= a && b <= hi){
tour[i] = mrg(tour[i], x);
return;
}
if(a > hi || b < lo) return;
update(2 * i, a, (a + b) / 2, lo, hi, x);
update(2 * i + 1, (a + b) / 2 + 1, b, lo, hi, x);
}
int query(int i){
int ret = NULA;
for(i = i + OFF; i ; i /= 2)
ret = mrg(ret, tour[i]);
return ret;
}
void dodaj_brid(int l, int r,int trn, int tip){
//printf("dodajem brid između %d i %d u %d tipa %d\n", l, r, trn, tip);
if(l == 0 && r == n + 1){
neee[lst_op[tip]]++;
neee[trn]--;
//printf("zabrana od %d do %d\n", lst_op[tip], trn);
}
else if(l == 0){
s_l.PB({{0, x[r]}, {zadL[r], trn - 1}});
//printf("brid s_l u kor %d dodajem kor %d na interval %d %d\n", 0, x[r], zadL[r], trn - 1);
zadL[r] = trn;
}
else if(r == n + 1){
s_r.PB({{KRJ, x[l]}, {zadR[l], trn - 1}});
//printf("brid s_r u kor %d dodajem kor %d na interval %d %d\n", KRJ, x[l], zadR[l], trn - 1);
zadR[l] = trn;
}
else{
s_l.PB({{(x[l] + x[r] + 1) / 2, x[r]}, {zadL[r], trn - 1}});
s_r.PB({{(x[l] + x[r]) / 2, x[l]}, {zadR[l], trn - 1}});
//printf("brid s_l u kor %d dodajem kor %d na interval %d %d\n", (x[l] + x[r] + 1) / 2, x[r], zadL[r], trn - 1);
//printf("brid s_r u kor %d dodajem kor %d na interval %d %d\n", (x[l] + x[r]) / 2, x[l], zadR[l], trn - 1);
zadR[l] = trn, zadL[r] = trn;
}
}
void ubaci(int i, int trn){
int l = 0, r = n + 1;
if(S[ty[i]].lower_bound({x[i], i}) != S[ty[i]].begin())
l = (--S[ty[i]].lower_bound({x[i], i})) -> Y;
if(S[ty[i]].lower_bound({x[i], i}) != S[ty[i]].end())
r = S[ty[i]].lower_bound({x[i],i}) -> Y;
zadL[i] = trn, zadR[i] = trn;
dodaj_brid(l, r, trn, ty[i]);
S[ty[i]].insert({x[i], i});
}
void izbaci(int i, int trn){
S[ty[i]].erase({x[i], i});
lst_op[ty[i]] = trn;
int l = 0, r = n + 1;
if(S[ty[i]].lower_bound({x[i], i}) != S[ty[i]].begin())
l = (--S[ty[i]].lower_bound({x[i], i})) -> Y;
if(S[ty[i]].lower_bound({x[i], i}) != S[ty[i]].end())
r = S[ty[i]].lower_bound({x[i], i}) -> Y;
dodaj_brid(l, i, trn, ty[i]);
dodaj_brid(i, r, trn, ty[i]);
}
void gradi_bridove(){
vector < pii > kda;
for(int i = 1;i <= n;i++){
kda.PB({a[i], i});
kda.PB({b[i] + 1, -i});
}
sort(kda.begin(), kda.end());
for(pii cur : kda){
if(cur.Y > 0)
ubaci(cur.Y, cur.X);
else
izbaci(-cur.Y, cur.X);
}
for(int i = 1;i <= k;i++)
neee[lst_op[i]]++;
for(int i = 1;i < OFF;i++)
neee[i] += neee[i - 1];
}
void racunaj(){
for(int i = 0;i < q;i++)
red.PB(i);
sort(red.begin(), red.end(), cmp);
sort(s_l.begin(), s_l.end());
sort(s_r.rbegin(), s_r.rend());
int j = 0;
pocisti();
for(int i = 0;i < q;i++){
int x = red[i];
while(j < (int)s_l.size() && s_l[j].X.X <= gdje[x]){
update(1, 0, OFF - 1, s_l[j].Y.X, s_l[j].Y.Y, s_l[j].X.Y);
// printf("L: cinim updejt od %d do %d na %d\n", s_l[j].Y.X, s_l[j].Y.Y, s_l[j].X.Y);
j++;
}
//printf("najdesnija %d - %d\n", query(kd[x]), gdje[x]);
ans[x] = max(ans[x], query(kd[x]) - gdje[x]);
}
fl = 1; NULA = 2 * KRJ;
pocisti();
reverse(red.begin(), red.end());
j = 0;
for(int i = 0;i < q;i++){
int x = red[i];
while(j < (int)s_r.size() && s_r[j].X.X >= gdje[x]){
update(1, 0, OFF - 1, s_r[j].Y.X, s_r[j].Y.Y, s_r[j].X.Y);
// printf("R: cinim updejt od %d do %d na %d\n", s_r[j].Y.X, s_r[j].Y.Y, s_r[j].X.Y);
j++;
}
// printf("najlijevija %d\n", query(kd[x]));
ans[x] = max(ans[x], gdje[x] - query(kd[x]));
}
}
int main(){
scanf("%d%d%d", &n, &k, &q);
for(int i = 1;i <= n;i++)
scanf("%d%d%d%d", x + i, ty + i, a + i, b + i);
for(int i = 0;i < q;i++)
scanf("%d%d", gdje + i, kd + i);
sazmi();
// for(int i = 1;i <= n;i++)
// printf("ducan[ %d ] traje od %d do %d na poz %d\n", ty[i], a[i], b[i], x[i]);
// for(int i = 0;i < q;i++)
// printf("hm? mogao bi izgraditi kucu %d godine gospodnje na poz %d\n", kd[i], gdje[i]);
gradi_bridove();
racunaj();
for(int i = 0;i < q;i++){
if(neee[kd[i]])
printf("-1\n");
else
printf("%d\n", ans[i]);
}
}
Compilation message
new_home.cpp: In function 'int main()':
new_home.cpp:180:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d", &n, &k, &q);
~~~~~^~~~~~~~~~~~~~~~~~~~~~
new_home.cpp:182:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d%d", x + i, ty + i, a + i, b + i);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
new_home.cpp:184:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", gdje + i, kd + i);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
26752 KB |
Output is correct |
2 |
Correct |
18 ms |
26752 KB |
Output is correct |
3 |
Correct |
18 ms |
26752 KB |
Output is correct |
4 |
Correct |
25 ms |
26752 KB |
Output is correct |
5 |
Correct |
19 ms |
26880 KB |
Output is correct |
6 |
Correct |
22 ms |
26880 KB |
Output is correct |
7 |
Correct |
18 ms |
26880 KB |
Output is correct |
8 |
Correct |
19 ms |
26912 KB |
Output is correct |
9 |
Correct |
21 ms |
26880 KB |
Output is correct |
10 |
Correct |
19 ms |
26880 KB |
Output is correct |
11 |
Correct |
25 ms |
26880 KB |
Output is correct |
12 |
Correct |
26 ms |
26964 KB |
Output is correct |
13 |
Correct |
19 ms |
26880 KB |
Output is correct |
14 |
Correct |
27 ms |
26880 KB |
Output is correct |
15 |
Correct |
19 ms |
26880 KB |
Output is correct |
16 |
Correct |
19 ms |
26880 KB |
Output is correct |
17 |
Correct |
19 ms |
26880 KB |
Output is correct |
18 |
Correct |
20 ms |
26880 KB |
Output is correct |
19 |
Correct |
19 ms |
26880 KB |
Output is correct |
20 |
Correct |
20 ms |
26880 KB |
Output is correct |
21 |
Correct |
19 ms |
26800 KB |
Output is correct |
22 |
Correct |
19 ms |
26872 KB |
Output is correct |
23 |
Correct |
20 ms |
26880 KB |
Output is correct |
24 |
Correct |
20 ms |
27008 KB |
Output is correct |
25 |
Correct |
20 ms |
26880 KB |
Output is correct |
26 |
Correct |
19 ms |
26880 KB |
Output is correct |
27 |
Correct |
19 ms |
26880 KB |
Output is correct |
28 |
Correct |
19 ms |
26880 KB |
Output is correct |
29 |
Correct |
19 ms |
26880 KB |
Output is correct |
30 |
Correct |
19 ms |
26880 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
26752 KB |
Output is correct |
2 |
Correct |
18 ms |
26752 KB |
Output is correct |
3 |
Correct |
18 ms |
26752 KB |
Output is correct |
4 |
Correct |
25 ms |
26752 KB |
Output is correct |
5 |
Correct |
19 ms |
26880 KB |
Output is correct |
6 |
Correct |
22 ms |
26880 KB |
Output is correct |
7 |
Correct |
18 ms |
26880 KB |
Output is correct |
8 |
Correct |
19 ms |
26912 KB |
Output is correct |
9 |
Correct |
21 ms |
26880 KB |
Output is correct |
10 |
Correct |
19 ms |
26880 KB |
Output is correct |
11 |
Correct |
25 ms |
26880 KB |
Output is correct |
12 |
Correct |
26 ms |
26964 KB |
Output is correct |
13 |
Correct |
19 ms |
26880 KB |
Output is correct |
14 |
Correct |
27 ms |
26880 KB |
Output is correct |
15 |
Correct |
19 ms |
26880 KB |
Output is correct |
16 |
Correct |
19 ms |
26880 KB |
Output is correct |
17 |
Correct |
19 ms |
26880 KB |
Output is correct |
18 |
Correct |
20 ms |
26880 KB |
Output is correct |
19 |
Correct |
19 ms |
26880 KB |
Output is correct |
20 |
Correct |
20 ms |
26880 KB |
Output is correct |
21 |
Correct |
19 ms |
26800 KB |
Output is correct |
22 |
Correct |
19 ms |
26872 KB |
Output is correct |
23 |
Correct |
20 ms |
26880 KB |
Output is correct |
24 |
Correct |
20 ms |
27008 KB |
Output is correct |
25 |
Correct |
20 ms |
26880 KB |
Output is correct |
26 |
Correct |
19 ms |
26880 KB |
Output is correct |
27 |
Correct |
19 ms |
26880 KB |
Output is correct |
28 |
Correct |
19 ms |
26880 KB |
Output is correct |
29 |
Correct |
19 ms |
26880 KB |
Output is correct |
30 |
Correct |
19 ms |
26880 KB |
Output is correct |
31 |
Correct |
366 ms |
41384 KB |
Output is correct |
32 |
Correct |
246 ms |
37464 KB |
Output is correct |
33 |
Correct |
381 ms |
39588 KB |
Output is correct |
34 |
Correct |
346 ms |
39700 KB |
Output is correct |
35 |
Correct |
364 ms |
41388 KB |
Output is correct |
36 |
Correct |
386 ms |
41256 KB |
Output is correct |
37 |
Correct |
330 ms |
39004 KB |
Output is correct |
38 |
Correct |
347 ms |
39152 KB |
Output is correct |
39 |
Correct |
288 ms |
40104 KB |
Output is correct |
40 |
Correct |
310 ms |
39848 KB |
Output is correct |
41 |
Correct |
256 ms |
38844 KB |
Output is correct |
42 |
Correct |
281 ms |
37444 KB |
Output is correct |
43 |
Correct |
141 ms |
39596 KB |
Output is correct |
44 |
Correct |
262 ms |
37600 KB |
Output is correct |
45 |
Correct |
250 ms |
38840 KB |
Output is correct |
46 |
Correct |
229 ms |
38876 KB |
Output is correct |
47 |
Correct |
185 ms |
36612 KB |
Output is correct |
48 |
Correct |
182 ms |
36812 KB |
Output is correct |
49 |
Correct |
209 ms |
37108 KB |
Output is correct |
50 |
Correct |
230 ms |
37144 KB |
Output is correct |
51 |
Correct |
211 ms |
37160 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1050 ms |
79628 KB |
Output is correct |
2 |
Correct |
1451 ms |
97448 KB |
Output is correct |
3 |
Correct |
760 ms |
75484 KB |
Output is correct |
4 |
Correct |
966 ms |
88780 KB |
Output is correct |
5 |
Correct |
1534 ms |
97448 KB |
Output is correct |
6 |
Correct |
1503 ms |
97452 KB |
Output is correct |
7 |
Correct |
739 ms |
75800 KB |
Output is correct |
8 |
Correct |
878 ms |
88648 KB |
Output is correct |
9 |
Correct |
937 ms |
95016 KB |
Output is correct |
10 |
Correct |
1159 ms |
97960 KB |
Output is correct |
11 |
Correct |
978 ms |
96040 KB |
Output is correct |
12 |
Correct |
969 ms |
96552 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1787 ms |
84524 KB |
Output is correct |
2 |
Correct |
1112 ms |
88616 KB |
Output is correct |
3 |
Correct |
2024 ms |
97120 KB |
Output is correct |
4 |
Correct |
1059 ms |
84812 KB |
Output is correct |
5 |
Correct |
1510 ms |
91340 KB |
Output is correct |
6 |
Correct |
1323 ms |
88764 KB |
Output is correct |
7 |
Correct |
2017 ms |
97192 KB |
Output is correct |
8 |
Correct |
2036 ms |
97068 KB |
Output is correct |
9 |
Correct |
1016 ms |
84812 KB |
Output is correct |
10 |
Correct |
1299 ms |
87096 KB |
Output is correct |
11 |
Correct |
1503 ms |
96564 KB |
Output is correct |
12 |
Correct |
1693 ms |
97448 KB |
Output is correct |
13 |
Correct |
1056 ms |
94048 KB |
Output is correct |
14 |
Correct |
1098 ms |
94120 KB |
Output is correct |
15 |
Correct |
1191 ms |
95656 KB |
Output is correct |
16 |
Correct |
1231 ms |
96296 KB |
Output is correct |
17 |
Correct |
1269 ms |
95656 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
26752 KB |
Output is correct |
2 |
Correct |
18 ms |
26752 KB |
Output is correct |
3 |
Correct |
18 ms |
26752 KB |
Output is correct |
4 |
Correct |
25 ms |
26752 KB |
Output is correct |
5 |
Correct |
19 ms |
26880 KB |
Output is correct |
6 |
Correct |
22 ms |
26880 KB |
Output is correct |
7 |
Correct |
18 ms |
26880 KB |
Output is correct |
8 |
Correct |
19 ms |
26912 KB |
Output is correct |
9 |
Correct |
21 ms |
26880 KB |
Output is correct |
10 |
Correct |
19 ms |
26880 KB |
Output is correct |
11 |
Correct |
25 ms |
26880 KB |
Output is correct |
12 |
Correct |
26 ms |
26964 KB |
Output is correct |
13 |
Correct |
19 ms |
26880 KB |
Output is correct |
14 |
Correct |
27 ms |
26880 KB |
Output is correct |
15 |
Correct |
19 ms |
26880 KB |
Output is correct |
16 |
Correct |
19 ms |
26880 KB |
Output is correct |
17 |
Correct |
19 ms |
26880 KB |
Output is correct |
18 |
Correct |
20 ms |
26880 KB |
Output is correct |
19 |
Correct |
19 ms |
26880 KB |
Output is correct |
20 |
Correct |
20 ms |
26880 KB |
Output is correct |
21 |
Correct |
19 ms |
26800 KB |
Output is correct |
22 |
Correct |
19 ms |
26872 KB |
Output is correct |
23 |
Correct |
20 ms |
26880 KB |
Output is correct |
24 |
Correct |
20 ms |
27008 KB |
Output is correct |
25 |
Correct |
20 ms |
26880 KB |
Output is correct |
26 |
Correct |
19 ms |
26880 KB |
Output is correct |
27 |
Correct |
19 ms |
26880 KB |
Output is correct |
28 |
Correct |
19 ms |
26880 KB |
Output is correct |
29 |
Correct |
19 ms |
26880 KB |
Output is correct |
30 |
Correct |
19 ms |
26880 KB |
Output is correct |
31 |
Correct |
366 ms |
41384 KB |
Output is correct |
32 |
Correct |
246 ms |
37464 KB |
Output is correct |
33 |
Correct |
381 ms |
39588 KB |
Output is correct |
34 |
Correct |
346 ms |
39700 KB |
Output is correct |
35 |
Correct |
364 ms |
41388 KB |
Output is correct |
36 |
Correct |
386 ms |
41256 KB |
Output is correct |
37 |
Correct |
330 ms |
39004 KB |
Output is correct |
38 |
Correct |
347 ms |
39152 KB |
Output is correct |
39 |
Correct |
288 ms |
40104 KB |
Output is correct |
40 |
Correct |
310 ms |
39848 KB |
Output is correct |
41 |
Correct |
256 ms |
38844 KB |
Output is correct |
42 |
Correct |
281 ms |
37444 KB |
Output is correct |
43 |
Correct |
141 ms |
39596 KB |
Output is correct |
44 |
Correct |
262 ms |
37600 KB |
Output is correct |
45 |
Correct |
250 ms |
38840 KB |
Output is correct |
46 |
Correct |
229 ms |
38876 KB |
Output is correct |
47 |
Correct |
185 ms |
36612 KB |
Output is correct |
48 |
Correct |
182 ms |
36812 KB |
Output is correct |
49 |
Correct |
209 ms |
37108 KB |
Output is correct |
50 |
Correct |
230 ms |
37144 KB |
Output is correct |
51 |
Correct |
211 ms |
37160 KB |
Output is correct |
52 |
Correct |
223 ms |
35448 KB |
Output is correct |
53 |
Correct |
217 ms |
36800 KB |
Output is correct |
54 |
Correct |
273 ms |
37044 KB |
Output is correct |
55 |
Correct |
239 ms |
37072 KB |
Output is correct |
56 |
Correct |
235 ms |
37840 KB |
Output is correct |
57 |
Correct |
254 ms |
37520 KB |
Output is correct |
58 |
Correct |
244 ms |
38060 KB |
Output is correct |
59 |
Correct |
251 ms |
36788 KB |
Output is correct |
60 |
Correct |
267 ms |
37516 KB |
Output is correct |
61 |
Correct |
108 ms |
36220 KB |
Output is correct |
62 |
Correct |
228 ms |
35556 KB |
Output is correct |
63 |
Correct |
250 ms |
36416 KB |
Output is correct |
64 |
Correct |
263 ms |
38344 KB |
Output is correct |
65 |
Correct |
269 ms |
37388 KB |
Output is correct |
66 |
Correct |
261 ms |
37900 KB |
Output is correct |
67 |
Correct |
174 ms |
35756 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
26752 KB |
Output is correct |
2 |
Correct |
18 ms |
26752 KB |
Output is correct |
3 |
Correct |
18 ms |
26752 KB |
Output is correct |
4 |
Correct |
25 ms |
26752 KB |
Output is correct |
5 |
Correct |
19 ms |
26880 KB |
Output is correct |
6 |
Correct |
22 ms |
26880 KB |
Output is correct |
7 |
Correct |
18 ms |
26880 KB |
Output is correct |
8 |
Correct |
19 ms |
26912 KB |
Output is correct |
9 |
Correct |
21 ms |
26880 KB |
Output is correct |
10 |
Correct |
19 ms |
26880 KB |
Output is correct |
11 |
Correct |
25 ms |
26880 KB |
Output is correct |
12 |
Correct |
26 ms |
26964 KB |
Output is correct |
13 |
Correct |
19 ms |
26880 KB |
Output is correct |
14 |
Correct |
27 ms |
26880 KB |
Output is correct |
15 |
Correct |
19 ms |
26880 KB |
Output is correct |
16 |
Correct |
19 ms |
26880 KB |
Output is correct |
17 |
Correct |
19 ms |
26880 KB |
Output is correct |
18 |
Correct |
20 ms |
26880 KB |
Output is correct |
19 |
Correct |
19 ms |
26880 KB |
Output is correct |
20 |
Correct |
20 ms |
26880 KB |
Output is correct |
21 |
Correct |
19 ms |
26800 KB |
Output is correct |
22 |
Correct |
19 ms |
26872 KB |
Output is correct |
23 |
Correct |
20 ms |
26880 KB |
Output is correct |
24 |
Correct |
20 ms |
27008 KB |
Output is correct |
25 |
Correct |
20 ms |
26880 KB |
Output is correct |
26 |
Correct |
19 ms |
26880 KB |
Output is correct |
27 |
Correct |
19 ms |
26880 KB |
Output is correct |
28 |
Correct |
19 ms |
26880 KB |
Output is correct |
29 |
Correct |
19 ms |
26880 KB |
Output is correct |
30 |
Correct |
19 ms |
26880 KB |
Output is correct |
31 |
Correct |
366 ms |
41384 KB |
Output is correct |
32 |
Correct |
246 ms |
37464 KB |
Output is correct |
33 |
Correct |
381 ms |
39588 KB |
Output is correct |
34 |
Correct |
346 ms |
39700 KB |
Output is correct |
35 |
Correct |
364 ms |
41388 KB |
Output is correct |
36 |
Correct |
386 ms |
41256 KB |
Output is correct |
37 |
Correct |
330 ms |
39004 KB |
Output is correct |
38 |
Correct |
347 ms |
39152 KB |
Output is correct |
39 |
Correct |
288 ms |
40104 KB |
Output is correct |
40 |
Correct |
310 ms |
39848 KB |
Output is correct |
41 |
Correct |
256 ms |
38844 KB |
Output is correct |
42 |
Correct |
281 ms |
37444 KB |
Output is correct |
43 |
Correct |
141 ms |
39596 KB |
Output is correct |
44 |
Correct |
262 ms |
37600 KB |
Output is correct |
45 |
Correct |
250 ms |
38840 KB |
Output is correct |
46 |
Correct |
229 ms |
38876 KB |
Output is correct |
47 |
Correct |
185 ms |
36612 KB |
Output is correct |
48 |
Correct |
182 ms |
36812 KB |
Output is correct |
49 |
Correct |
209 ms |
37108 KB |
Output is correct |
50 |
Correct |
230 ms |
37144 KB |
Output is correct |
51 |
Correct |
211 ms |
37160 KB |
Output is correct |
52 |
Correct |
1050 ms |
79628 KB |
Output is correct |
53 |
Correct |
1451 ms |
97448 KB |
Output is correct |
54 |
Correct |
760 ms |
75484 KB |
Output is correct |
55 |
Correct |
966 ms |
88780 KB |
Output is correct |
56 |
Correct |
1534 ms |
97448 KB |
Output is correct |
57 |
Correct |
1503 ms |
97452 KB |
Output is correct |
58 |
Correct |
739 ms |
75800 KB |
Output is correct |
59 |
Correct |
878 ms |
88648 KB |
Output is correct |
60 |
Correct |
937 ms |
95016 KB |
Output is correct |
61 |
Correct |
1159 ms |
97960 KB |
Output is correct |
62 |
Correct |
978 ms |
96040 KB |
Output is correct |
63 |
Correct |
969 ms |
96552 KB |
Output is correct |
64 |
Correct |
1787 ms |
84524 KB |
Output is correct |
65 |
Correct |
1112 ms |
88616 KB |
Output is correct |
66 |
Correct |
2024 ms |
97120 KB |
Output is correct |
67 |
Correct |
1059 ms |
84812 KB |
Output is correct |
68 |
Correct |
1510 ms |
91340 KB |
Output is correct |
69 |
Correct |
1323 ms |
88764 KB |
Output is correct |
70 |
Correct |
2017 ms |
97192 KB |
Output is correct |
71 |
Correct |
2036 ms |
97068 KB |
Output is correct |
72 |
Correct |
1016 ms |
84812 KB |
Output is correct |
73 |
Correct |
1299 ms |
87096 KB |
Output is correct |
74 |
Correct |
1503 ms |
96564 KB |
Output is correct |
75 |
Correct |
1693 ms |
97448 KB |
Output is correct |
76 |
Correct |
1056 ms |
94048 KB |
Output is correct |
77 |
Correct |
1098 ms |
94120 KB |
Output is correct |
78 |
Correct |
1191 ms |
95656 KB |
Output is correct |
79 |
Correct |
1231 ms |
96296 KB |
Output is correct |
80 |
Correct |
1269 ms |
95656 KB |
Output is correct |
81 |
Correct |
223 ms |
35448 KB |
Output is correct |
82 |
Correct |
217 ms |
36800 KB |
Output is correct |
83 |
Correct |
273 ms |
37044 KB |
Output is correct |
84 |
Correct |
239 ms |
37072 KB |
Output is correct |
85 |
Correct |
235 ms |
37840 KB |
Output is correct |
86 |
Correct |
254 ms |
37520 KB |
Output is correct |
87 |
Correct |
244 ms |
38060 KB |
Output is correct |
88 |
Correct |
251 ms |
36788 KB |
Output is correct |
89 |
Correct |
267 ms |
37516 KB |
Output is correct |
90 |
Correct |
108 ms |
36220 KB |
Output is correct |
91 |
Correct |
228 ms |
35556 KB |
Output is correct |
92 |
Correct |
250 ms |
36416 KB |
Output is correct |
93 |
Correct |
263 ms |
38344 KB |
Output is correct |
94 |
Correct |
269 ms |
37388 KB |
Output is correct |
95 |
Correct |
261 ms |
37900 KB |
Output is correct |
96 |
Correct |
174 ms |
35756 KB |
Output is correct |
97 |
Correct |
1348 ms |
88644 KB |
Output is correct |
98 |
Correct |
1246 ms |
80176 KB |
Output is correct |
99 |
Correct |
2462 ms |
90304 KB |
Output is correct |
100 |
Correct |
1336 ms |
76172 KB |
Output is correct |
101 |
Correct |
1810 ms |
92476 KB |
Output is correct |
102 |
Correct |
2561 ms |
99112 KB |
Output is correct |
103 |
Correct |
1831 ms |
88432 KB |
Output is correct |
104 |
Correct |
1973 ms |
88188 KB |
Output is correct |
105 |
Correct |
1624 ms |
99804 KB |
Output is correct |
106 |
Correct |
1695 ms |
87960 KB |
Output is correct |
107 |
Correct |
1421 ms |
83020 KB |
Output is correct |
108 |
Correct |
1406 ms |
81476 KB |
Output is correct |
109 |
Correct |
1529 ms |
93472 KB |
Output is correct |
110 |
Correct |
1431 ms |
81324 KB |
Output is correct |
111 |
Correct |
1441 ms |
87680 KB |
Output is correct |
112 |
Correct |
1479 ms |
89436 KB |
Output is correct |
113 |
Correct |
486 ms |
74076 KB |
Output is correct |
114 |
Correct |
1332 ms |
88444 KB |
Output is correct |
115 |
Correct |
1602 ms |
86444 KB |
Output is correct |
116 |
Correct |
1717 ms |
89712 KB |
Output is correct |
117 |
Correct |
1678 ms |
80820 KB |
Output is correct |
118 |
Correct |
1571 ms |
87724 KB |
Output is correct |
119 |
Correct |
922 ms |
71228 KB |
Output is correct |
120 |
Correct |
752 ms |
73548 KB |
Output is correct |
121 |
Correct |
930 ms |
78384 KB |
Output is correct |
122 |
Correct |
896 ms |
78248 KB |
Output is correct |
123 |
Correct |
1035 ms |
79672 KB |
Output is correct |
124 |
Correct |
1137 ms |
90872 KB |
Output is correct |
125 |
Correct |
1026 ms |
80336 KB |
Output is correct |
126 |
Correct |
1166 ms |
91688 KB |
Output is correct |