QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#41435 | #2610. Build a City | ezoilearner | AC ✓ | 1161ms | 48312kb | C++14 | 6.5kb | 2022-07-30 19:12:11 | 2022-07-30 19:12:13 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define cout cerr
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
#define per(i,a,b) for(int i=(a);i>=(b);--i)
typedef long long ll;
typedef pair<int,int> pii;
#define FR first
#define SE second
inline void rd(int &x){
x=0;char ch=getchar();int f=1;
while(ch<'0'||ch>'9'){
if(ch=='-')f=-1;
ch=getchar();
}
while(ch>='0'&&ch<='9'){
x=x*10+ch-'0';
ch=getchar();
}
x*=f;
}
inline void rd(ll &x){
x=0;char ch=getchar();int f=1;
while(ch<'0'||ch>'9'){
if(ch=='-')f=-1;
ch=getchar();
}
while(ch>='0'&&ch<='9'){
x=x*10+ch-'0';
ch=getchar();
}
x*=f;
}
int n;
ll m;
#define Maxn 500010
#define V 1100010
#define ls k<<1
#define rs k<<1|1
int len;
namespace Seg{//Modify query ask add
int cnt[V],tag[V],sum[V];
void make_tag(int k,int z){
tag[k]=z;sum[k]=z*cnt[k];
}
void push_down(int k){
if(tag[k]!=-1){
make_tag(ls,tag[k]);
make_tag(rs,tag[k]);
tag[k]=-1;
}
}
void push_up(int k){sum[k]=sum[ls]+sum[rs];}
void build(int k,int l,int r){
cnt[k]=sum[k]=0;tag[k]=-1;
if(l==r)return;
int mid=(l+r)>>1;
build(ls,l,mid);
build(rs,mid+1,r);
}
void ADD(int k,int l,int r,int x){
if(l==r){tag[k]=0;cnt[k]=1;return;}
push_down(k);
int mid=(l+r)>>1;
if(x<=mid)ADD(ls,l,mid,x);else ADD(rs,mid+1,r,x);
cnt[k]++;
}
void add(int x){ADD(1,0,len,x);}
bool ask(int k,int l,int r,int x){
if(l==r)return sum[k];
push_down(k);
int mid=(l+r)>>1;
if(x<=mid)return ask(ls,l,mid,x);else return ask(rs,mid+1,r,x);
}
bool ask(int x){return ask(1,0,len,x);}
int find(int k,int l,int r){
if(l==r)return l;
push_down(k);
int mid=(l+r)>>1;
if(sum[rs])return find(rs,mid+1,r);
else return find(ls,l,mid);
}
int query(int k,int l,int r,int x){
if(l==r){
if(sum[k])return l;
return l-1;
}
push_down(k);
int mid=(l+r)>>1;
if(x<=mid)return query(ls,l,mid,x);
else{
int z=query(rs,mid+1,r,x);
if(z>mid)return z;
if(!sum[ls])return l-1;
return find(ls,l,mid);
}
}
int query(int x){return query(1,0,len,x);}
void Modify(int k,int l,int r,int L,int R,int v){
if(l==L&&r==R){
make_tag(k,v);
return;
}
push_down(k);
int mid=(l+r)>>1;
if(R<=mid)Modify(ls,l,mid,L,R,v);
else if(mid<L)Modify(rs,mid+1,r,L,R,v);
else{
Modify(ls,l,mid,L,mid,v);
Modify(rs,mid+1,r,mid+1,R,v);
}
push_up(k);
}
void Modify(int l,int r,int v){Modify(1,0,len,l,r,v);}
}
namespace Jump{
int LIMIT;
int mx[V];
void build(int k,int l,int r){
mx[k]=0;
if(l==r)return;
int mid=(l+r)>>1;
build(ls,l,mid);build(rs,mid+1,r);
}
void Change(int k,int l,int r,int x,int z){
if(l==r){
mx[k]=z;
return;
}
int mid=(l+r)>>1;
if(x<=mid)Change(ls,l,mid,x,z);else Change(rs,mid+1,r,x,z);
mx[k]=max(mx[ls],mx[rs]);
}
void Change(int x,int z){Change(1,0,len,x,z);}
int find(int k,int l,int r){
if(l==r)return l;
int mid=(l+r)>>1;
if(mx[ls]>LIMIT)return find(ls,l,mid);
else return find(rs,mid+1,r);
}
int jump(int k,int l,int r,int x){
if(l==r){
if(mx[k]>LIMIT)return l;
return l+1;
}
int mid=(l+r)>>1;
if(x>mid)return jump(rs,mid+1,r,x);
else{
int t=jump(ls,l,mid,x);
if(t<=mid)return t;
if(mx[rs]<=LIMIT)return r+1;
return find(rs,mid+1,r);
}
}
int query(int x){return min(jump(1,0,len,x),len);}
}
using Jump::LIMIT;
ll ynum[Maxn];
bool vis[Maxn];
struct Point{
ll x,y;
bool operator <(const Point &q)const{return x==q.x?y<q.y:x<q.x;}
}p[Maxn];
ll s1[Maxn],s2[Maxn],s3[Maxn],tp;int nxt[Maxn];
set<ll> Y;
void Judge(){
rep(i,1,len)vis[i]=0;vis[0]=1;
tp=0;
Seg::build(1,0,len);Seg::add(0);Seg::Modify(0,0,1);
Jump::build(1,0,len);ynum[len+1]=ynum[len];
Y.clear();Y.insert(0);nxt[0]=len+1;
for(ll l=1,r;l<=n;l=r+1){
if(p[l].x>=m)LIMIT=0;else LIMIT=(m-p[l].x)/2;
r=l;
while(r+1<=n&&p[r+1].x==p[r].x)r++;
s2[tp+1]=len+1;
ll d=p[l].y;
for(ll i=tp;s2[i+1]>d;--i){
ll z1=max(s2[i],d),z2=s2[i+1]-1;
ll at=upper_bound(ynum+1,ynum+len+1,m-2*(p[l].x-s1[i]))-ynum-1;
if(max(at+1,z1)<=z2)Seg::Modify(max(at+1,z1),z2,0);
ll mx=Seg::query(z2);
if(mx>=z1)Seg::Modify(mx,Jump::query(mx),1);
}
while(s2[tp]>=d)tp--;
if(tp){
s3[tp]=Seg::query(p[l].y-1);
if(s3[tp]<s2[tp])s3[tp]=s3[tp-1];
else s3[tp]=s1[tp]+ynum[s3[tp]];
}
rep(i,l,r)
if(!vis[p[i].y]){
Seg::add(p[i].y);
ll t=p[i].y;
vis[t]=true;
set<ll>::iterator it=(Y.insert(t)).FR;
it--;
ll h1=(*it),h2=nxt[h1];
nxt[h1]=t;nxt[t]=h2;
Jump::Change(h1,ynum[t]-ynum[h1]);
Jump::Change(t,ynum[h2]-ynum[t]);
if(i!=l&&Seg::ask(h1)&&(ynum[t]-ynum[h1]<=LIMIT))Seg::Modify(t,Jump::query(t),1);
}
if(2*p[l].x+2*ynum[p[l].y]-s3[tp]<=m)Seg::Modify(p[l].y,Jump::query(p[l].y),1);
s1[++tp]=p[l].x;s2[tp]=p[l].y;
s3[tp]=Seg::query(len);
if(s3[tp]<s2[tp])s3[tp]=s3[tp-1];else s3[tp]=s1[tp]+ynum[s3[tp]];
}
if(Seg::ask(len))puts("Yes");
else puts("No");
}
int main(){
// freopen("04","r",stdin);
// freopen("out","w",stdout);
int TT;rd(TT);
while(TT--){
rd(n);rd(m);
rep(i,1,n){
rd(p[i].x);rd(p[i].y);
}
sort(p+1,p+n+1);
rep(i,1,n)ynum[i]=p[i].y;
sort(ynum+1,ynum+n+1);len=unique(ynum+1,ynum+n+1)-ynum-1;
rep(i,1,n){
p[i].y=lower_bound(ynum+1,ynum+len+1,p[i].y)-ynum;
}
Judge();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 4ms
memory: 11804kb
input:
3 3 6 1 1 4 1 2 2 4 9 1 4 2 3 3 2 4 1 10 14 10 8 1 6 2 5 4 2 5 5 8 9 2 7 6 8 6 5 7 4
output:
Yes No Yes
result:
ok 3 lines
Test #2:
score: 0
Accepted
time: 2ms
memory: 11888kb
input:
3 15 1132840902 450021837 516460894 87477879 113573496 181682920 356196952 739584096 647827975 959197641 394470076 134750356 83569906 480561177 388746949 986927522 199190533 465555792 345015265 288748777 811932771 383970842 1013279 798743575 40578596 585623320 274624354 676611 712630545 757775058 46...
output:
No Yes Yes
result:
ok 3 lines
Test #3:
score: 0
Accepted
time: 4ms
memory: 11964kb
input:
3 10 1259663446 860962695 249893349 908339560 807097416 401032765 597843148 345912793 854799319 41062793 384644834 209784118 204387546 355486483 571375293 916934241 134787832 658530631 241960377 637190785 990220792 10 1481008455 204770752 700682795 286873514 537885112 280649495 593640607 494828163 6...
output:
No No No
result:
ok 3 lines
Test #4:
score: 0
Accepted
time: 3ms
memory: 11956kb
input:
4 10 1223521978 824802797 696504923 439771540 899724931 249630027 486757078 207284294 404476695 249487775 760025974 967656717 438965114 742832649 578497641 586091561 416330088 616635138 833120218 729880908 535187765 10 1781477134 246352615 328336219 963385111 772450139 925735007 583426095 669079285 ...
output:
Yes No Yes Yes
result:
ok 4 lines
Test #5:
score: 0
Accepted
time: 1ms
memory: 11844kb
input:
4 30 1209261305 527737790 391150039 350009314 318415923 227474156 583920551 452459059 662383726 98946777 32169709 25524945 295159564 277026943 318430862 415304428 356886572 791145977 914015799 685839312 436939856 353654532 834367298 200191948 792444888 109851854 344117840 593438226 148758854 5376754...
output:
No No No Yes
result:
ok 4 lines
Test #6:
score: 0
Accepted
time: 6ms
memory: 11956kb
input:
12 30 1059238346 217446629 136538215 579189577 560466738 186437053 633347859 141840930 533998700 71938313 706110440 847381217 812738311 589264921 718913889 844498686 440724352 804911679 499914143 812191137 73203355 747698895 95326987 600770614 970258495 788137066 51382583 3494547 128228451 955404429...
output:
No No No No Yes No Yes No No No Yes Yes
result:
ok 12 lines
Test #7:
score: 0
Accepted
time: 4ms
memory: 12028kb
input:
12 50 1048237025 694405178 862374530 875801162 211363691 910233019 50076943 138212457 951458476 892005818 805868862 216606475 524973608 349726174 185533402 394845244 757517806 471184575 944617088 842194165 551004283 711429320 809686067 482336482 140365777 908393132 471007070 329682103 77902439 45988...
output:
No Yes No No No Yes No No No No Yes No
result:
ok 12 lines
Test #8:
score: 0
Accepted
time: 7ms
memory: 12240kb
input:
12 100 1021062213 482887655 610286437 174465253 619977828 675066320 954610719 446205345 498766279 970080786 461917320 763974462 950398391 797184450 252672121 514229544 990705713 124691536 268190690 744078135 623541248 49116381 494087458 731554917 364427452 349362755 185597278 476045569 46107832 3128...
output:
No Yes No No Yes No No Yes No No Yes No
result:
ok 12 lines
Test #9:
score: 0
Accepted
time: 6ms
memory: 11888kb
input:
4 900 1001073747 22071031 139364576 719503618 367142382 448842409 780351201 799235596 703842978 431935796 347165883 42486213 284899615 171319036 942117691 321625942 707058905 739962430 669504217 633175799 385179296 356926501 66665238 715120807 268351606 897564529 278023660 878366107 493482418 179596...
output:
No Yes Yes No
result:
ok 4 lines
Test #10:
score: 0
Accepted
time: 620ms
memory: 27208kb
input:
8 99999 1000017006 276691360 876232112 253310077 805882528 865639519 935308599 667741238 375367608 645435047 18607196 525532546 251505329 146023906 915566781 1100449 992121722 847108759 216140241 23074612 560610424 888878097 214908986 230916737 828726544 777289894 315925521 326085342 154663367 80376...
output:
No Yes Yes No No No No No
result:
ok 8 lines
Test #11:
score: 0
Accepted
time: 1161ms
memory: 32872kb
input:
10 233333 1000003917 717933191 391444932 449344917 15683474 957169805 49489636 671075235 149753306 967042117 779401668 437177459 922002374 528978481 148679934 492262534 462393212 609640891 769374527 464588414 477454903 521535052 775359411 551445662 992578616 394247434 695503965 411847189 803043599 1...
output:
Yes No No No Yes No No No No No
result:
ok 10 lines
Test #12:
score: 0
Accepted
time: 106ms
memory: 11836kb
input:
10 666 2003 1132 509 771 1316 21 389 331 579 1467 1320 390 1387 2 122 569 168 1051 1435 275 1154 1360 71 1700 1845 1616 70 990 194 405 679 1747 515 499 905 624 1430 1026 955 922 1111 327 1965 1272 1675 1079 1334 1329 1426 1870 1767 902 597 1247 640 250 40 1683 98 264 914 78 1749 1813 1491 1775 1955 ...
output:
No No No Yes Yes No No No No No
result:
ok 10 lines
Test #13:
score: 0
Accepted
time: 263ms
memory: 21888kb
input:
13 120000 2000054590 27296 999999999 55842 999999998 66187 999999997 79950 999999996 117998 999999993 122155 999999992 133414 999999991 144505 999999989 154379 999999988 166040 999999986 172596 999999985 174784 999999984 204268 999999979 218188 999999976 221558 999999975 224947 999999974 233876 9999...
output:
Yes No Yes No Yes No No No No No Yes Yes Yes
result:
ok 13 lines
Test #14:
score: 0
Accepted
time: 474ms
memory: 47880kb
input:
16 330000 2000000489 24305 999999999 38232 999999998 45618 999999997 56825 999999996 62438 999999995 65273 999999994 72461 999999993 77768 999999992 82951 999999991 86254 999999990 90593 999999989 97872 999999988 102880 999999986 111174 999999984 115544 999999983 120742 999999982 121052 999999981 12...
output:
No No Yes No No No No Yes Yes Yes Yes No No No No No
result:
ok 16 lines
Test #15:
score: 0
Accepted
time: 65ms
memory: 13964kb
input:
15 20000 900016291 388266615 482942417 444870067 618037906 763085835 706644254 794986844 582436227 654475119 814810758 287188144 610549243 713336028 704559697 61302032 730519480 564507880 582937486 787545728 510756338 549855739 884096451 645372758 160092772 28529604 795177770 665297439 654057294 251...
output:
No No No No No No No No No No No Yes Yes Yes No
result:
ok 15 lines
Test #16:
score: 0
Accepted
time: 63ms
memory: 13656kb
input:
15 20000 900035901 545943319 690509543 70411973 43270119 35916972 301454621 673610499 237138807 494214794 484564088 452063289 721009032 668101537 27384251 491985513 455653436 262040474 664814300 288884051 893849515 652912725 844070787 463804788 414516578 565693846 854684127 41122356 28177933 9410587...
output:
No Yes No No Yes Yes Yes No Yes No No No No No Yes
result:
ok 15 lines
Test #17:
score: 0
Accepted
time: 529ms
memory: 28284kb
input:
15 150000 900004125 207573688 686681582 77267097 569883764 778742930 597836648 632086555 306240035 50535054 246218845 830413513 326562405 306154928 573452368 407388207 263424486 481142145 363406120 651429807 874667989 768726976 675051313 264176493 872195968 482820038 92901675 628595027 755205820 360...
output:
Yes No No Yes No Yes Yes Yes Yes No Yes No No Yes Yes
result:
ok 15 lines
Test #18:
score: 0
Accepted
time: 1092ms
memory: 45784kb
input:
15 300000 900001943 213155270 644141668 866686514 202907897 345972252 818062553 360567077 784558131 211575281 695681039 246840954 560431900 323090824 515894415 264011542 519623639 100932129 644891768 853215304 859254203 329037456 249673669 691185628 868046718 265094109 403790997 338926453 365369039 ...
output:
No No Yes Yes Yes Yes No No Yes Yes No No No Yes Yes
result:
ok 15 lines
Test #19:
score: 0
Accepted
time: 313ms
memory: 21768kb
input:
15 150000 900006690 309436313 752104966 290070982 393239292 258785558 366950268 614938945 880560853 436700825 335961772 758612262 15124213 440622604 498501897 890398117 853795654 629328230 341794764 873503712 747806314 343351580 374079221 581467028 239029064 496886570 226675703 329213100 294978124 5...
output:
No Yes No No Yes No Yes Yes No No Yes No No No Yes
result:
ok 15 lines
Test #20:
score: 0
Accepted
time: 491ms
memory: 26200kb
input:
15 300000 900001611 637928729 518306052 662979877 769453798 690098278 867195934 231589050 896331679 858890567 261398450 665562658 253290669 498799420 513020037 267931375 413034603 583588562 770733971 555091445 207597593 592429503 736867320 257996500 474894749 51501266 69072161 324773579 816167725 37...
output:
Yes No Yes No Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes
result:
ok 15 lines
Test #21:
score: 0
Accepted
time: 506ms
memory: 26348kb
input:
15 300000 900003245 875570843 461051922 660589398 850443536 221954475 825173397 318123131 535032810 694421677 895689461 290913643 309966099 844656363 352302085 516866542 520701248 455800446 196333558 809295230 826567708 579855596 629091073 297829565 288130629 556281770 522075441 760533056 215451841 ...
output:
No Yes No No Yes No No Yes Yes No No Yes No Yes Yes
result:
ok 15 lines
Test #22:
score: 0
Accepted
time: 74ms
memory: 13852kb
input:
100000 5 6 3 3 2 3 2 1 5 3 1 2 5 9 3 3 4 1 3 4 4 2 3 3 5 8 2 2 4 3 4 3 4 4 2 3 5 11 2 5 5 4 2 2 2 1 5 4 5 7 2 4 1 5 3 1 3 2 2 3 5 8 4 5 4 1 1 1 2 3 2 3 5 12 4 4 3 4 5 5 3 1 3 3 5 10 2 3 4 2 4 3 3 5 4 3 5 8 1 3 3 3 5 4 3 5 5 2 5 7 2 2 1 3 2 4 2 5 1 3 5 9 2 5 5 1 4 4 3 2 1 4 5 7 2 3 2 5 1 3 1 1 3 5 5 ...
output:
No No Yes Yes No Yes Yes Yes Yes No No Yes No No Yes Yes Yes Yes No No No No Yes No No No No No No Yes No No Yes Yes Yes No Yes Yes Yes No No No No No Yes Yes Yes Yes Yes Yes No No No No Yes Yes Yes No No Yes No Yes Yes No Yes No Yes Yes Yes No No Yes Yes Yes No No Yes Yes Yes No No Yes Yes No Yes Y...
result:
ok 100000 lines
Test #23:
score: 0
Accepted
time: 88ms
memory: 13876kb
input:
100000 5 10 1 2 2 4 2 4 3 5 5 3 5 9 3 3 4 2 5 1 1 4 2 5 5 9 2 5 1 2 1 3 1 2 4 4 5 7 3 3 2 4 3 1 1 1 5 3 5 11 5 5 2 2 4 5 1 4 2 4 5 9 1 3 3 5 5 3 3 2 3 5 5 12 4 2 2 4 2 1 5 5 3 3 5 9 3 1 1 4 4 1 1 5 2 4 5 7 5 2 4 4 1 3 3 2 3 2 5 8 1 2 5 5 4 5 2 2 2 5 5 9 1 3 2 5 5 2 5 3 2 4 5 8 4 3 2 4 2 5 2 2 5 3 5 ...
output:
Yes No No Yes No Yes Yes Yes No No No Yes No No No Yes Yes Yes Yes Yes Yes Yes Yes No No No Yes Yes Yes Yes Yes Yes Yes No No Yes Yes Yes No No No No No No Yes Yes Yes No Yes No Yes No No No Yes No Yes Yes Yes Yes No No Yes Yes Yes Yes No Yes No No Yes No Yes No Yes Yes Yes Yes Yes Yes No Yes Yes No...
result:
ok 100000 lines
Test #24:
score: 0
Accepted
time: 94ms
memory: 13864kb
input:
100000 5 8 5 4 5 4 2 4 5 2 3 1 5 11 3 2 5 5 4 2 2 2 5 2 5 10 2 3 2 5 4 3 1 4 4 1 5 9 4 1 1 4 4 5 2 5 4 2 5 7 1 3 4 5 1 5 5 1 3 3 5 8 5 1 3 1 3 4 2 1 1 2 5 9 1 3 1 5 1 2 5 3 2 1 5 7 2 2 5 1 2 4 5 2 3 3 5 8 5 5 2 4 2 2 3 5 2 5 5 9 2 3 4 3 1 5 3 3 5 4 5 8 2 4 1 1 5 4 3 1 5 4 5 9 5 2 3 5 4 3 1 3 3 4 5 1...
output:
No Yes Yes No No Yes Yes No No No No Yes No No No Yes Yes Yes Yes No Yes No No Yes Yes No Yes Yes Yes No No No No Yes No Yes Yes No No Yes No Yes No No No No Yes No No No Yes No Yes Yes No Yes Yes No No No No Yes Yes No Yes Yes Yes No Yes No No Yes Yes Yes Yes Yes No Yes Yes Yes Yes Yes No Yes Yes Y...
result:
ok 100000 lines
Test #25:
score: 0
Accepted
time: 127ms
memory: 13840kb
input:
50000 10 10 9 3 4 2 3 2 6 3 7 8 3 7 2 4 1 6 5 5 5 6 10 16 1 3 6 7 1 3 8 10 7 10 6 8 10 3 1 5 1 5 7 4 10 14 9 9 4 3 6 6 10 10 6 1 6 6 10 1 8 10 8 6 3 8 10 15 6 3 1 9 1 7 1 6 1 1 7 5 3 10 8 1 5 7 7 2 10 18 9 9 9 2 3 6 7 4 9 5 4 8 9 2 7 5 5 9 7 3 10 10 4 9 3 2 1 5 7 4 8 4 3 4 6 1 7 7 8 6 6 6 10 15 3 1 ...
output:
No No Yes Yes Yes No Yes Yes Yes Yes No Yes Yes Yes No No Yes Yes Yes No Yes No Yes No No Yes No Yes No Yes No No No Yes No Yes Yes Yes No No Yes No Yes Yes No No Yes Yes No No No No Yes Yes No Yes No Yes Yes Yes Yes Yes No No No No Yes Yes Yes No No No No Yes No No No No Yes Yes No No No No Yes No ...
result:
ok 50000 lines
Test #26:
score: 0
Accepted
time: 141ms
memory: 13856kb
input:
50000 10 13 1 4 8 7 3 3 5 10 5 7 7 9 5 10 3 9 10 10 1 2 10 16 4 2 4 3 2 1 4 1 8 1 8 10 9 9 4 6 10 6 10 5 10 12 6 4 1 9 3 7 4 1 7 2 8 6 2 5 2 10 7 9 2 9 10 14 6 2 1 8 8 1 2 1 7 10 1 7 6 7 4 6 6 10 3 6 10 15 2 2 3 7 10 4 2 9 4 6 6 10 3 8 7 10 8 6 7 4 10 11 8 3 1 8 2 7 9 2 4 8 1 3 6 6 6 5 3 6 4 4 10 11...
output:
No Yes Yes Yes No No Yes No No Yes Yes No No No Yes Yes Yes Yes Yes No Yes No No Yes Yes No Yes Yes Yes Yes Yes Yes Yes No Yes No Yes Yes No Yes No No No No No No No No No No Yes No Yes No Yes Yes No No Yes No No No No No Yes Yes No Yes No Yes No No Yes Yes No No Yes Yes No No No No No Yes No No No ...
result:
ok 50000 lines
Test #27:
score: 0
Accepted
time: 138ms
memory: 13800kb
input:
50000 10 12 5 1 8 1 3 2 10 1 6 6 5 8 4 7 7 6 4 7 3 6 10 19 6 1 1 2 1 1 10 10 8 3 3 3 10 5 5 5 7 2 2 1 10 13 5 3 6 9 8 2 2 5 8 7 10 3 6 2 7 5 5 9 10 8 10 13 3 6 9 7 4 10 6 3 6 2 6 2 6 1 8 2 4 2 4 5 10 16 9 2 5 9 8 7 2 7 6 5 9 8 6 6 1 7 8 5 8 8 10 15 5 10 4 9 9 6 4 2 2 2 8 10 5 1 7 10 10 3 2 3 10 14 2...
output:
Yes No No No Yes No Yes No No Yes Yes Yes Yes No Yes No Yes Yes No Yes No No No Yes No Yes Yes No No No No Yes Yes Yes No Yes No No No Yes No No No No No Yes Yes No Yes No Yes Yes No Yes Yes Yes Yes No Yes Yes No Yes Yes No No Yes Yes No No Yes Yes Yes Yes No No No Yes No Yes No No No Yes Yes No Yes...
result:
ok 50000 lines
Test #28:
score: 0
Accepted
time: 154ms
memory: 13868kb
input:
5000 100 30 28 2 28 30 10 19 11 23 1 1 16 27 29 7 25 18 18 10 8 12 1 5 13 4 26 20 19 26 25 14 26 8 23 4 12 1 15 29 3 2 2 26 12 20 29 3 13 4 29 19 22 12 27 12 8 30 1 27 27 24 24 9 26 19 10 23 2 16 6 28 29 26 5 18 29 19 11 5 28 16 19 27 17 10 29 21 15 15 3 21 25 11 19 17 10 29 25 8 4 19 11 22 11 19 15...
output:
No No No No No No Yes Yes No Yes No Yes Yes Yes Yes Yes Yes No Yes Yes No No No No Yes Yes Yes No Yes No Yes No Yes Yes Yes No Yes Yes No No Yes Yes No Yes Yes No Yes Yes Yes Yes No Yes Yes Yes Yes Yes No Yes Yes No No No No Yes Yes Yes No No Yes Yes Yes No No No Yes No Yes Yes No Yes Yes Yes Yes No...
result:
ok 5000 lines
Test #29:
score: 0
Accepted
time: 147ms
memory: 13884kb
input:
5000 100 35 3 29 12 20 1 12 8 25 10 24 1 4 33 31 9 18 11 11 16 24 33 14 1 2 33 1 30 28 10 26 26 28 28 33 27 8 9 12 6 10 9 8 30 9 14 15 30 28 5 31 30 28 12 2 20 16 31 15 9 30 11 7 9 19 28 19 15 18 30 16 21 2 12 20 28 5 9 28 28 4 6 10 27 32 27 32 29 9 22 1 15 8 27 10 16 23 31 29 19 31 30 18 8 25 6 15 ...
output:
Yes Yes No No No No Yes Yes Yes Yes No Yes Yes No Yes Yes Yes No No Yes No Yes Yes No Yes Yes No No No No Yes No Yes Yes Yes Yes No Yes No Yes No Yes No Yes No Yes Yes No Yes Yes Yes Yes No Yes Yes No No Yes No Yes Yes No No No No No Yes Yes No No No No Yes No No Yes No No No Yes Yes No Yes No No Ye...
result:
ok 5000 lines
Test #30:
score: 0
Accepted
time: 171ms
memory: 13876kb
input:
5000 100 38 28 34 25 24 9 27 14 20 36 17 12 36 19 8 15 31 26 2 1 36 25 23 24 31 25 23 13 26 26 24 18 28 36 1 11 25 5 3 32 3 14 11 19 24 28 27 20 32 25 8 20 4 3 24 3 3 16 24 8 29 16 12 19 6 19 10 17 36 26 16 6 7 36 13 28 36 16 6 14 24 23 17 24 18 19 22 5 24 9 17 2 19 13 3 13 29 34 1 16 20 22 21 24 11...
output:
Yes No No Yes No No Yes No No Yes No Yes No Yes No No Yes No No No Yes No Yes Yes No Yes No Yes No Yes Yes Yes Yes Yes Yes No Yes Yes No No No Yes No No No Yes Yes Yes No Yes No Yes No Yes No Yes Yes No No Yes No No Yes Yes No Yes No No Yes No Yes No Yes Yes No No Yes No No Yes No No No Yes Yes Yes ...
result:
ok 5000 lines
Test #31:
score: 0
Accepted
time: 182ms
memory: 13944kb
input:
5000 100 39 7 26 4 19 35 14 8 19 30 10 26 27 11 28 37 14 29 29 38 13 38 22 9 25 32 18 28 34 10 14 9 38 27 1 29 37 32 15 33 37 36 16 32 16 34 22 30 36 15 29 5 24 1 33 4 4 35 39 29 6 30 2 20 36 37 8 27 8 6 11 29 4 33 22 24 29 32 20 38 19 17 31 8 34 14 33 8 17 11 14 27 34 6 38 27 8 10 23 6 16 38 10 22 ...
output:
No Yes No No No No Yes No No Yes No No No Yes Yes Yes No Yes Yes Yes Yes No Yes No Yes No Yes Yes Yes No No Yes No No No No No Yes Yes No Yes Yes No Yes No No Yes No Yes No Yes Yes No No No Yes No No No No Yes No No Yes No Yes No No No Yes Yes No No No No No No Yes No No Yes No Yes No Yes Yes No No ...
result:
ok 5000 lines
Test #32:
score: 0
Accepted
time: 189ms
memory: 13848kb
input:
5000 100 43 36 7 1 26 36 26 4 23 25 22 12 26 31 38 38 18 16 1 40 13 40 10 12 11 34 8 7 34 11 15 12 40 33 32 15 37 35 32 23 24 13 37 31 2 24 12 7 21 9 19 31 3 26 8 35 35 42 5 36 19 27 26 40 32 26 41 25 13 25 4 15 26 20 20 9 6 37 19 6 1 34 23 33 3 40 39 4 24 20 9 4 11 39 40 9 15 24 41 16 42 13 23 32 3...
output:
No No Yes Yes Yes Yes Yes Yes No No No Yes Yes Yes Yes Yes No Yes No Yes Yes No Yes No No Yes Yes Yes Yes No Yes Yes Yes Yes Yes No No No Yes Yes No No No No Yes No No No No No No Yes No No No Yes No No No No No No Yes Yes No Yes No Yes No Yes Yes No No No Yes Yes No No Yes No Yes No Yes No No No Ye...
result:
ok 5000 lines
Test #33:
score: 0
Accepted
time: 193ms
memory: 13804kb
input:
5000 100 46 28 6 9 9 11 34 12 26 33 5 23 39 32 38 11 40 32 13 12 16 17 5 28 26 29 4 27 11 4 29 21 21 40 8 28 28 27 11 35 13 31 29 23 27 6 45 23 29 24 28 45 5 10 39 43 3 19 17 37 37 29 2 44 30 33 38 18 24 26 11 13 29 30 13 5 44 38 24 18 8 28 22 28 40 28 12 26 32 23 29 27 11 19 3 18 45 35 17 20 1 16 2...
output:
No Yes No Yes Yes No No Yes Yes No No No Yes No No Yes Yes Yes Yes No Yes Yes No No Yes Yes Yes No No No Yes No Yes No No Yes Yes Yes No No No Yes Yes Yes Yes Yes No No Yes No No Yes Yes Yes No No Yes Yes Yes No Yes No No Yes Yes Yes Yes No No No No No Yes No No Yes No Yes No Yes Yes No No Yes No Ye...
result:
ok 5000 lines
Test #34:
score: 0
Accepted
time: 212ms
memory: 13932kb
input:
5000 100 54 25 30 37 40 30 7 45 3 46 47 47 20 44 19 25 47 27 45 53 12 6 22 17 51 32 50 44 17 4 1 10 48 33 27 40 39 41 5 22 48 44 28 25 51 1 33 24 51 25 52 1 31 35 30 15 2 16 18 48 11 48 31 9 18 6 11 8 35 38 31 2 16 7 28 26 21 47 43 16 51 49 24 54 21 23 43 27 24 37 23 33 37 20 12 32 36 51 36 49 14 41...
output:
No Yes No No No No No Yes No No No Yes No No No No Yes Yes Yes No No Yes Yes No Yes Yes Yes No Yes Yes No No Yes Yes No No Yes No Yes Yes No No No Yes No No No No No Yes Yes No Yes Yes No No No Yes No Yes Yes Yes No Yes Yes No No No No Yes No Yes No No No Yes Yes No No Yes Yes Yes No Yes Yes Yes No ...
result:
ok 5000 lines
Test #35:
score: 0
Accepted
time: 218ms
memory: 13856kb
input:
5000 100 61 21 10 50 39 32 43 27 16 41 30 1 35 16 38 23 4 5 46 35 5 22 17 47 11 16 23 27 31 33 50 37 52 27 8 45 13 23 23 25 8 49 51 22 16 42 3 8 28 19 52 26 15 1 48 36 51 20 17 8 54 19 26 45 17 3 57 31 30 11 10 55 25 28 17 3 25 3 48 6 28 49 49 47 13 26 6 31 12 2 8 10 45 25 36 27 28 38 31 54 47 52 19...
output:
Yes No No No No Yes No No Yes No No Yes Yes Yes Yes Yes Yes No No No Yes No Yes No No Yes No No No No No Yes No Yes No Yes Yes No Yes Yes Yes No No Yes No Yes No No No Yes No Yes Yes Yes No Yes Yes No No Yes No Yes No No Yes Yes Yes No No No Yes No No No No Yes No No No Yes No No Yes No Yes No No No...
result:
ok 5000 lines
Test #36:
score: 0
Accepted
time: 199ms
memory: 13888kb
input:
5000 100 50 7 39 18 34 1 40 41 31 48 15 17 3 37 22 22 48 6 20 20 5 23 25 21 23 28 35 26 23 27 48 24 11 8 4 5 24 32 44 35 16 11 11 4 8 44 45 48 12 19 10 3 6 45 12 42 28 2 3 40 1 8 48 44 30 6 24 39 1 44 10 3 6 33 20 13 29 38 19 5 27 9 17 38 45 4 28 34 41 8 43 16 39 12 34 9 24 19 34 31 4 20 10 40 1 28 ...
output:
Yes No No Yes Yes Yes No No No No No No Yes Yes No Yes Yes Yes Yes No No No No Yes No Yes No No No No Yes Yes Yes No Yes Yes No Yes No Yes Yes No Yes Yes Yes Yes No Yes Yes No Yes Yes No Yes Yes Yes No No Yes No No No No No No No No Yes Yes Yes Yes No No No No No No Yes No Yes No No Yes Yes Yes Yes ...
result:
ok 5000 lines
Test #37:
score: 0
Accepted
time: 204ms
memory: 13872kb
input:
5000 100 53 45 42 32 44 29 48 26 28 44 15 22 48 23 15 3 26 1 39 36 6 51 23 31 14 42 37 28 25 2 5 34 30 1 12 46 13 42 35 13 19 44 37 44 22 10 27 20 27 44 32 18 3 29 31 45 42 39 10 51 28 36 22 14 51 40 38 34 26 39 32 24 36 3 17 38 47 8 31 51 19 38 9 40 2 5 8 50 12 6 2 48 30 32 22 9 11 32 44 47 31 45 1...
output:
Yes Yes Yes Yes No No Yes No No No Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes No Yes Yes No Yes Yes Yes No Yes Yes No Yes No No Yes Yes Yes No Yes Yes Yes Yes Yes Yes No Yes No No No No No No Yes No No No Yes Yes No Yes Yes No No Yes No Yes No Yes No No Yes Yes Yes Yes Yes Yes Yes No No No Yes N...
result:
ok 5000 lines
Test #38:
score: 0
Accepted
time: 225ms
memory: 13740kb
input:
5000 100 62 20 50 37 30 56 19 34 21 32 4 1 9 12 31 15 33 51 49 60 23 46 14 25 11 41 4 35 17 1 3 10 49 30 24 54 44 42 31 27 24 2 6 39 13 28 11 12 6 9 38 34 2 48 35 14 48 34 20 16 12 12 6 11 59 46 17 51 45 50 26 26 13 49 50 58 53 56 39 42 40 5 9 35 32 39 6 30 43 20 21 20 12 42 54 17 22 45 25 19 1 51 4...
output:
Yes No Yes No No No No No Yes Yes Yes Yes No No No Yes Yes No Yes No No No No Yes Yes No No Yes Yes No No Yes Yes No Yes No No No No No No No Yes Yes No Yes No Yes Yes Yes Yes Yes Yes No Yes Yes No No No No Yes Yes Yes No Yes No Yes No Yes Yes Yes No Yes Yes No No Yes Yes No Yes Yes No Yes Yes Yes Y...
result:
ok 5000 lines
Test #39:
score: 0
Accepted
time: 289ms
memory: 13936kb
input:
5000 100 102 6 72 50 10 86 28 15 61 13 92 34 5 1 35 75 88 23 83 21 89 23 17 62 76 38 95 60 25 71 95 70 5 1 29 80 65 74 52 100 18 89 49 94 99 4 69 29 45 32 68 82 16 43 94 16 40 99 46 81 75 85 44 13 60 37 40 65 31 93 32 6 54 83 97 18 100 20 17 30 44 69 87 17 69 59 67 72 39 45 92 23 89 29 68 2 96 53 36...
output:
No Yes Yes No Yes No Yes No Yes Yes No No No Yes Yes No No No No Yes No Yes Yes No No No Yes Yes Yes Yes Yes Yes No No No No No No Yes Yes Yes No Yes No No No Yes Yes Yes No No Yes No Yes No Yes Yes No No Yes No No No Yes Yes No Yes No No Yes No Yes No Yes No No No No No Yes No Yes No No Yes Yes Yes...
result:
ok 5000 lines
Test #40:
score: 0
Accepted
time: 278ms
memory: 13740kb
input:
5000 100 104 99 53 14 76 66 9 34 18 51 72 87 55 94 41 14 50 60 89 75 57 63 57 75 69 92 23 59 93 4 69 64 7 71 55 52 4 24 80 26 77 25 3 73 6 47 6 55 39 85 42 28 72 65 61 33 9 66 77 78 66 44 38 34 52 73 38 10 88 32 83 87 40 40 29 33 96 23 73 44 73 19 73 1 76 53 45 61 33 23 85 44 89 22 32 61 26 62 82 40...
output:
No No Yes No No Yes Yes Yes No Yes Yes Yes Yes Yes Yes No No No Yes Yes Yes No Yes No No No Yes Yes No Yes No No Yes No Yes No No Yes No No No Yes No Yes No No No Yes Yes Yes No No Yes No No Yes No No No Yes Yes Yes Yes Yes Yes Yes Yes Yes No No Yes No No Yes Yes Yes No No No Yes No Yes Yes No Yes N...
result:
ok 5000 lines
Test #41:
score: 0
Accepted
time: 283ms
memory: 13804kb
input:
5000 100 103 18 30 22 85 70 82 1 23 74 92 17 69 50 26 54 88 49 45 43 88 37 59 12 29 4 63 75 17 42 39 67 16 51 41 75 28 24 50 27 96 57 39 11 63 86 33 37 97 79 85 99 53 64 28 36 40 45 51 20 49 6 30 66 38 27 69 14 26 18 63 94 63 40 71 92 75 76 99 5 6 74 35 94 62 56 74 52 97 91 43 12 18 8 76 6 31 76 90 ...
output:
No Yes No No Yes Yes Yes No Yes Yes No Yes No No No Yes No Yes Yes Yes No Yes Yes No No No No Yes No No No No Yes No No No Yes Yes Yes Yes Yes Yes No Yes Yes No No No Yes Yes Yes No Yes Yes No No No Yes No Yes Yes Yes Yes No Yes No No Yes Yes Yes No Yes No Yes Yes No Yes No Yes Yes Yes Yes Yes Yes Y...
result:
ok 5000 lines
Test #42:
score: 0
Accepted
time: 103ms
memory: 16544kb
input:
1 500000 1001 909 946 67 202 574 154 40 214 298 26 350 927 616 777 777 222 669 899 49 353 535 541 350 201 167 967 672 438 819 426 161 575 283 595 597 119 155 479 18 389 594 584 613 955 18 199 220 369 905 754 466 627 438 928 808 872 639 163 128 933 714 501 607 762 106 558 611 484 67 62 138 83 617 486...
output:
No
result:
ok single line: 'No'
Test #43:
score: 0
Accepted
time: 149ms
memory: 17104kb
input:
1 500000 10002 3701 9059 9332 6968 8053 6235 5360 2171 8536 2805 3403 8210 2909 6483 6449 8216 1875 3105 203 3489 9675 7113 6363 6662 5753 2096 9138 5406 2351 7401 3855 7678 4485 7521 6569 859 1206 8508 6744 7749 7563 7038 2392 3262 61 9604 5815 163 6958 4628 4713 5683 6761 7027 1424 3742 7906 6726 ...
output:
Yes
result:
ok single line: 'Yes'
Test #44:
score: 0
Accepted
time: 357ms
memory: 26412kb
input:
1 500000 100001 38335 65844 7552 60990 66643 72892 93665 92712 97158 50276 19549 78329 55268 46610 64521 76134 34828 31392 87308 75463 13881 6191 94785 41457 24381 47882 36386 61186 94911 81213 48971 60942 57575 81087 31558 54514 53376 77558 80694 91382 77805 32378 94414 32583 85775 4019 90554 25325...
output:
No
result:
ok single line: 'No'
Test #45:
score: 0
Accepted
time: 1055ms
memory: 48312kb
input:
1 500000 500001 241920 374838 33080 468521 102370 20286 63536 176626 209635 283602 172656 475661 471852 480022 50632 467890 489471 128803 250847 496967 189162 363870 140812 50611 393553 327139 376319 430891 14745 330395 74591 39915 323746 224171 187502 187225 116477 185846 10146 110334 237279 174286...
output:
Yes
result:
ok single line: 'Yes'
Test #46:
score: 0
Accepted
time: 196ms
memory: 13940kb
input:
500 1000 201 109 190 107 22 162 117 127 52 44 156 70 129 124 49 6 163 106 43 43 130 48 128 73 63 93 20 78 196 30 164 84 28 8 91 142 35 121 44 33 192 48 57 29 42 83 187 148 95 40 178 114 148 13 127 182 18 52 199 160 13 34 90 180 98 23 164 86 152 107 11 183 111 167 169 167 24 42 163 124 157 85 138 66 ...
output:
No No Yes Yes Yes Yes No No No Yes Yes Yes Yes Yes No No No Yes Yes Yes Yes Yes Yes No No No Yes Yes No No No Yes Yes No Yes No Yes Yes Yes Yes Yes No Yes No Yes No Yes No Yes No Yes No No No No Yes No Yes Yes No Yes Yes No No Yes No Yes No No Yes Yes No No Yes No Yes No No No No No Yes No Yes No Ye...
result:
ok 500 lines
Test #47:
score: 0
Accepted
time: 237ms
memory: 13856kb
input:
500 1000 301 174 9 267 120 197 120 242 44 140 204 171 86 171 298 254 116 267 272 60 218 99 261 107 280 242 209 260 300 246 133 135 120 280 222 172 300 232 163 248 292 7 108 193 73 258 232 166 212 236 200 113 172 187 26 7 108 188 259 187 139 129 172 253 96 247 257 285 244 224 4 221 195 141 297 202 26...
output:
No Yes Yes No No No No Yes Yes No No No Yes Yes No No Yes No Yes No No Yes No Yes Yes No Yes No Yes Yes No Yes Yes No No Yes Yes Yes No No Yes Yes No No No Yes No Yes Yes No No Yes Yes Yes Yes No Yes Yes Yes No No Yes Yes No No No No No No Yes No No No Yes No No No Yes Yes Yes Yes Yes Yes No Yes No ...
result:
ok 500 lines
Test #48:
score: 0
Accepted
time: 152ms
memory: 13852kb
input:
500 1000 151 62 63 134 6 56 148 93 71 36 12 30 13 2 18 83 143 44 84 95 130 16 64 49 98 33 88 92 17 139 89 109 138 141 93 50 80 12 22 137 15 20 113 68 137 86 137 79 47 142 135 88 134 17 42 146 19 29 58 101 74 71 124 116 18 4 119 74 38 126 1 52 141 22 67 39 3 56 108 132 95 37 44 45 28 16 54 8 75 8 116...
output:
No Yes No Yes No No No No Yes Yes No Yes No No Yes Yes No Yes Yes No Yes No Yes No Yes Yes Yes No Yes No No Yes No No Yes Yes Yes No No Yes Yes Yes Yes No Yes No No No No Yes No Yes Yes Yes Yes Yes No No Yes Yes No No No No Yes No Yes No No Yes Yes Yes Yes Yes Yes No Yes No No Yes Yes No Yes Yes No ...
result:
ok 500 lines
Test #49:
score: 0
Accepted
time: 107ms
memory: 13804kb
input:
500 1000 81 12 45 64 22 10 44 33 72 61 61 33 71 19 30 29 29 52 38 11 35 28 71 1 28 42 12 57 49 57 76 75 38 22 5 19 70 3 12 11 3 74 52 59 17 77 37 8 20 13 64 18 47 57 73 34 30 73 76 75 30 2 59 22 20 12 62 20 44 41 20 23 68 32 18 10 40 11 66 10 63 13 63 44 53 80 30 40 51 69 15 77 36 67 36 6 18 29 1 28...
output:
No No No Yes No No No No No No No Yes Yes Yes No No No Yes Yes Yes Yes Yes No No Yes No No Yes No No Yes Yes Yes No Yes No No No Yes No Yes Yes Yes No No No No No No Yes Yes No Yes No No No No No No No No No Yes No Yes Yes Yes No Yes No Yes No Yes No Yes Yes No Yes No Yes No No Yes Yes Yes No Yes No...
result:
ok 500 lines
Test #50:
score: 0
Accepted
time: 134ms
memory: 13848kb
input:
500 1000 92 64 18 79 88 67 85 44 69 18 70 17 13 31 57 29 1 49 44 5 43 48 41 5 69 48 51 76 65 30 20 89 39 51 33 41 41 53 90 17 3 33 16 49 56 60 53 64 6 58 26 74 42 29 49 70 70 68 69 52 21 60 82 2 90 28 13 55 21 41 1 85 64 39 43 27 15 44 72 45 64 4 9 48 52 44 7 71 44 76 78 20 27 22 68 64 19 37 7 28 71...
output:
Yes Yes No No No Yes No Yes No Yes Yes No No No No Yes Yes Yes Yes No Yes Yes No Yes Yes Yes Yes Yes Yes Yes No Yes No Yes Yes Yes No Yes No No Yes Yes No Yes Yes No No Yes No Yes Yes Yes Yes Yes Yes Yes Yes No No Yes Yes Yes No No Yes No No Yes No No No No No No No No No No No No Yes Yes No Yes No ...
result:
ok 500 lines
Test #51:
score: 0
Accepted
time: 118ms
memory: 14000kb
input:
500 1000 97 20 24 94 60 48 87 64 13 86 70 35 22 94 84 87 84 59 27 27 38 93 59 87 91 36 5 12 88 34 63 27 75 93 51 8 80 5 74 3 81 85 49 48 28 17 13 23 28 69 42 66 1 36 54 25 8 9 40 20 67 54 45 45 80 87 57 16 23 65 47 94 8 74 23 46 76 7 5 26 48 54 22 37 25 67 39 84 87 30 20 31 83 84 36 44 53 35 28 95 6...
output:
Yes Yes No No No Yes No No No No No Yes No Yes No Yes No Yes Yes Yes No Yes No No Yes Yes No No Yes Yes Yes No No Yes No No No No No Yes Yes No Yes No Yes No Yes Yes Yes No No No Yes Yes Yes Yes Yes No Yes Yes No No No Yes Yes No Yes No No No No No No No Yes Yes No No No Yes Yes No No Yes Yes Yes Ye...
result:
ok 500 lines
Test #52:
score: 0
Accepted
time: 273ms
memory: 13884kb
input:
500 1000 1920000064 960000430 960000126 960000463 960000416 960000085 960000329 960000275 960000183 960000236 960000030 960000266 960000293 960000258 960000230 960000062 960000234 960000276 960000242 960000205 960000321 960000136 960000496 960000017 960000393 960000462 960000089 960000121 960000377 ...
output:
Yes Yes No Yes Yes Yes No Yes No Yes No No Yes Yes No No No Yes No No Yes Yes Yes Yes No No No Yes Yes Yes No Yes Yes Yes No No No No Yes Yes Yes No No No No Yes Yes No No No Yes No No No No No No Yes Yes No No Yes No Yes Yes No No Yes No Yes Yes No No No Yes No No Yes Yes No Yes Yes Yes No No Yes Y...
result:
ok 500 lines
Test #53:
score: 0
Accepted
time: 354ms
memory: 14040kb
input:
500 1000 1920000051 960000740 960000019 960000017 960000643 960000493 960000606 960000781 960000046 960000683 960000184 960000729 960000565 960000681 960000597 960000425 960000406 960000285 960000020 960000548 960000750 960000476 960000080 960000659 960000125 960000637 960000133 960000265 960000122 ...
output:
No No Yes No Yes Yes Yes No No No Yes Yes No No Yes Yes No Yes No No Yes Yes Yes Yes Yes No No No Yes No Yes Yes No Yes Yes Yes No Yes Yes No No No Yes Yes Yes Yes Yes Yes Yes Yes Yes No No Yes No Yes No Yes Yes No No No No Yes No No No Yes Yes No Yes No No Yes No Yes No Yes No Yes No No Yes No Yes ...
result:
ok 500 lines
Test #54:
score: 0
Accepted
time: 218ms
memory: 13888kb
input:
500 1000 1920000013 960000013 960000257 960000213 960000175 960000180 960000028 960000176 960000282 960000040 960000053 960000009 960000172 960000135 960000041 960000201 960000198 960000141 960000244 960000211 960000070 960000087 960000006 960000180 960000116 960000199 960000194 960000281 960000158 ...
output:
No Yes Yes Yes Yes No No Yes Yes No Yes Yes Yes Yes No Yes Yes No Yes No No No Yes No No No No No Yes Yes Yes Yes Yes Yes Yes No No Yes No Yes Yes No No No No Yes Yes No No No No Yes No No Yes No No Yes Yes No No Yes No Yes Yes Yes No Yes No Yes Yes Yes Yes No Yes No Yes Yes Yes No No Yes No Yes No ...
result:
ok 500 lines
Test #55:
score: 0
Accepted
time: 154ms
memory: 13860kb
input:
500 1000 1920000013 960000005 960000070 960000078 960000041 960000060 960000009 960000096 960000039 960000079 960000032 960000030 960000023 960000027 960000047 960000072 960000060 960000046 960000050 960000097 960000006 960000027 960000045 960000093 960000009 960000085 960000022 960000047 960000094 ...
output:
No Yes No No No No Yes No Yes No Yes No No Yes Yes Yes Yes No Yes No No Yes No Yes No No No No No Yes Yes No Yes No Yes Yes Yes Yes Yes No Yes No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes No No Yes Yes Yes Yes No No No No Yes Yes No Yes Yes Yes Yes No No No Yes Yes No Yes Yes No No Yes Yes No N...
result:
ok 500 lines
Test #56:
score: 0
Accepted
time: 302ms
memory: 13892kb
input:
5000 100 1920000021 960000043 960000026 960000035 960000035 960000081 960000033 960000006 960000099 960000100 960000017 960000013 960000087 960000028 960000039 960000027 960000073 960000031 960000004 960000076 960000082 960000088 960000036 960000047 960000018 960000065 960000005 960000077 960000003 ...
output:
No Yes Yes No No Yes Yes Yes Yes Yes Yes Yes No No Yes Yes No Yes Yes Yes Yes No Yes Yes Yes Yes Yes Yes No Yes No Yes Yes Yes Yes Yes Yes No Yes No No Yes No No No Yes Yes No Yes No No No Yes No Yes Yes No Yes No No Yes Yes Yes No No No No Yes No No Yes No No Yes Yes No No Yes Yes No Yes No No Yes ...
result:
ok 5000 lines
Test #57:
score: 0
Accepted
time: 228ms
memory: 13880kb
input:
5000 100 1920000026 960000015 960000014 960000031 960000017 960000018 960000004 960000002 960000035 960000026 960000036 960000043 960000045 960000050 960000032 960000003 960000032 960000037 960000028 960000039 960000002 960000049 960000030 960000017 960000041 960000028 960000016 960000042 960000039 ...
output:
Yes No No No Yes Yes Yes Yes Yes Yes No No No No Yes No Yes Yes Yes Yes No Yes No No Yes No No Yes No Yes Yes Yes Yes Yes No Yes Yes Yes Yes Yes No No Yes No No Yes No Yes No Yes No No No No Yes Yes No No No No Yes No No No Yes No No No No No Yes No Yes Yes No Yes Yes Yes No No Yes No Yes Yes Yes Ye...
result:
ok 5000 lines
Test #58:
score: 0
Accepted
time: 171ms
memory: 13940kb
input:
5000 100 1920000006 960000011 960000014 960000021 960000005 960000011 960000020 960000004 960000025 960000027 960000004 960000016 960000023 960000004 960000004 960000020 960000024 960000014 960000023 960000011 960000017 960000023 960000029 960000015 960000030 960000003 960000028 960000019 960000021 ...
output:
Yes No Yes Yes Yes Yes Yes No No Yes Yes Yes Yes Yes Yes No Yes Yes Yes No Yes No Yes Yes Yes Yes Yes Yes No Yes Yes No Yes No No No Yes Yes No Yes Yes No Yes No No No Yes No Yes No Yes No No No No Yes No Yes No No Yes No Yes Yes Yes Yes Yes No Yes No Yes Yes No Yes No Yes Yes No Yes No Yes No Yes Y...
result:
ok 5000 lines
Test #59:
score: 0
Accepted
time: 200ms
memory: 13944kb
input:
5000 100 1920000009 960000013 960000027 960000015 960000010 960000030 960000021 960000003 960000002 960000014 960000003 960000008 960000024 960000016 960000030 960000011 960000008 960000030 960000019 960000015 960000023 960000023 960000029 960000018 960000001 960000009 960000037 960000007 960000038 ...
output:
No No Yes Yes Yes Yes No Yes No No No Yes Yes No No No Yes No Yes No No No Yes No Yes No No No No No Yes No Yes No No No Yes No Yes No Yes No No No Yes Yes No No Yes No Yes Yes No No No Yes Yes No No Yes Yes Yes No Yes No No No Yes No No Yes Yes No Yes No No No No Yes Yes Yes No No Yes Yes Yes Yes Y...
result:
ok 5000 lines
Test #60:
score: 0
Accepted
time: 231ms
memory: 13936kb
input:
5000 100 1920000019 960000033 960000028 960000040 960000016 960000038 960000042 960000035 960000019 960000012 960000023 960000021 960000006 960000048 960000016 960000043 960000031 960000027 960000016 960000041 960000051 960000043 960000060 960000012 960000014 960000043 960000006 960000033 960000006 ...
output:
No Yes Yes Yes No No No Yes No No Yes No Yes No No Yes No Yes No Yes Yes Yes Yes No No No No Yes No No No Yes Yes No Yes No No Yes No Yes Yes No No No Yes No Yes No No Yes Yes Yes Yes Yes Yes Yes No No Yes No No No Yes No Yes No No No Yes Yes No Yes Yes No No No No Yes Yes No Yes Yes No Yes No No No...
result:
ok 5000 lines
Test #61:
score: 0
Accepted
time: 152ms
memory: 13928kb
input:
50000 10 1920000010 960000001 960000004 960000007 960000010 960000001 960000006 960000005 960000009 960000004 960000008 960000004 960000001 960000007 960000008 1 960000000 960000000 960000000 480000000 960000000 10 1920000010 960000002 960000007 960000003 960000002 960000005 960000001 960000005 9600...
output:
Yes Yes No No Yes Yes Yes No Yes Yes No No No Yes Yes No No Yes Yes Yes No No No No Yes Yes Yes Yes Yes No No No No Yes No No Yes Yes No Yes Yes Yes Yes Yes No No No No No No No No No No No No Yes No Yes No No No Yes No No Yes Yes No Yes No Yes No No Yes Yes No No Yes Yes Yes No No Yes Yes No Yes No...
result:
ok 50000 lines
Test #62:
score: 0
Accepted
time: 169ms
memory: 13844kb
input:
50000 10 1920000009 960000005 960000003 960000007 960000001 960000005 960000007 960000004 960000003 960000005 960000004 960000002 960000003 960000003 960000005 1 960000000 960000000 960000000 480000000 960000000 10 1920000014 960000004 960000007 960000006 960000001 960000001 960000006 960000003 9600...
output:
No Yes No Yes No Yes No Yes No No No Yes No No No Yes No No Yes No Yes No Yes Yes Yes No Yes Yes No Yes Yes Yes No Yes No Yes Yes Yes Yes Yes No Yes No Yes Yes Yes Yes Yes No Yes No No No No No Yes No Yes No No No Yes Yes Yes Yes No Yes Yes No No No No No No No Yes No Yes No No Yes No Yes Yes Yes No...
result:
ok 50000 lines
Test #63:
score: 0
Accepted
time: 111ms
memory: 13940kb
input:
50000 10 1920000006 960000002 960000001 960000002 960000002 960000005 960000003 960000005 960000005 960000003 960000004 960000002 960000004 960000005 960000005 1 960000000 960000000 960000000 480000000 960000000 10 1920000006 960000005 960000002 960000004 960000005 960000004 960000002 960000004 9600...
output:
Yes Yes Yes Yes No Yes Yes No No Yes Yes Yes Yes No Yes No Yes Yes No No Yes Yes Yes No Yes No Yes Yes Yes Yes Yes No No Yes Yes Yes No Yes Yes No No Yes Yes Yes Yes Yes No Yes No No Yes No Yes Yes No No Yes Yes Yes No Yes Yes No Yes Yes No No Yes Yes No No No Yes No No No No Yes Yes Yes No Yes No N...
result:
ok 50000 lines
Test #64:
score: 0
Accepted
time: 140ms
memory: 13872kb
input:
62500 8 1920000005 960000002 960000004 960000001 960000002 960000005 960000003 960000001 960000004 960000002 960000005 1 960000000 960000000 960000000 480000000 960000000 8 1920000006 960000002 960000003 960000002 960000005 960000002 960000001 960000004 960000005 960000005 960000003 1 960000000 9600...
output:
No Yes Yes No Yes Yes Yes No Yes Yes Yes Yes No No Yes Yes No Yes No No Yes Yes No No No Yes Yes No Yes No Yes No Yes Yes No No No No Yes Yes No Yes Yes Yes Yes Yes Yes Yes No No Yes Yes Yes No No No No Yes No Yes No No Yes No No No Yes No Yes No No Yes No No Yes Yes Yes No No No Yes No Yes Yes Yes ...
result:
ok 62500 lines
Test #65:
score: 0
Accepted
time: 133ms
memory: 11880kb
input:
62500 8 1920000004 960000001 960000001 960000004 960000001 960000005 960000004 960000002 960000004 960000005 960000003 1 960000000 960000000 960000000 480000000 960000000 8 1920000009 960000002 960000004 960000001 960000004 960000001 960000004 960000005 960000004 960000003 960000004 1 960000000 9600...
output:
Yes No No No Yes Yes No Yes No Yes Yes No Yes No No No No No Yes Yes Yes No No Yes Yes Yes No Yes No Yes No Yes Yes Yes No Yes No Yes Yes No No Yes Yes Yes Yes No Yes Yes Yes No Yes No Yes Yes No No No No No No No Yes Yes Yes No No No Yes No No Yes No No Yes Yes No No Yes Yes Yes No No Yes No No Yes...
result:
ok 62500 lines
Test #66:
score: 0
Accepted
time: 129ms
memory: 9648kb
input:
62500 8 1920000003 960000003 960000003 960000003 960000001 960000002 960000004 960000001 960000001 960000004 960000002 1 960000000 960000000 960000000 480000000 960000000 8 1920000005 960000001 960000002 960000002 960000005 960000005 960000002 960000002 960000004 960000001 960000003 1 960000000 9600...
output:
No No No No No Yes No No No Yes No Yes Yes Yes No No Yes No No No Yes No Yes Yes Yes Yes No No No No No Yes Yes No No Yes Yes No No Yes No No Yes Yes Yes No No No No Yes Yes Yes No Yes No No No Yes Yes No Yes No No No No No No Yes Yes Yes No Yes Yes Yes Yes Yes Yes Yes Yes No No No No Yes Yes No No ...
result:
ok 62500 lines