//#pragma GCC optimize("Ofast,unroll-loops")
#include <bits/stdc++.h>
using namespace std;
typedef long long llo;
#define mp make_pair
#define pb push_back
#define a first
#define b second
#define endl '\n'
int n,k,q;
int ans[300001];
set<int> pre[300001];
map<int,int> pre2[300001];
bool vis[3000001];
map<pair<int,pair<int,int>>,int> xx;
map<pair<int,pair<int,int>>,int> xx2;
map<int,int> ss;
map<int,int> ss2;
vector<pair<int,int>> yy;
int ne=0;
int nn;
pair<int,int> solve(int i,int j){
pair<int,int> ac={i,0};
pair<int,int> ac2={j+1,0};
return {lower_bound(yy.begin(),yy.end(),ac)-yy.begin(),lower_bound(yy.begin(),yy.end(),ac2)-yy.begin()-1};
}
priority_queue<pair<int,int>> tree[4*800001];
priority_queue<pair<int,int>> tree2[4*800001];
int tree3[4*800001][2];
int kk=1;
//int ans[300001];
void update(int no,int l,int r,int aa,int bb,pair<int,int> x,int st){
/*if(no==0){
cout<<aa<<":"<<bb<<":"<<x.a<<":"<<x.b<<endl;
}*/
if(r<aa or l>bb){
return;
}
if(aa<=l and r<=bb){
//cout<<l<<",,"<<r<<endl;
if(kk){
if(tree[no].size()){
pair<int,int> ma=tree[no].top();
tree[no].pop();
tree[no].push(max(ma,x));
ma=tree2[no].top();
tree2[no].pop();
tree2[no].push(max(ma,{-x.a,x.b}));
}
else{
tree[no].push(x);
tree2[no].push({-x.a,x.b});
}
return ;
}
tree[no].push(x);
tree2[no].push({-x.a,x.b});
}
else{
int mid=(l+r)/2;
update(no*2+1,l,mid,aa,bb,x,st);
update(no*2+2,mid+1,r,aa,bb,x,st);
}
}
void update2(int no,int l,int r,int aa,int bb,int x,int st){
/* if(no==0){
cout<<aa<<":"<<bb<<":"<<x<<endl;
}*/
if(r<aa or l>bb){
return;
}
if(aa<=l and r<=bb){
//cout<<l<<",,"<<r<<endl;
tree3[no][0]=min(tree3[no][0],x);
tree3[no][1]=max(tree3[no][1],x);
/* if(kk){
if(tree[no].size()){
pair<int,int> ma=tree[no].top();
tree[no].pop();
tree[no].push(max(ma,x));
ma=tree2[no].top();
tree2[no].pop();
tree2[no].push(max(ma,{-x.a,x.b}));
}
else{
tree[no].push(x);
tree2[no].push({-x.a,x.b});
}
return ;
}
tree[no].push(x);
tree2[no].push({-x.a,x.b});
*/
}
else{
int mid=(l+r)/2;
update2(no*2+1,l,mid,aa,bb,x,st);
update2(no*2+2,mid+1,r,aa,bb,x,st);
}
}
int query(int no,int l,int r,int i){
int cur=0;
while(tree[no].size()){
if(vis[(tree[no].top()).b]){
tree[no].pop();
}
else{
break;
}
}
while(tree2[no].size()){
if(vis[(tree2[no].top()).b]){
tree2[no].pop();
}
else{
break;
}
}
if(tree[no].size()){
//cout<<l<<","<<r<<","<<yy[i].a<<endl;
cur=max(cur,abs((tree[no].top()).a-yy[i].a));
cur=max(cur,abs(-(tree2[no].top()).a-yy[i].a));
}
if(l<r){
int mid=(l+r)/2;
if(i<=mid){
cur=max(cur,query(no*2+1,l,mid,i));
}
else{
cur=max(cur,query(no*2+2,mid+1,r,i));
}
}
return cur;
}
int query2(int no,int l,int r,int i){
int cur=0;
//cout<<l<<"<"<<r<<"<"<<yy[i].a<<"<"<<tree3[no][0]<<"<"<<tree3[no][1]<<endl;
cur=max(cur,yy[i].a-tree3[no][0]);
cur=max(cur,tree3[no][1]-yy[i].a);
if(l<r){
int mid=(l+r)/2;
if(i<=mid){
cur=max(cur,query2(no*2+1,l,mid,i));
}
else{
cur=max(cur,query2(no*2+2,mid+1,r,i));
}
}
return cur;
}
void add(int i,int aa,int bb,int st){
int mid=(aa+bb)/2;
if(kk==1){
if(st==1){
//cout<<aa<<","<<bb<<endl;
// xx[{i,{aa,mid}}]=ne;
pair<int,int> ind=solve(aa,mid);
update2(0,0,nn-1,ind.a,ind.b,aa,0);
//ne++;
//xx[{i,{mid+1,bb}}]=ne;
ind=solve(mid+1,bb);
update2(0,0,nn-1,ind.a,ind.b,bb,0);
//ne++;
}
return ;
}
if(st==1){
xx[{i,{aa,mid}}]=ne;
pair<int,int> ind=solve(aa,mid);
update(0,0,nn-1,ind.a,ind.b,{aa,ne},0);
ne++;
xx[{i,{mid+1,bb}}]=ne;
ind=solve(mid+1,bb);
update(0,0,nn-1,ind.a,ind.b,{bb,ne},1);
ne++;
}
else{
vis[xx[{i,{aa,mid}}]]=1;
vis[xx[{i,{mid+1,bb}}]]=1;
}
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin>>n>>k>>q;
vector<pair<pair<int,int>,pair<int,int>>> cur;
vector<pair<int,int>> zz5;
for(int i=0;i<n;i++){
int x,aa,bb,tt;
cin>>x>>tt>>aa>>bb;
ss[x]++;
tt--;
if(aa!=1){
kk=0;
}
cur.pb({{aa,-1},{x,tt}});
cur.pb({{bb,1},{x,tt}});
// pre[tt].insert(x);
zz5.pb({tt,x});
}
for(int i=0;i<q;i++){
int x,aa;
cin>>x>>aa;
ss[x]++;
cur.pb({{aa,0},{x,i}});
/*if(kk){
//pre[aa].insert(x);
}*/
}
if(kk){
for(auto j:zz5){
pre[j.a].insert(j.b);
}
for(int i=0;i<4*ss.size()+10;i++){
tree3[i][0]=1e8;
tree3[i][1]=0;
}
}
sort(cur.begin(),cur.end());
int ind5=-1;
ss[-2e8]++;
ss[2e8]++;
for(auto j:ss){
ind5++;
ss2[j.a]=ind5;
yy.pb({j.a,ind5});
}
nn=yy.size();
//sort(cur.begin(),cur.end());
/*for(auto j:yy){
cout<<j.a<<",";
}
cout<<endl;*/
//cout<<kk<<endl;
for(int i=0;i<k;i++){
pre[i].insert(-2e8);
pre2[i][-2e8]++;
pre[i].insert(2e8);
pre2[i][2e8]++;
//if(kk==0){
/*if(kk==0){
add(i,-2e8,2e8,1);
}*/
// xx[{i,{-2e8,2e8}}]=;
// update(0,0,nn-1,0,nn-1);
}
for(int i=0;i<k;i++){
vector<int> xx;
for(auto j:pre[i]){
xx.pb(j);
}
/* for(auto j:xx){
cout<<j<<".";
}
cout<<endl;*/
for(int j=0;j+1<xx.size();j++){
add(i,xx[j],xx[j+1],1);
//cout<<i<<":"<<xx[j]<<":"<<xx[j+1]<<endl;
}
}
for(auto j:cur){
if(j.a.b==-1){
//add
/*if(kk){
continue;
}*/
//continue;
if(pre2[j.b.b].find(j.b.a)!=pre2[j.b.b].end()){
if(pre2[j.b.b][j.b.a]>0){
pre2[j.b.b][j.b.a]++;
continue;
}
}
//else{
pre2[j.b.b][j.b.a]++;
if(kk){
continue;
}
int re=*(pre[j.b.b].lower_bound(j.b.a));
auto jj=pre[j.b.b].lower_bound(j.b.a);
jj--;
int le=*jj;
pre[j.b.b].insert(j.b.a);
add(j.b.b,le,re,0);
add(j.b.b,le,j.b.a,1);
add(j.b.b,j.b.a,re,1);
//}
}
else if(j.a.b==1){
//remove
/*if(kk){
continue;
}*/
//continue;
pre2[j.b.b][j.b.a]--;
if(pre2[j.b.b][j.b.a]==0){
//cout<<11<<endl;
pre[j.b.b].erase(j.b.a);
int re=*(pre[j.b.b].lower_bound(j.b.a));
auto jj=pre[j.b.b].lower_bound(j.b.a);
jj--;
int le=*jj;
add(j.b.b,le,j.b.a,0);
add(j.b.b,j.b.a,re,0);
add(j.b.b,le,re,1);
}
}
else{
//cout<<j.b.a<<":"<<j.b.b<<endl;
if(kk){
int ans2=query2(0,0,nn-1,ss2[j.b.a]);
if(ans2>1e8){
ans2=-1;
}
ans[j.b.b]=ans2;
continue;
}
int ans2=query(0,0,nn-1,ss2[j.b.a]);
if(ans2>1e8){
ans2=-1;
}
ans[j.b.b]=ans2;
}
}
for(int i=0;i<q;i++){
cout<<ans[i]<<endl;
}
/*for(int i=0;i<cur.size();i++){
cur[i].b.a=ss2[cur[i].b.a];
}*/
return 0;
}
Compilation message
new_home.cpp: In function 'int main()':
new_home.cpp:238:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::map<int, int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
238 | for(int i=0;i<4*ss.size()+10;i++){
| ~^~~~~~~~~~~~~~~
new_home.cpp:287:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
287 | for(int j=0;j+1<xx.size();j++){
| ~~~^~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
122 ms |
228804 KB |
Output is correct |
2 |
Correct |
122 ms |
228788 KB |
Output is correct |
3 |
Correct |
122 ms |
228868 KB |
Output is correct |
4 |
Correct |
136 ms |
228804 KB |
Output is correct |
5 |
Correct |
123 ms |
228928 KB |
Output is correct |
6 |
Correct |
126 ms |
229388 KB |
Output is correct |
7 |
Correct |
125 ms |
229712 KB |
Output is correct |
8 |
Correct |
128 ms |
229508 KB |
Output is correct |
9 |
Correct |
137 ms |
229760 KB |
Output is correct |
10 |
Correct |
124 ms |
229368 KB |
Output is correct |
11 |
Correct |
129 ms |
229452 KB |
Output is correct |
12 |
Correct |
125 ms |
229528 KB |
Output is correct |
13 |
Correct |
125 ms |
229444 KB |
Output is correct |
14 |
Correct |
125 ms |
229316 KB |
Output is correct |
15 |
Correct |
129 ms |
229472 KB |
Output is correct |
16 |
Correct |
134 ms |
229704 KB |
Output is correct |
17 |
Correct |
148 ms |
229444 KB |
Output is correct |
18 |
Correct |
128 ms |
229588 KB |
Output is correct |
19 |
Correct |
125 ms |
229544 KB |
Output is correct |
20 |
Correct |
131 ms |
229596 KB |
Output is correct |
21 |
Correct |
121 ms |
228932 KB |
Output is correct |
22 |
Correct |
128 ms |
229704 KB |
Output is correct |
23 |
Correct |
127 ms |
229648 KB |
Output is correct |
24 |
Correct |
128 ms |
229508 KB |
Output is correct |
25 |
Correct |
126 ms |
229504 KB |
Output is correct |
26 |
Correct |
124 ms |
229452 KB |
Output is correct |
27 |
Correct |
125 ms |
229240 KB |
Output is correct |
28 |
Correct |
140 ms |
229448 KB |
Output is correct |
29 |
Correct |
125 ms |
229428 KB |
Output is correct |
30 |
Correct |
130 ms |
229324 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
122 ms |
228804 KB |
Output is correct |
2 |
Correct |
122 ms |
228788 KB |
Output is correct |
3 |
Correct |
122 ms |
228868 KB |
Output is correct |
4 |
Correct |
136 ms |
228804 KB |
Output is correct |
5 |
Correct |
123 ms |
228928 KB |
Output is correct |
6 |
Correct |
126 ms |
229388 KB |
Output is correct |
7 |
Correct |
125 ms |
229712 KB |
Output is correct |
8 |
Correct |
128 ms |
229508 KB |
Output is correct |
9 |
Correct |
137 ms |
229760 KB |
Output is correct |
10 |
Correct |
124 ms |
229368 KB |
Output is correct |
11 |
Correct |
129 ms |
229452 KB |
Output is correct |
12 |
Correct |
125 ms |
229528 KB |
Output is correct |
13 |
Correct |
125 ms |
229444 KB |
Output is correct |
14 |
Correct |
125 ms |
229316 KB |
Output is correct |
15 |
Correct |
129 ms |
229472 KB |
Output is correct |
16 |
Correct |
134 ms |
229704 KB |
Output is correct |
17 |
Correct |
148 ms |
229444 KB |
Output is correct |
18 |
Correct |
128 ms |
229588 KB |
Output is correct |
19 |
Correct |
125 ms |
229544 KB |
Output is correct |
20 |
Correct |
131 ms |
229596 KB |
Output is correct |
21 |
Correct |
121 ms |
228932 KB |
Output is correct |
22 |
Correct |
128 ms |
229704 KB |
Output is correct |
23 |
Correct |
127 ms |
229648 KB |
Output is correct |
24 |
Correct |
128 ms |
229508 KB |
Output is correct |
25 |
Correct |
126 ms |
229504 KB |
Output is correct |
26 |
Correct |
124 ms |
229452 KB |
Output is correct |
27 |
Correct |
125 ms |
229240 KB |
Output is correct |
28 |
Correct |
140 ms |
229448 KB |
Output is correct |
29 |
Correct |
125 ms |
229428 KB |
Output is correct |
30 |
Correct |
130 ms |
229324 KB |
Output is correct |
31 |
Correct |
2812 ms |
348716 KB |
Output is correct |
32 |
Correct |
192 ms |
234008 KB |
Output is correct |
33 |
Correct |
2130 ms |
311484 KB |
Output is correct |
34 |
Correct |
2972 ms |
350588 KB |
Output is correct |
35 |
Correct |
2566 ms |
337144 KB |
Output is correct |
36 |
Correct |
2140 ms |
310952 KB |
Output is correct |
37 |
Correct |
2037 ms |
317216 KB |
Output is correct |
38 |
Correct |
1679 ms |
300916 KB |
Output is correct |
39 |
Correct |
1278 ms |
305464 KB |
Output is correct |
40 |
Correct |
1254 ms |
301068 KB |
Output is correct |
41 |
Correct |
3153 ms |
331880 KB |
Output is correct |
42 |
Correct |
3154 ms |
335440 KB |
Output is correct |
43 |
Correct |
208 ms |
234188 KB |
Output is correct |
44 |
Correct |
3107 ms |
330856 KB |
Output is correct |
45 |
Correct |
3069 ms |
323112 KB |
Output is correct |
46 |
Correct |
2961 ms |
313080 KB |
Output is correct |
47 |
Correct |
1422 ms |
326680 KB |
Output is correct |
48 |
Correct |
1280 ms |
324616 KB |
Output is correct |
49 |
Correct |
1535 ms |
329200 KB |
Output is correct |
50 |
Correct |
1666 ms |
341460 KB |
Output is correct |
51 |
Correct |
1546 ms |
323888 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3560 ms |
369592 KB |
Output is correct |
2 |
Correct |
2588 ms |
356800 KB |
Output is correct |
3 |
Correct |
3104 ms |
414248 KB |
Output is correct |
4 |
Correct |
3333 ms |
376712 KB |
Output is correct |
5 |
Correct |
2589 ms |
356232 KB |
Output is correct |
6 |
Correct |
2563 ms |
356792 KB |
Output is correct |
7 |
Correct |
2900 ms |
414376 KB |
Output is correct |
8 |
Correct |
3120 ms |
376900 KB |
Output is correct |
9 |
Correct |
3100 ms |
363628 KB |
Output is correct |
10 |
Correct |
2730 ms |
357532 KB |
Output is correct |
11 |
Correct |
1721 ms |
355280 KB |
Output is correct |
12 |
Correct |
2058 ms |
356876 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3884 ms |
359272 KB |
Output is correct |
2 |
Correct |
466 ms |
255580 KB |
Output is correct |
3 |
Correct |
3729 ms |
368244 KB |
Output is correct |
4 |
Correct |
3101 ms |
425096 KB |
Output is correct |
5 |
Correct |
3642 ms |
379780 KB |
Output is correct |
6 |
Correct |
3501 ms |
387312 KB |
Output is correct |
7 |
Correct |
3759 ms |
367556 KB |
Output is correct |
8 |
Correct |
3809 ms |
368056 KB |
Output is correct |
9 |
Correct |
3272 ms |
426320 KB |
Output is correct |
10 |
Correct |
3783 ms |
383932 KB |
Output is correct |
11 |
Correct |
4276 ms |
372884 KB |
Output is correct |
12 |
Correct |
4239 ms |
368988 KB |
Output is correct |
13 |
Correct |
1755 ms |
364856 KB |
Output is correct |
14 |
Correct |
1714 ms |
363708 KB |
Output is correct |
15 |
Correct |
1978 ms |
366368 KB |
Output is correct |
16 |
Correct |
2260 ms |
368288 KB |
Output is correct |
17 |
Correct |
1945 ms |
366024 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
122 ms |
228804 KB |
Output is correct |
2 |
Correct |
122 ms |
228788 KB |
Output is correct |
3 |
Correct |
122 ms |
228868 KB |
Output is correct |
4 |
Correct |
136 ms |
228804 KB |
Output is correct |
5 |
Correct |
123 ms |
228928 KB |
Output is correct |
6 |
Correct |
126 ms |
229388 KB |
Output is correct |
7 |
Correct |
125 ms |
229712 KB |
Output is correct |
8 |
Correct |
128 ms |
229508 KB |
Output is correct |
9 |
Correct |
137 ms |
229760 KB |
Output is correct |
10 |
Correct |
124 ms |
229368 KB |
Output is correct |
11 |
Correct |
129 ms |
229452 KB |
Output is correct |
12 |
Correct |
125 ms |
229528 KB |
Output is correct |
13 |
Correct |
125 ms |
229444 KB |
Output is correct |
14 |
Correct |
125 ms |
229316 KB |
Output is correct |
15 |
Correct |
129 ms |
229472 KB |
Output is correct |
16 |
Correct |
134 ms |
229704 KB |
Output is correct |
17 |
Correct |
148 ms |
229444 KB |
Output is correct |
18 |
Correct |
128 ms |
229588 KB |
Output is correct |
19 |
Correct |
125 ms |
229544 KB |
Output is correct |
20 |
Correct |
131 ms |
229596 KB |
Output is correct |
21 |
Correct |
121 ms |
228932 KB |
Output is correct |
22 |
Correct |
128 ms |
229704 KB |
Output is correct |
23 |
Correct |
127 ms |
229648 KB |
Output is correct |
24 |
Correct |
128 ms |
229508 KB |
Output is correct |
25 |
Correct |
126 ms |
229504 KB |
Output is correct |
26 |
Correct |
124 ms |
229452 KB |
Output is correct |
27 |
Correct |
125 ms |
229240 KB |
Output is correct |
28 |
Correct |
140 ms |
229448 KB |
Output is correct |
29 |
Correct |
125 ms |
229428 KB |
Output is correct |
30 |
Correct |
130 ms |
229324 KB |
Output is correct |
31 |
Correct |
2812 ms |
348716 KB |
Output is correct |
32 |
Correct |
192 ms |
234008 KB |
Output is correct |
33 |
Correct |
2130 ms |
311484 KB |
Output is correct |
34 |
Correct |
2972 ms |
350588 KB |
Output is correct |
35 |
Correct |
2566 ms |
337144 KB |
Output is correct |
36 |
Correct |
2140 ms |
310952 KB |
Output is correct |
37 |
Correct |
2037 ms |
317216 KB |
Output is correct |
38 |
Correct |
1679 ms |
300916 KB |
Output is correct |
39 |
Correct |
1278 ms |
305464 KB |
Output is correct |
40 |
Correct |
1254 ms |
301068 KB |
Output is correct |
41 |
Correct |
3153 ms |
331880 KB |
Output is correct |
42 |
Correct |
3154 ms |
335440 KB |
Output is correct |
43 |
Correct |
208 ms |
234188 KB |
Output is correct |
44 |
Correct |
3107 ms |
330856 KB |
Output is correct |
45 |
Correct |
3069 ms |
323112 KB |
Output is correct |
46 |
Correct |
2961 ms |
313080 KB |
Output is correct |
47 |
Correct |
1422 ms |
326680 KB |
Output is correct |
48 |
Correct |
1280 ms |
324616 KB |
Output is correct |
49 |
Correct |
1535 ms |
329200 KB |
Output is correct |
50 |
Correct |
1666 ms |
341460 KB |
Output is correct |
51 |
Correct |
1546 ms |
323888 KB |
Output is correct |
52 |
Correct |
2067 ms |
387352 KB |
Output is correct |
53 |
Correct |
2021 ms |
379580 KB |
Output is correct |
54 |
Correct |
2538 ms |
371984 KB |
Output is correct |
55 |
Correct |
2533 ms |
356976 KB |
Output is correct |
56 |
Correct |
2301 ms |
360304 KB |
Output is correct |
57 |
Correct |
2704 ms |
341688 KB |
Output is correct |
58 |
Correct |
2551 ms |
354984 KB |
Output is correct |
59 |
Correct |
2465 ms |
357908 KB |
Output is correct |
60 |
Correct |
2721 ms |
342864 KB |
Output is correct |
61 |
Correct |
235 ms |
251172 KB |
Output is correct |
62 |
Correct |
2059 ms |
377464 KB |
Output is correct |
63 |
Correct |
2256 ms |
369488 KB |
Output is correct |
64 |
Correct |
2430 ms |
372068 KB |
Output is correct |
65 |
Correct |
2561 ms |
360236 KB |
Output is correct |
66 |
Correct |
2825 ms |
341220 KB |
Output is correct |
67 |
Correct |
901 ms |
278068 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
122 ms |
228804 KB |
Output is correct |
2 |
Correct |
122 ms |
228788 KB |
Output is correct |
3 |
Correct |
122 ms |
228868 KB |
Output is correct |
4 |
Correct |
136 ms |
228804 KB |
Output is correct |
5 |
Correct |
123 ms |
228928 KB |
Output is correct |
6 |
Correct |
126 ms |
229388 KB |
Output is correct |
7 |
Correct |
125 ms |
229712 KB |
Output is correct |
8 |
Correct |
128 ms |
229508 KB |
Output is correct |
9 |
Correct |
137 ms |
229760 KB |
Output is correct |
10 |
Correct |
124 ms |
229368 KB |
Output is correct |
11 |
Correct |
129 ms |
229452 KB |
Output is correct |
12 |
Correct |
125 ms |
229528 KB |
Output is correct |
13 |
Correct |
125 ms |
229444 KB |
Output is correct |
14 |
Correct |
125 ms |
229316 KB |
Output is correct |
15 |
Correct |
129 ms |
229472 KB |
Output is correct |
16 |
Correct |
134 ms |
229704 KB |
Output is correct |
17 |
Correct |
148 ms |
229444 KB |
Output is correct |
18 |
Correct |
128 ms |
229588 KB |
Output is correct |
19 |
Correct |
125 ms |
229544 KB |
Output is correct |
20 |
Correct |
131 ms |
229596 KB |
Output is correct |
21 |
Correct |
121 ms |
228932 KB |
Output is correct |
22 |
Correct |
128 ms |
229704 KB |
Output is correct |
23 |
Correct |
127 ms |
229648 KB |
Output is correct |
24 |
Correct |
128 ms |
229508 KB |
Output is correct |
25 |
Correct |
126 ms |
229504 KB |
Output is correct |
26 |
Correct |
124 ms |
229452 KB |
Output is correct |
27 |
Correct |
125 ms |
229240 KB |
Output is correct |
28 |
Correct |
140 ms |
229448 KB |
Output is correct |
29 |
Correct |
125 ms |
229428 KB |
Output is correct |
30 |
Correct |
130 ms |
229324 KB |
Output is correct |
31 |
Correct |
2812 ms |
348716 KB |
Output is correct |
32 |
Correct |
192 ms |
234008 KB |
Output is correct |
33 |
Correct |
2130 ms |
311484 KB |
Output is correct |
34 |
Correct |
2972 ms |
350588 KB |
Output is correct |
35 |
Correct |
2566 ms |
337144 KB |
Output is correct |
36 |
Correct |
2140 ms |
310952 KB |
Output is correct |
37 |
Correct |
2037 ms |
317216 KB |
Output is correct |
38 |
Correct |
1679 ms |
300916 KB |
Output is correct |
39 |
Correct |
1278 ms |
305464 KB |
Output is correct |
40 |
Correct |
1254 ms |
301068 KB |
Output is correct |
41 |
Correct |
3153 ms |
331880 KB |
Output is correct |
42 |
Correct |
3154 ms |
335440 KB |
Output is correct |
43 |
Correct |
208 ms |
234188 KB |
Output is correct |
44 |
Correct |
3107 ms |
330856 KB |
Output is correct |
45 |
Correct |
3069 ms |
323112 KB |
Output is correct |
46 |
Correct |
2961 ms |
313080 KB |
Output is correct |
47 |
Correct |
1422 ms |
326680 KB |
Output is correct |
48 |
Correct |
1280 ms |
324616 KB |
Output is correct |
49 |
Correct |
1535 ms |
329200 KB |
Output is correct |
50 |
Correct |
1666 ms |
341460 KB |
Output is correct |
51 |
Correct |
1546 ms |
323888 KB |
Output is correct |
52 |
Correct |
3560 ms |
369592 KB |
Output is correct |
53 |
Correct |
2588 ms |
356800 KB |
Output is correct |
54 |
Correct |
3104 ms |
414248 KB |
Output is correct |
55 |
Correct |
3333 ms |
376712 KB |
Output is correct |
56 |
Correct |
2589 ms |
356232 KB |
Output is correct |
57 |
Correct |
2563 ms |
356792 KB |
Output is correct |
58 |
Correct |
2900 ms |
414376 KB |
Output is correct |
59 |
Correct |
3120 ms |
376900 KB |
Output is correct |
60 |
Correct |
3100 ms |
363628 KB |
Output is correct |
61 |
Correct |
2730 ms |
357532 KB |
Output is correct |
62 |
Correct |
1721 ms |
355280 KB |
Output is correct |
63 |
Correct |
2058 ms |
356876 KB |
Output is correct |
64 |
Correct |
3884 ms |
359272 KB |
Output is correct |
65 |
Correct |
466 ms |
255580 KB |
Output is correct |
66 |
Correct |
3729 ms |
368244 KB |
Output is correct |
67 |
Correct |
3101 ms |
425096 KB |
Output is correct |
68 |
Correct |
3642 ms |
379780 KB |
Output is correct |
69 |
Correct |
3501 ms |
387312 KB |
Output is correct |
70 |
Correct |
3759 ms |
367556 KB |
Output is correct |
71 |
Correct |
3809 ms |
368056 KB |
Output is correct |
72 |
Correct |
3272 ms |
426320 KB |
Output is correct |
73 |
Correct |
3783 ms |
383932 KB |
Output is correct |
74 |
Correct |
4276 ms |
372884 KB |
Output is correct |
75 |
Correct |
4239 ms |
368988 KB |
Output is correct |
76 |
Correct |
1755 ms |
364856 KB |
Output is correct |
77 |
Correct |
1714 ms |
363708 KB |
Output is correct |
78 |
Correct |
1978 ms |
366368 KB |
Output is correct |
79 |
Correct |
2260 ms |
368288 KB |
Output is correct |
80 |
Correct |
1945 ms |
366024 KB |
Output is correct |
81 |
Correct |
2067 ms |
387352 KB |
Output is correct |
82 |
Correct |
2021 ms |
379580 KB |
Output is correct |
83 |
Correct |
2538 ms |
371984 KB |
Output is correct |
84 |
Correct |
2533 ms |
356976 KB |
Output is correct |
85 |
Correct |
2301 ms |
360304 KB |
Output is correct |
86 |
Correct |
2704 ms |
341688 KB |
Output is correct |
87 |
Correct |
2551 ms |
354984 KB |
Output is correct |
88 |
Correct |
2465 ms |
357908 KB |
Output is correct |
89 |
Correct |
2721 ms |
342864 KB |
Output is correct |
90 |
Correct |
235 ms |
251172 KB |
Output is correct |
91 |
Correct |
2059 ms |
377464 KB |
Output is correct |
92 |
Correct |
2256 ms |
369488 KB |
Output is correct |
93 |
Correct |
2430 ms |
372068 KB |
Output is correct |
94 |
Correct |
2561 ms |
360236 KB |
Output is correct |
95 |
Correct |
2825 ms |
341220 KB |
Output is correct |
96 |
Correct |
901 ms |
278068 KB |
Output is correct |
97 |
Execution timed out |
5097 ms |
676828 KB |
Time limit exceeded |
98 |
Halted |
0 ms |
0 KB |
- |