답안 #152229

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
152229 2019-09-06T21:17:48 Z TadijaSebez 새 집 (APIO18_new_home) C++11
80 / 100
5000 ms 437260 KB
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define l_type 0
#define r_type 1
const int N=300050;
const int mxx=1e8;
int x[N],t[N],a[N],b[N],qx[N],qt[N],n,q,k,ans[N],myl[N],myr[N];
struct cmp{ bool operator () (int i, int j) const { return x[i]<x[j] || (x[i]==x[j] && i<j);}};
set<int,cmp> house[N];
const int H=8*N;
int type[H],l[H],r[H],tl[H],tr[H],hsz;
int act[N],active,cur_time;
int Seg(int ty, int _l, int _r, int _tl){ hsz++;type[hsz]=ty;l[hsz]=_l;r[hsz]=_r;tl[hsz]=_tl;tr[hsz]=-1;return hsz;}
void S(int i, int j)
{
	if(i==0) myr[j]=Seg(r_type,1,x[j],cur_time);
	else if(j==0) myl[i]=Seg(l_type,x[i],mxx,cur_time);
	else
	{
        int mid=x[i]+x[j]>>1;
        myl[i]=Seg(l_type,x[i],mid,cur_time);
        myr[j]=Seg(r_type,mid+((x[j]-x[i])%2==1),x[j],cur_time);
	}
}
void E(int i, int j)
{
	if(i!=0) tr[myl[i]]=cur_time-1;
	if(j!=0) tr[myr[j]]=cur_time-1;
}
void Add(int i)
{
	act[t[i]]++;if(act[t[i]]==1) active++;
	house[t[i]].insert(i);
	auto it=house[t[i]].find(i);
	bool lf=0,rf=0;
	auto L=it,R=it;
	if(L!=house[t[i]].begin()) L--,lf=1;
	R++;if(R!=house[t[i]].end()) rf=1;
	if(lf && rf) E(*L,*R),S(*L,i),S(i,*R);
	else if(lf) E(*L,0),S(*L,i),S(i,0);
	else if(rf) E(0,*R),S(i,*R),S(0,i);
	else S(0,i),S(i,0);
}
void Del(int i)
{
	act[t[i]]--;if(act[t[i]]==0) active--;
	auto it=house[t[i]].find(i);
	bool lf=0,rf=0;
	auto L=it,R=it;
	if(L!=house[t[i]].begin()) L--,lf=1;
	R++;if(R!=house[t[i]].end()) rf=1;
	if(lf && rf) E(*L,i),E(i,*R),S(*L,*R);
	else if(lf) E(*L,i),E(i,0),S(*L,0);
	else if(rf) E(i,*R),E(0,i),S(0,*R);
	else E(0,i),E(i,0);
	house[t[i]].erase(i);
}
vector<int> cmpr_time;
int get_time_id(int x){ return lower_bound(cmpr_time.begin(),cmpr_time.end(),x)-cmpr_time.begin();}
const int M=2*N;
vector<int> lst[M],rst[M];
int ls[M],rs[M],tsz,root,lim,l_ptr[M],r_ptr[M];
void Build(int &c, int ss, int se, vector<int> l_segs, vector<int> r_segs)
{
	c=++tsz;
	vector<int> l_push[2],r_push[2];
	lst[c].reserve(l_segs.size());
rst[c].reserve(r_segs.size());
l_push[0].reserve(l_segs.size());
l_push[1].reserve(l_segs.size());
r_push[0].reserve(r_segs.size());
r_push[1].reserve(r_segs.size());
int mid=ss+se>>1;
    for(int i:l_segs)
	{
		if(tl[i]<=cmpr_time[ss] && tr[i]>=cmpr_time[se]) lst[c].pb(i);
		else
		{
			if(tl[i]<=cmpr_time[mid]) l_push[0].pb(i);
			if(tr[i]>=cmpr_time[mid+1]) l_push[1].pb(i);
		}
	}
    for(int i:r_segs)
	{
		if(tl[i]<=cmpr_time[ss] && tr[i]>=cmpr_time[se]) rst[c].pb(i);
		else
		{
			if(tl[i]<=cmpr_time[mid]) r_push[0].pb(i);
			if(tr[i]>=cmpr_time[mid+1]) r_push[1].pb(i);
		}
	}
	if(ss==se) return;
	Build(ls[c],ss,mid,l_push[0],r_push[0]);
	Build(rs[c],mid+1,se,l_push[1],r_push[1]);
}
int GetL(int c, int ss, int se, int id)
{
	while(l_ptr[c]<lst[c].size() && r[lst[c][l_ptr[c]]]<qx[id]) l_ptr[c]++;
	int ans=l_ptr[c]==lst[c].size()?0:qx[id]-l[lst[c][l_ptr[c]]];
	if(ss==se) return ans;
	int mid=ss+se>>1;
	if(qt[id]<=cmpr_time[mid]) ans=max(ans,GetL(ls[c],ss,mid,id));
	else ans=max(ans,GetL(rs[c],mid+1,se,id));
	return ans;
}
int GetR(int c, int ss, int se, int id)
{
	while(r_ptr[c]<rst[c].size() && l[rst[c][r_ptr[c]]]>qx[id]) r_ptr[c]++;
	int ans=r_ptr[c]==rst[c].size()?0:r[rst[c][r_ptr[c]]]-qx[id];
	if(ss==se) return ans;
	int mid=ss+se>>1;
	if(qt[id]<=cmpr_time[mid]) ans=max(ans,GetR(ls[c],ss,mid,id));
	else ans=max(ans,GetR(rs[c],mid+1,se,id));
	return ans;
}
int main()
{
	scanf("%i %i %i",&n,&k,&q);
	vector<pair<int,int>> events;
	for(int i=1;i<=n;i++) scanf("%i %i %i %i",&x[i],&t[i],&a[i],&b[i]),events.pb({a[i],i}),events.pb({b[i]+1,-i});
	for(int i=1;i<=q;i++) scanf("%i %i",&qx[i],&qt[i]),events.pb({qt[i],n+i}),cmpr_time.pb(qt[i]);
	sort(cmpr_time.begin(),cmpr_time.end());
	cmpr_time.resize(unique(cmpr_time.begin(),cmpr_time.end())-cmpr_time.begin());
	sort(events.begin(),events.end());
	for(int i=0;i<events.size();i++)
	{
		int id=events[i].second;
		cur_time=events[i].first;
		if(id<0) Del(-id);
		else if(id<=n) Add(id);
		else if(active!=k) ans[id-n]=-1;
	}
	for(int i=1;i<=hsz;i++) if(tr[i]==-1) tr[i]=cur_time;
	vector<int> l_segs,r_segs;
	l_segs.reserve(hsz);
	r_segs.reserve(hsz);
	for(int i=1;i<=hsz;i++) if(tl[i]<=tr[i]){ if(type[i]==l_type) l_segs.pb(i);else r_segs.pb(i);}
	sort(l_segs.begin(),l_segs.end(),[&](int i, int j){ return l[i]<l[j];});
	sort(r_segs.begin(),r_segs.end(),[&](int i, int j){ return r[i]>r[j];});
	lim=(int)cmpr_time.size()-1;
	Build(root,0,lim,l_segs,r_segs);
	vector<int> qs;
	for(int i=1;i<=q;i++) if(ans[i]!=-1) qs.pb(i);
	sort(qs.begin(),qs.end(),[&](int i, int j){ return qx[i]<qx[j];});
	for(int i:qs) ans[i]=GetL(root,0,lim,i);
	reverse(qs.begin(),qs.end());
	for(int i:qs) ans[i]=max(ans[i],GetR(root,0,lim,i));
	for(int i=1;i<=q;i++) printf("%i\n",ans[i]);
	return 0;
}

Compilation message

new_home.cpp: In function 'void S(int, int)':
new_home.cpp:21:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
         int mid=x[i]+x[j]>>1;
                 ~~~~^~~~~
new_home.cpp: In function 'void Build(int&, int, int, std::vector<int>, std::vector<int>)':
new_home.cpp:74:11: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
 int mid=ss+se>>1;
         ~~^~~
new_home.cpp: In function 'int GetL(int, int, int, int)':
new_home.cpp:99:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  while(l_ptr[c]<lst[c].size() && r[lst[c][l_ptr[c]]]<qx[id]) l_ptr[c]++;
        ~~~~~~~~^~~~~~~~~~~~~~
new_home.cpp:100:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  int ans=l_ptr[c]==lst[c].size()?0:qx[id]-l[lst[c][l_ptr[c]]];
          ~~~~~~~~^~~~~~~~~~~~~~~
new_home.cpp:102:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  int mid=ss+se>>1;
          ~~^~~
new_home.cpp: In function 'int GetR(int, int, int, int)':
new_home.cpp:109:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  while(r_ptr[c]<rst[c].size() && l[rst[c][r_ptr[c]]]>qx[id]) r_ptr[c]++;
        ~~~~~~~~^~~~~~~~~~~~~~
new_home.cpp:110:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  int ans=r_ptr[c]==rst[c].size()?0:r[rst[c][r_ptr[c]]]-qx[id];
          ~~~~~~~~^~~~~~~~~~~~~~~
new_home.cpp:112:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  int mid=ss+se>>1;
          ~~^~~
new_home.cpp: In function 'int main()':
new_home.cpp:126:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<events.size();i++)
              ~^~~~~~~~~~~~~~
new_home.cpp:119:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%i %i %i",&n,&k,&q);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~
new_home.cpp:121:88: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  for(int i=1;i<=n;i++) scanf("%i %i %i %i",&x[i],&t[i],&a[i],&b[i]),events.pb({a[i],i}),events.pb({b[i]+1,-i});
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
new_home.cpp:122:75: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  for(int i=1;i<=q;i++) scanf("%i %i",&qx[i],&qt[i]),events.pb({qt[i],n+i}),cmpr_time.pb(qt[i]);
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 39 ms 42744 KB Output is correct
2 Correct 40 ms 42744 KB Output is correct
3 Correct 40 ms 42744 KB Output is correct
4 Correct 41 ms 42744 KB Output is correct
5 Correct 41 ms 42876 KB Output is correct
6 Correct 43 ms 43000 KB Output is correct
7 Correct 50 ms 42872 KB Output is correct
8 Correct 42 ms 43000 KB Output is correct
9 Correct 46 ms 43000 KB Output is correct
10 Correct 43 ms 43128 KB Output is correct
11 Correct 47 ms 42900 KB Output is correct
12 Correct 50 ms 43000 KB Output is correct
13 Correct 41 ms 42872 KB Output is correct
14 Correct 42 ms 42872 KB Output is correct
15 Correct 49 ms 43000 KB Output is correct
16 Correct 43 ms 43028 KB Output is correct
17 Correct 49 ms 43000 KB Output is correct
18 Correct 42 ms 42992 KB Output is correct
19 Correct 49 ms 43000 KB Output is correct
20 Correct 47 ms 43036 KB Output is correct
21 Correct 40 ms 42744 KB Output is correct
22 Correct 41 ms 42844 KB Output is correct
23 Correct 42 ms 43104 KB Output is correct
24 Correct 42 ms 43000 KB Output is correct
25 Correct 42 ms 43000 KB Output is correct
26 Correct 42 ms 43000 KB Output is correct
27 Correct 41 ms 42872 KB Output is correct
28 Correct 42 ms 42872 KB Output is correct
29 Correct 41 ms 42872 KB Output is correct
30 Correct 41 ms 42872 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 39 ms 42744 KB Output is correct
2 Correct 40 ms 42744 KB Output is correct
3 Correct 40 ms 42744 KB Output is correct
4 Correct 41 ms 42744 KB Output is correct
5 Correct 41 ms 42876 KB Output is correct
6 Correct 43 ms 43000 KB Output is correct
7 Correct 50 ms 42872 KB Output is correct
8 Correct 42 ms 43000 KB Output is correct
9 Correct 46 ms 43000 KB Output is correct
10 Correct 43 ms 43128 KB Output is correct
11 Correct 47 ms 42900 KB Output is correct
12 Correct 50 ms 43000 KB Output is correct
13 Correct 41 ms 42872 KB Output is correct
14 Correct 42 ms 42872 KB Output is correct
15 Correct 49 ms 43000 KB Output is correct
16 Correct 43 ms 43028 KB Output is correct
17 Correct 49 ms 43000 KB Output is correct
18 Correct 42 ms 42992 KB Output is correct
19 Correct 49 ms 43000 KB Output is correct
20 Correct 47 ms 43036 KB Output is correct
21 Correct 40 ms 42744 KB Output is correct
22 Correct 41 ms 42844 KB Output is correct
23 Correct 42 ms 43104 KB Output is correct
24 Correct 42 ms 43000 KB Output is correct
25 Correct 42 ms 43000 KB Output is correct
26 Correct 42 ms 43000 KB Output is correct
27 Correct 41 ms 42872 KB Output is correct
28 Correct 42 ms 42872 KB Output is correct
29 Correct 41 ms 42872 KB Output is correct
30 Correct 41 ms 42872 KB Output is correct
31 Correct 757 ms 116248 KB Output is correct
32 Correct 217 ms 62820 KB Output is correct
33 Correct 748 ms 114988 KB Output is correct
34 Correct 725 ms 112984 KB Output is correct
35 Correct 829 ms 117220 KB Output is correct
36 Correct 779 ms 117604 KB Output is correct
37 Correct 609 ms 107172 KB Output is correct
38 Correct 627 ms 107524 KB Output is correct
39 Correct 479 ms 97508 KB Output is correct
40 Correct 497 ms 100196 KB Output is correct
41 Correct 479 ms 89444 KB Output is correct
42 Correct 438 ms 90220 KB Output is correct
43 Correct 128 ms 55396 KB Output is correct
44 Correct 487 ms 90744 KB Output is correct
45 Correct 451 ms 87272 KB Output is correct
46 Correct 395 ms 81700 KB Output is correct
47 Correct 283 ms 77404 KB Output is correct
48 Correct 290 ms 77284 KB Output is correct
49 Correct 329 ms 82176 KB Output is correct
50 Correct 378 ms 87012 KB Output is correct
51 Correct 329 ms 80976 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1420 ms 111072 KB Output is correct
2 Correct 1628 ms 118832 KB Output is correct
3 Correct 1061 ms 96716 KB Output is correct
4 Correct 1213 ms 107196 KB Output is correct
5 Correct 1983 ms 118288 KB Output is correct
6 Correct 1902 ms 118796 KB Output is correct
7 Correct 1041 ms 96644 KB Output is correct
8 Correct 1061 ms 106228 KB Output is correct
9 Correct 1065 ms 116604 KB Output is correct
10 Correct 1203 ms 119212 KB Output is correct
11 Correct 849 ms 117464 KB Output is correct
12 Correct 866 ms 117964 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3344 ms 291696 KB Output is correct
2 Correct 1066 ms 138640 KB Output is correct
3 Correct 4109 ms 304036 KB Output is correct
4 Correct 1308 ms 166024 KB Output is correct
5 Correct 2347 ms 242344 KB Output is correct
6 Correct 1986 ms 225084 KB Output is correct
7 Correct 3822 ms 302668 KB Output is correct
8 Correct 4354 ms 303132 KB Output is correct
9 Correct 1433 ms 169300 KB Output is correct
10 Correct 2451 ms 238648 KB Output is correct
11 Correct 3192 ms 281712 KB Output is correct
12 Correct 3484 ms 303532 KB Output is correct
13 Correct 1741 ms 253096 KB Output is correct
14 Correct 1740 ms 252076 KB Output is correct
15 Correct 2088 ms 271932 KB Output is correct
16 Correct 2237 ms 280104 KB Output is correct
17 Correct 2227 ms 278932 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 39 ms 42744 KB Output is correct
2 Correct 40 ms 42744 KB Output is correct
3 Correct 40 ms 42744 KB Output is correct
4 Correct 41 ms 42744 KB Output is correct
5 Correct 41 ms 42876 KB Output is correct
6 Correct 43 ms 43000 KB Output is correct
7 Correct 50 ms 42872 KB Output is correct
8 Correct 42 ms 43000 KB Output is correct
9 Correct 46 ms 43000 KB Output is correct
10 Correct 43 ms 43128 KB Output is correct
11 Correct 47 ms 42900 KB Output is correct
12 Correct 50 ms 43000 KB Output is correct
13 Correct 41 ms 42872 KB Output is correct
14 Correct 42 ms 42872 KB Output is correct
15 Correct 49 ms 43000 KB Output is correct
16 Correct 43 ms 43028 KB Output is correct
17 Correct 49 ms 43000 KB Output is correct
18 Correct 42 ms 42992 KB Output is correct
19 Correct 49 ms 43000 KB Output is correct
20 Correct 47 ms 43036 KB Output is correct
21 Correct 40 ms 42744 KB Output is correct
22 Correct 41 ms 42844 KB Output is correct
23 Correct 42 ms 43104 KB Output is correct
24 Correct 42 ms 43000 KB Output is correct
25 Correct 42 ms 43000 KB Output is correct
26 Correct 42 ms 43000 KB Output is correct
27 Correct 41 ms 42872 KB Output is correct
28 Correct 42 ms 42872 KB Output is correct
29 Correct 41 ms 42872 KB Output is correct
30 Correct 41 ms 42872 KB Output is correct
31 Correct 757 ms 116248 KB Output is correct
32 Correct 217 ms 62820 KB Output is correct
33 Correct 748 ms 114988 KB Output is correct
34 Correct 725 ms 112984 KB Output is correct
35 Correct 829 ms 117220 KB Output is correct
36 Correct 779 ms 117604 KB Output is correct
37 Correct 609 ms 107172 KB Output is correct
38 Correct 627 ms 107524 KB Output is correct
39 Correct 479 ms 97508 KB Output is correct
40 Correct 497 ms 100196 KB Output is correct
41 Correct 479 ms 89444 KB Output is correct
42 Correct 438 ms 90220 KB Output is correct
43 Correct 128 ms 55396 KB Output is correct
44 Correct 487 ms 90744 KB Output is correct
45 Correct 451 ms 87272 KB Output is correct
46 Correct 395 ms 81700 KB Output is correct
47 Correct 283 ms 77404 KB Output is correct
48 Correct 290 ms 77284 KB Output is correct
49 Correct 329 ms 82176 KB Output is correct
50 Correct 378 ms 87012 KB Output is correct
51 Correct 329 ms 80976 KB Output is correct
52 Correct 322 ms 77960 KB Output is correct
53 Correct 329 ms 76644 KB Output is correct
54 Correct 477 ms 95992 KB Output is correct
55 Correct 451 ms 90332 KB Output is correct
56 Correct 424 ms 89100 KB Output is correct
57 Correct 506 ms 90304 KB Output is correct
58 Correct 454 ms 87408 KB Output is correct
59 Correct 412 ms 85996 KB Output is correct
60 Correct 446 ms 90100 KB Output is correct
61 Correct 113 ms 53960 KB Output is correct
62 Correct 330 ms 78028 KB Output is correct
63 Correct 436 ms 88804 KB Output is correct
64 Correct 472 ms 92260 KB Output is correct
65 Correct 525 ms 95332 KB Output is correct
66 Correct 498 ms 93136 KB Output is correct
67 Correct 201 ms 63520 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 39 ms 42744 KB Output is correct
2 Correct 40 ms 42744 KB Output is correct
3 Correct 40 ms 42744 KB Output is correct
4 Correct 41 ms 42744 KB Output is correct
5 Correct 41 ms 42876 KB Output is correct
6 Correct 43 ms 43000 KB Output is correct
7 Correct 50 ms 42872 KB Output is correct
8 Correct 42 ms 43000 KB Output is correct
9 Correct 46 ms 43000 KB Output is correct
10 Correct 43 ms 43128 KB Output is correct
11 Correct 47 ms 42900 KB Output is correct
12 Correct 50 ms 43000 KB Output is correct
13 Correct 41 ms 42872 KB Output is correct
14 Correct 42 ms 42872 KB Output is correct
15 Correct 49 ms 43000 KB Output is correct
16 Correct 43 ms 43028 KB Output is correct
17 Correct 49 ms 43000 KB Output is correct
18 Correct 42 ms 42992 KB Output is correct
19 Correct 49 ms 43000 KB Output is correct
20 Correct 47 ms 43036 KB Output is correct
21 Correct 40 ms 42744 KB Output is correct
22 Correct 41 ms 42844 KB Output is correct
23 Correct 42 ms 43104 KB Output is correct
24 Correct 42 ms 43000 KB Output is correct
25 Correct 42 ms 43000 KB Output is correct
26 Correct 42 ms 43000 KB Output is correct
27 Correct 41 ms 42872 KB Output is correct
28 Correct 42 ms 42872 KB Output is correct
29 Correct 41 ms 42872 KB Output is correct
30 Correct 41 ms 42872 KB Output is correct
31 Correct 757 ms 116248 KB Output is correct
32 Correct 217 ms 62820 KB Output is correct
33 Correct 748 ms 114988 KB Output is correct
34 Correct 725 ms 112984 KB Output is correct
35 Correct 829 ms 117220 KB Output is correct
36 Correct 779 ms 117604 KB Output is correct
37 Correct 609 ms 107172 KB Output is correct
38 Correct 627 ms 107524 KB Output is correct
39 Correct 479 ms 97508 KB Output is correct
40 Correct 497 ms 100196 KB Output is correct
41 Correct 479 ms 89444 KB Output is correct
42 Correct 438 ms 90220 KB Output is correct
43 Correct 128 ms 55396 KB Output is correct
44 Correct 487 ms 90744 KB Output is correct
45 Correct 451 ms 87272 KB Output is correct
46 Correct 395 ms 81700 KB Output is correct
47 Correct 283 ms 77404 KB Output is correct
48 Correct 290 ms 77284 KB Output is correct
49 Correct 329 ms 82176 KB Output is correct
50 Correct 378 ms 87012 KB Output is correct
51 Correct 329 ms 80976 KB Output is correct
52 Correct 1420 ms 111072 KB Output is correct
53 Correct 1628 ms 118832 KB Output is correct
54 Correct 1061 ms 96716 KB Output is correct
55 Correct 1213 ms 107196 KB Output is correct
56 Correct 1983 ms 118288 KB Output is correct
57 Correct 1902 ms 118796 KB Output is correct
58 Correct 1041 ms 96644 KB Output is correct
59 Correct 1061 ms 106228 KB Output is correct
60 Correct 1065 ms 116604 KB Output is correct
61 Correct 1203 ms 119212 KB Output is correct
62 Correct 849 ms 117464 KB Output is correct
63 Correct 866 ms 117964 KB Output is correct
64 Correct 3344 ms 291696 KB Output is correct
65 Correct 1066 ms 138640 KB Output is correct
66 Correct 4109 ms 304036 KB Output is correct
67 Correct 1308 ms 166024 KB Output is correct
68 Correct 2347 ms 242344 KB Output is correct
69 Correct 1986 ms 225084 KB Output is correct
70 Correct 3822 ms 302668 KB Output is correct
71 Correct 4354 ms 303132 KB Output is correct
72 Correct 1433 ms 169300 KB Output is correct
73 Correct 2451 ms 238648 KB Output is correct
74 Correct 3192 ms 281712 KB Output is correct
75 Correct 3484 ms 303532 KB Output is correct
76 Correct 1741 ms 253096 KB Output is correct
77 Correct 1740 ms 252076 KB Output is correct
78 Correct 2088 ms 271932 KB Output is correct
79 Correct 2237 ms 280104 KB Output is correct
80 Correct 2227 ms 278932 KB Output is correct
81 Correct 322 ms 77960 KB Output is correct
82 Correct 329 ms 76644 KB Output is correct
83 Correct 477 ms 95992 KB Output is correct
84 Correct 451 ms 90332 KB Output is correct
85 Correct 424 ms 89100 KB Output is correct
86 Correct 506 ms 90304 KB Output is correct
87 Correct 454 ms 87408 KB Output is correct
88 Correct 412 ms 85996 KB Output is correct
89 Correct 446 ms 90100 KB Output is correct
90 Correct 113 ms 53960 KB Output is correct
91 Correct 330 ms 78028 KB Output is correct
92 Correct 436 ms 88804 KB Output is correct
93 Correct 472 ms 92260 KB Output is correct
94 Correct 525 ms 95332 KB Output is correct
95 Correct 498 ms 93136 KB Output is correct
96 Correct 201 ms 63520 KB Output is correct
97 Correct 1759 ms 221596 KB Output is correct
98 Correct 1115 ms 140820 KB Output is correct
99 Execution timed out 5021 ms 437260 KB Time limit exceeded
100 Halted 0 ms 0 KB -