QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#731695 | #2610. Build a City | TheZone | AC ✓ | 2110ms | 63296kb | C++20 | 15.8kb | 2024-11-10 10:33:56 | 2024-11-10 10:33:57 |
Judging History
answer
#include<bits/stdc++.h>
#define pb push_back
#define P make_pair
#define fi first
#define se second
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
#define per(i,a,b) for(int i=(a);i>=(b);--i)
using namespace std;
typedef pair<int,int> pii;
typedef long long ll;
inline ll read(){
ll x=0,f=1,c=getchar();
while(c<'0'||c>'9')f=(c=='-'?-1:1),c=getchar();
while(c>='0'&&c<='9')x=(x<<1)+(x<<3)+(c^48),c=getchar();
return x*f;
}
const int N=5e5+3;
int n,m,ny[N];
ll K;
pii a[N];
bool vis[N];
int _;
namespace SGT{
int X;
const int M=1<<20;
int L[M],R[M],pl[M],pr[M],tl[M],tr[M],tg1[M],tg2[M],d[M];
ll mx1[M],mx2[M];
#define m ((l+r)>>1)
#define ls x<<1
#define rs x<<1|1
inline void pu(int x){
if(pl[ls]!=INT_MAX)pl[x]=pl[ls],L[x]=L[ls];
else pl[x]=pl[rs],L[x]=L[rs];
if(pr[rs])pr[x]=pr[rs],R[x]=R[rs];
else pr[x]=pr[ls],R[x]=R[ls];
tl[x]=min(tl[ls],tl[rs]),tr[x]=max(tr[ls],tr[rs]);
d[x]=max(d[ls],d[rs]);
if(tl[rs]!=INT_MAX&&tr[ls])d[x]=max(d[x],ny[tl[rs]]-ny[tr[ls]]);
mx1[x]=max(mx1[ls],mx1[rs]);
if(R[rs]&&R[ls]<R[rs])mx2[x]=mx2[rs];
else mx2[x]=max(mx2[ls],mx2[rs]);
}
inline void ad1(int x,int k){
if(!R[x])return;tg1[x]=k;
L[x]=R[x]=k;
mx1[x]=k+ny[pr[x]],mx2[x]=mx1[x]+ny[pr[x]];
}
inline void ad2(int x,int k){
if(!tr[x])return;tg2[x]=k,tg1[x]=0;
if(k){
L[x]=R[x]=k;pl[x]=tl[x],pr[x]=tr[x];
mx1[x]=k+ny[pr[x]],mx2[x]=mx1[x]+ny[pr[x]];
}
else{
L[x]=pl[x]=INT_MAX,R[x]=pr[x]=0;
mx1[x]=mx2[x]=0;
}
}
inline void pd(int x){
if(~tg2[x]){
ad2(ls,tg2[x]),ad2(rs,tg2[x]);
tg2[x]=-1;
}
if(tg1[x]){
ad1(ls,tg1[x]),ad1(rs,tg1[x]);
tg1[x]=0;
}
}
inline void bd(int x,int l,int r){
L[x]=pl[x]=tl[x]=INT_MAX,R[x]=pr[x]=tr[x]=0,tg1[x]=0,tg2[x]=-1,mx1[x]=mx2[x]=0,d[x]=0;
if(l==r)return;bd(ls,l,m),bd(rs,m+1,r);
}
inline void get(int x,int l,int r,int nx,bool fl){
if(l==r){
vis[l]=1;tl[x]=tr[x]=l;
if(fl){
L[x]=R[x]=X,mx1[x]=ny[l]+X,mx2[x]=mx1[x]+ny[l];
pl[x]=pr[x]=l;
}
return;
}pd(x);
if(nx<=m)get(ls,l,m,nx,fl);
else get(rs,m+1,r,nx,fl);
pu(x);
}
inline bool ck2(int x){return X+2ll*x<=K;}
int lst2;
inline void upd2(int x,int l,int r,int nl){
if(r<nl||!tr[x]||!ck2(ny[tl[x]]-lst2))return;
if(l>=nl&&ck2(d[x])&&ck2(ny[tl[x]]-lst2)){ad2(x,X),lst2=ny[tr[x]];return;}
if(l==r)return;
pd(x);upd2(ls,l,m,nl),upd2(rs,m+1,r,nl);pu(x);
}
int lst;
inline bool ck(int x,int y){return 2ll*(X-x)+ny[y]<=K; }
inline void upd1(int x,int l,int r,int nl){
if(r<nl||!pr[x])return;
if(l>=nl && L[x]==R[x] && ck(L[x],pl[x])==ck(R[x],pr[x])){
if(ck(L[x],pl[x])){
bool fl=0;
if(lst!=L[x])lst=L[x],fl=1;
ad1(x,X);
if(fl&&pr[x]<_)lst2=ny[pr[x]],upd2(1,1,_,pr[x]+1);
}
else ad2(x,0);
return ;
}
if(l==r)return;
pd(x),upd1(rs,m+1,r,nl),upd1(ls,l,m,nl),pu(x);
}
ll lim;
inline bool qr(int x,int l,int r,int nr){
if(l>nr)return 0;
if(r<=nr){
if(lim-mx1[x]<=K)return 1;
if(R[x]==X&&lim-mx2[x]<=K)return 1;
return 0;
}
pd(x);return qr(ls,l,m,nr)|qr(rs,m+1,r,nr);
}
inline int qmx(int x,int l,int r,int nl){
if(r<nl)return 0; if(l>=nl)return L[x];
pd(x);return max(qmx(ls,l,m,nl),qmx(rs,m+1,r,nl));
}
#undef m
}
using namespace SGT;
inline void solve(int test){
n=read(),K=read();
rep(i,1,n)a[i].fi=read(),ny[i]=a[i].se=read();
sort(a+1,a+n+1);
sort(ny+1,ny+n+1);_=m=unique(ny+1,ny+n+1)-ny-1;
rep(i,1,n)a[i].se=lower_bound(ny+1,ny+m+1,a[i].se)-ny;
bd(1,1,m);
rep(i,1,m)vis[i]=0;
for(int L=1,R;L<=n;L=R){
for(R=L;R<=n&&a[L].fi==a[R].fi;++R);
X=a[L].fi;
lst=-1;upd1(1,1,m,a[L].se);
rep(i,L,R-1)if(!vis[a[i].se]){
lim=2ll*(ny[a[i].se]+X);
bool fl=(lim<=K)|qr(1,1,m,a[i].se-1);
get(1,1,m,a[i].se,fl);
if(fl&&a[i].se<m) lst2=ny[a[i].se],upd2(1,1,m,a[i].se+1);
}
}
if(qmx(1,1,m,m)==a[n].fi)printf("Yes\n");
else printf("No\n");
}
int main() {
int T=read();rep(i,1,T)solve(i);
return 0;
}
/*#include<bits/stdc++.h>
#define pb push_back
#define P make_pair
#define fi first
#define se second
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
#define per(i,a,b) for(int i=(a);i>=(b);--i)
using namespace std;
typedef pair<int,int> pii;
typedef long long ll;
inline ll read(){
ll x=0,f=1,c=getchar();
while(c<'0'||c>'9')f=(c=='-'?-1:1),c=getchar();
while(c>='0'&&c<='9')x=(x<<1)+(x<<3)+(c^48),c=getchar();
return x*f;
}
const int N=5e5+3;
int n,m,ny[N];
ll K;
pii a[N];
bool vis[N];
int _;
namespace SGT{
int X;
const int M=1<<20;
int L[M],R[M],pl[M],pr[M],tl[M],tr[M],tg1[M],tg2[M],d[M];
ll mx1[M],mx2[M];
#define m ((l+r)>>1)
#define ls x<<1
#define rs x<<1|1
inline void pu(int x){
if(pl[ls]!=INT_MAX)pl[x]=pl[ls],L[x]=L[ls];
else pl[x]=pl[rs],L[x]=L[rs];
if(pr[rs])pr[x]=pr[rs],R[x]=R[rs];
else pr[x]=pr[ls],R[x]=R[ls];
tl[x]=min(tl[ls],tl[rs]),tr[x]=max(tr[ls],tr[rs]);
d[x]=max(d[ls],d[rs]);
if(tl[rs]!=INT_MAX&&tr[ls])d[x]=max(d[x],ny[tl[rs]]-ny[tr[ls]]);
mx1[x]=max(mx1[ls],mx1[rs]);
if(R[rs]&&R[ls]<R[rs])mx2[x]=mx2[rs];
else mx2[x]=max(mx2[ls],mx2[rs]);
}
inline void ad1(int x,int k){
if(!R[x])return;tg1[x]=k;
L[x]=R[x]=k;
mx1[x]=k+ny[pr[x]],mx2[x]=mx1[x]+ny[pr[x]];
}
inline void ad2(int x,int k){
if(!tr[x])return;tg2[x]=k,tg1[x]=0;
if(k){
L[x]=R[x]=k;pl[x]=tl[x],pr[x]=tr[x];
mx1[x]=k+ny[pr[x]],mx2[x]=mx1[x]+ny[pr[x]];
}
else{
L[x]=pl[x]=INT_MAX,R[x]=pr[x]=0;
mx1[x]=mx2[x]=0;
}
}
inline void pd(int x){
if(~tg2[x]){
ad2(ls,tg2[x]),ad2(rs,tg2[x]);
tg2[x]=-1;
}
if(tg1[x]){
ad1(ls,tg1[x]),ad1(rs,tg1[x]);
tg1[x]=0;
}
}
inline void bd(int x,int l,int r){
L[x]=pl[x]=tl[x]=INT_MAX,R[x]=pr[x]=tr[x]=0,tg1[x]=0,tg2[x]=-1,mx1[x]=mx2[x]=0,d[x]=0;
if(l==r)return;bd(ls,l,m),bd(rs,m+1,r);
}
inline void get(int x,int l,int r,int nx,bool fl){
if(l==r){
vis[l]=1;tl[x]=tr[x]=l;
if(fl){
L[x]=R[x]=X,mx1[x]=ny[l]+X,mx2[x]=mx1[x]+ny[l];
pl[x]=pr[x]=l;
}
return;
}pd(x);
if(nx<=m)get(ls,l,m,nx,fl);
else get(rs,m+1,r,nx,fl);
pu(x);
}
inline bool ck2(int x){return X+2ll*x<=K;}
int lst2;
inline void upd2(int x,int l,int r,int nl){
if(r<nl||!tr[x]||!ck2(ny[tl[x]]-lst2))return;
if(l>=nl&&ck2(d[x])&&ck2(ny[tl[x]]-lst2)){ad2(x,X),lst2=ny[tr[x]];return;}
if(l==r)return;
pd(x);upd2(ls,l,m,nl),upd2(rs,m+1,r,nl);pu(x);
}
int lst;
inline bool ck(int x,int y){return 2ll*(X-x)+ny[y]<=K; }
inline void upd1(int x,int l,int r,int nl){
if(r<nl||!pr[x])return;
if(l>=nl && L[x]==R[x] && ck(L[x],pl[x])==ck(R[x],pr[x])){
if(ck(L[x],pl[x])){
bool fl=0;
if(lst!=L[x])lst=L[x],fl=1;
ad1(x,X);
if(fl&&pr[x]<_)lst2=ny[pr[x]],upd2(1,1,_,pr[x]+1);
}
else ad2(x,0);
return ;
}
if(l==r)return;
pd(x),upd1(rs,m+1,r,nl),upd1(ls,l,m,nl),pu(x);
}
ll lim;
inline bool qr(int x,int l,int r,int nr){
if(l>nr)return 0;
if(r<=nr){
if(lim-mx1[x]<=K)return 1;
if(R[x]==X&&lim-mx2[x]<=K)return 1;
return 0;
}
pd(x);return qr(ls,l,m,nr)|qr(rs,m+1,r,nr);
}
inline int qmx(int x,int l,int r,int nl){
if(r<nl)return 0; if(l>=nl)return L[x];
pd(x);return max(qmx(ls,l,m,nl),qmx(rs,m+1,r,nl));
}
#undef m
}
using namespace SGT;
inline void solve(int test){
n=read(),K=read();
rep(i,1,n)a[i].fi=read(),ny[i]=a[i].se=read();
sort(a+1,a+n+1);
sort(ny+1,ny+n+1);_=m=unique(ny+1,ny+n+1)-ny-1;
rep(i,1,n)a[i].se=lower_bound(ny+1,ny+m+1,a[i].se)-ny;
bd(1,1,m);
rep(i,1,m)vis[i]=0;
for(int L=1,R;L<=n;L=R){
for(R=L;R<=n&&a[L].fi==a[R].fi;++R);
X=a[L].fi;
lst=-1;upd1(1,1,m,a[L].se);
rep(i,L,R-1)if(!vis[a[i].se]){
lim=2ll*(ny[a[i].se]+X);
bool fl=(lim<=K)|qr(1,1,m,a[i].se-1);
get(1,1,m,a[i].se,fl);
if(fl&&a[i].se<m) lst2=ny[a[i].se],upd2(1,1,m,a[i].se+1);
}
}
if(qmx(1,1,m,m)==a[n].fi)printf("Yes\n");
else printf("No\n");
}
int main() {
int T=read();rep(i,1,T)solve(i);
return 0;
}
#include<bits/stdc++.h>
#define pb push_back
#define P make_pair
#define fi first
#define se second
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
#define per(i,a,b) for(int i=(a);i>=(b);--i)
using namespace std;
typedef pair<int,int> pii;
typedef long long ll;
inline ll read(){
ll x=0,f=1,c=getchar();
while(c<'0'||c>'9')f=(c=='-'?-1:1),c=getchar();
while(c>='0'&&c<='9')x=(x<<1)+(x<<3)+(c^48),c=getchar();
return x*f;
}
const int N=5e5+3;
int n,m,ny[N];
ll K;
pii a[N];
bool vis[N];
int _;
namespace SGT{
int X;
const int M=1<<20;
int L[M],R[M],pl[M],pr[M],tl[M],tr[M],tg1[M],tg2[M],d[M];
ll mx1[M],mx2[M];
#define m ((l+r)>>1)
#define ls x<<1
#define rs x<<1|1
inline void pu(int x){
if(pl[ls]!=INT_MAX)pl[x]=pl[ls],L[x]=L[ls];
else pl[x]=pl[rs],L[x]=L[rs];
if(pr[rs])pr[x]=pr[rs],R[x]=R[rs];
else pr[x]=pr[ls],R[x]=R[ls];
tl[x]=min(tl[ls],tl[rs]),tr[x]=max(tr[ls],tr[rs]);
d[x]=max(d[ls],d[rs]);
if(tl[rs]!=INT_MAX&&tr[ls])d[x]=max(d[x],ny[tl[rs]]-ny[tr[ls]]);
mx1[x]=max(mx1[ls],mx1[rs]);
if(R[rs]&&R[ls]<R[rs])mx2[x]=mx2[rs];
else mx2[x]=max(mx2[ls],mx2[rs]);
}
inline void ad1(int x,int k){
if(!R[x])return;tg1[x]=k;
L[x]=R[x]=k;
mx1[x]=k+ny[pr[x]],mx2[x]=mx1[x]+ny[pr[x]];
}
inline void ad2(int x,int k){
if(!tr[x])return;tg2[x]=k,tg1[x]=0;
if(k){
L[x]=R[x]=k;pl[x]=tl[x],pr[x]=tr[x];
mx1[x]=k+ny[pr[x]],mx2[x]=mx1[x]+ny[pr[x]];
}
else{
L[x]=pl[x]=INT_MAX,R[x]=pr[x]=0;
mx1[x]=mx2[x]=0;
}
}
inline void pd(int x){
if(~tg2[x]){
ad2(ls,tg2[x]),ad2(rs,tg2[x]);
tg2[x]=-1;
}
if(tg1[x]){
ad1(ls,tg1[x]),ad1(rs,tg1[x]);
tg1[x]=0;
}
}
inline void bd(int x,int l,int r){
L[x]=pl[x]=tl[x]=INT_MAX,R[x]=pr[x]=tr[x]=0,tg1[x]=0,tg2[x]=-1,mx1[x]=mx2[x]=0,d[x]=0;
if(l==r)return;bd(ls,l,m),bd(rs,m+1,r);
}
inline void get(int x,int l,int r,int nx,bool fl){
if(l==r){
vis[l]=1;tl[x]=tr[x]=l;
if(fl){
L[x]=R[x]=X,mx1[x]=ny[l]+X,mx2[x]=mx1[x]+ny[l];
pl[x]=pr[x]=l;
}
return;
}pd(x);
if(nx<=m)get(ls,l,m,nx,fl);
else get(rs,m+1,r,nx,fl);
pu(x);
}
inline bool ck2(int x){return X+2ll*x<=K;}
int lst2;
inline void upd2(int x,int l,int r,int nl){
if(r<nl||!tr[x]||!ck2(ny[tl[x]]-lst2))return;
if(l>=nl&&ck2(d[x])&&ck2(ny[tl[x]]-lst2)){ad2(x,X),lst2=ny[tr[x]];return;}
if(l==r)return;
pd(x);upd2(ls,l,m,nl),upd2(rs,m+1,r,nl);pu(x);
}
int lst;
inline bool ck(int x,int y){return 2ll*(X-x)+ny[y]<=K; }
inline void upd1(int x,int l,int r,int nl){
if(r<nl||!pr[x])return;
if(l>=nl && L[x]==R[x] && ck(L[x],pl[x])==ck(R[x],pr[x])){
if(ck(L[x],pl[x])){
bool fl=0;
if(lst!=L[x])lst=L[x],fl=1;
ad1(x,X);
if(fl&&pr[x]<_)lst2=ny[pr[x]],upd2(1,1,_,pr[x]+1);
}
else ad2(x,0);
return ;
}
if(l==r)return;
pd(x),upd1(rs,m+1,r,nl),upd1(ls,l,m,nl),pu(x);
}
ll lim;
inline bool qr(int x,int l,int r,int nr){
if(l>nr)return 0;
if(r<=nr){
if(lim-mx1[x]<=K)return 1;
if(R[x]==X&&lim-mx2[x]<=K)return 1;
return 0;
}
pd(x);return qr(ls,l,m,nr)|qr(rs,m+1,r,nr);
}
inline int qmx(int x,int l,int r,int nl){
if(r<nl)return 0; if(l>=nl)return L[x];
pd(x);return max(qmx(ls,l,m,nl),qmx(rs,m+1,r,nl));
}
#undef m
}
using namespace SGT;
inline void solve(int test){
n=read(),K=read();
rep(i,1,n)a[i].fi=read(),ny[i]=a[i].se=read();
sort(a+1,a+n+1);
sort(ny+1,ny+n+1);_=m=unique(ny+1,ny+n+1)-ny-1;
rep(i,1,n)a[i].se=lower_bound(ny+1,ny+m+1,a[i].se)-ny;
bd(1,1,m);
rep(i,1,m)vis[i]=0;
for(int L=1,R;L<=n;L=R){
for(R=L;R<=n&&a[L].fi==a[R].fi;++R);
X=a[L].fi;
lst=-1;upd1(1,1,m,a[L].se);
rep(i,L,R-1)if(!vis[a[i].se]){
lim=2ll*(ny[a[i].se]+X);
bool fl=(lim<=K)|qr(1,1,m,a[i].se-1);
get(1,1,m,a[i].se,fl);
if(fl&&a[i].se<m) lst2=ny[a[i].se],upd2(1,1,m,a[i].se+1);
}
}
if(qmx(1,1,m,m)==a[n].fi)printf("Yes\n");
else printf("No\n");
}
int main() {
int T=read();rep(i,1,T)solve(i);
return 0;
}
#include<bits/stdc++.h>
#define pb push_back
#define P make_pair
#define fi first
#define se second
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
#define per(i,a,b) for(int i=(a);i>=(b);--i)
using namespace std;
typedef pair<int,int> pii;
typedef long long ll;
inline ll read(){
ll x=0,f=1,c=getchar();
while(c<'0'||c>'9')f=(c=='-'?-1:1),c=getchar();
while(c>='0'&&c<='9')x=(x<<1)+(x<<3)+(c^48),c=getchar();
return x*f;
}
const int N=5e5+3;
int n,m,ny[N];
ll K;
pii a[N];
bool vis[N];
int _;
namespace SGT{
int X;
const int M=1<<20;
int L[M],R[M],pl[M],pr[M],tl[M],tr[M],tg1[M],tg2[M],d[M];
ll mx1[M],mx2[M];
#define m ((l+r)>>1)
#define ls x<<1
#define rs x<<1|1
inline void pu(int x){
if(pl[ls]!=INT_MAX)pl[x]=pl[ls],L[x]=L[ls];
else pl[x]=pl[rs],L[x]=L[rs];
if(pr[rs])pr[x]=pr[rs],R[x]=R[rs];
else pr[x]=pr[ls],R[x]=R[ls];
tl[x]=min(tl[ls],tl[rs]),tr[x]=max(tr[ls],tr[rs]);
d[x]=max(d[ls],d[rs]);
if(tl[rs]!=INT_MAX&&tr[ls])d[x]=max(d[x],ny[tl[rs]]-ny[tr[ls]]);
mx1[x]=max(mx1[ls],mx1[rs]);
if(R[rs]&&R[ls]<R[rs])mx2[x]=mx2[rs];
else mx2[x]=max(mx2[ls],mx2[rs]);
}
inline void ad1(int x,int k){
if(!R[x])return;tg1[x]=k;
L[x]=R[x]=k;
mx1[x]=k+ny[pr[x]],mx2[x]=mx1[x]+ny[pr[x]];
}
inline void ad2(int x,int k){
if(!tr[x])return;tg2[x]=k,tg1[x]=0;
if(k){
L[x]=R[x]=k;pl[x]=tl[x],pr[x]=tr[x];
mx1[x]=k+ny[pr[x]],mx2[x]=mx1[x]+ny[pr[x]];
}
else{
L[x]=pl[x]=INT_MAX,R[x]=pr[x]=0;
mx1[x]=mx2[x]=0;
}
}
inline void pd(int x){
if(~tg2[x]){
ad2(ls,tg2[x]),ad2(rs,tg2[x]);
tg2[x]=-1;
}
if(tg1[x]){
ad1(ls,tg1[x]),ad1(rs,tg1[x]);
tg1[x]=0;
}
}
inline void bd(int x,int l,int r){
L[x]=pl[x]=tl[x]=INT_MAX,R[x]=pr[x]=tr[x]=0,tg1[x]=0,tg2[x]=-1,mx1[x]=mx2[x]=0,d[x]=0;
if(l==r)return;bd(ls,l,m),bd(rs,m+1,r);
}
inline void get(int x,int l,int r,int nx,bool fl){
if(l==r){
vis[l]=1;tl[x]=tr[x]=l;
if(fl){
L[x]=R[x]=X,mx1[x]=ny[l]+X,mx2[x]=mx1[x]+ny[l];
pl[x]=pr[x]=l;
}
return;
}pd(x);
if(nx<=m)get(ls,l,m,nx,fl);
else get(rs,m+1,r,nx,fl);
pu(x);
}
inline bool ck2(int x){return X+2ll*x<=K;}
int lst2;
inline void upd2(int x,int l,int r,int nl){
if(r<nl||!tr[x]||!ck2(ny[tl[x]]-lst2))return;
if(l>=nl&&ck2(d[x])&&ck2(ny[tl[x]]-lst2)){ad2(x,X),lst2=ny[tr[x]];return;}
if(l==r)return;
pd(x);upd2(ls,l,m,nl),upd2(rs,m+1,r,nl);pu(x);
}
int lst;
inline bool ck(int x,int y){return 2ll*(X-x)+ny[y]<=K; }
inline void upd1(int x,int l,int r,int nl){
if(r<nl||!pr[x])return;
if(l>=nl && L[x]==R[x] && ck(L[x],pl[x])==ck(R[x],pr[x])){
if(ck(L[x],pl[x])){
bool fl=0;
if(lst!=L[x])lst=L[x],fl=1;
ad1(x,X);
if(fl&&pr[x]<_)lst2=ny[pr[x]],upd2(1,1,_,pr[x]+1);
}
else ad2(x,0);
return ;
}
if(l==r)return;
pd(x),upd1(rs,m+1,r,nl),upd1(ls,l,m,nl),pu(x);
}
ll lim;
inline bool qr(int x,int l,int r,int nr){
if(l>nr)return 0;
if(r<=nr){
if(lim-mx1[x]<=K)return 1;
if(R[x]==X&&lim-mx2[x]<=K)return 1;
return 0;
}
pd(x);return qr(ls,l,m,nr)|qr(rs,m+1,r,nr);
}
inline int qmx(int x,int l,int r,int nl){
if(r<nl)return 0; if(l>=nl)return L[x];
pd(x);return max(qmx(ls,l,m,nl),qmx(rs,m+1,r,nl));
}
#undef m
}
using namespace SGT;
inline void solve(int test){
n=read(),K=read();
rep(i,1,n)a[i].fi=read(),ny[i]=a[i].se=read();
sort(a+1,a+n+1);
sort(ny+1,ny+n+1);_=m=unique(ny+1,ny+n+1)-ny-1;
rep(i,1,n)a[i].se=lower_bound(ny+1,ny+m+1,a[i].se)-ny;
bd(1,1,m);
rep(i,1,m)vis[i]=0;
for(int L=1,R;L<=n;L=R){
for(R=L;R<=n&&a[L].fi==a[R].fi;++R);
X=a[L].fi;
lst=-1;upd1(1,1,m,a[L].se);
rep(i,L,R-1)if(!vis[a[i].se]){
lim=2ll*(ny[a[i].se]+X);
bool fl=(lim<=K)|qr(1,1,m,a[i].se-1);
get(1,1,m,a[i].se,fl);
if(fl&&a[i].se<m) lst2=ny[a[i].se],upd2(1,1,m,a[i].se+1);
}
}
if(qmx(1,1,m,m)==a[n].fi)printf("Yes\n");
else printf("No\n");
}
int main() {
int T=read();rep(i,1,T)solve(i);
return 0;
}
*/
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 28252kb
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: 0ms
memory: 28288kb
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: 3ms
memory: 28272kb
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: 0ms
memory: 28344kb
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: 0ms
memory: 28280kb
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: 3ms
memory: 28428kb
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: 28324kb
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: 13ms
memory: 28396kb
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: 3ms
memory: 30388kb
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: 1048ms
memory: 57816kb
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: 1932ms
memory: 59088kb
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: 102ms
memory: 28300kb
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: 139ms
memory: 53536kb
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: 211ms
memory: 62704kb
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: 84ms
memory: 51176kb
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: 95ms
memory: 28840kb
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: 833ms
memory: 57972kb
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: 1719ms
memory: 62676kb
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: 452ms
memory: 53748kb
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: 709ms
memory: 36488kb
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: 711ms
memory: 54372kb
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: 55ms
memory: 28348kb
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: 51ms
memory: 28288kb
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: 58ms
memory: 28264kb
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: 81ms
memory: 28280kb
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: 81ms
memory: 28328kb
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: 82ms
memory: 28412kb
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: 123ms
memory: 28276kb
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: 132ms
memory: 28276kb
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: 142ms
memory: 28344kb
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: 151ms
memory: 28280kb
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: 159ms
memory: 28192kb
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: 166ms
memory: 28260kb
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: 186ms
memory: 28328kb
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: 200ms
memory: 28284kb
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: 172ms
memory: 28352kb
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: 178ms
memory: 28320kb
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: 192ms
memory: 28292kb
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: 245ms
memory: 28348kb
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: 244ms
memory: 30312kb
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: 239ms
memory: 28264kb
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: 99ms
memory: 31764kb
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: 139ms
memory: 30848kb
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: 642ms
memory: 55104kb
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: 2110ms
memory: 63296kb
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: 179ms
memory: 28268kb
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: 234ms
memory: 28420kb
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: 141ms
memory: 28288kb
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: 94ms
memory: 28276kb
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: 99ms
memory: 28280kb
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: 98ms
memory: 28260kb
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: 229ms
memory: 28356kb
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: 290ms
memory: 28360kb
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: 180ms
memory: 30336kb
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: 104ms
memory: 28352kb
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: 171ms
memory: 30372kb
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: 140ms
memory: 28264kb
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: 104ms
memory: 28328kb
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: 125ms
memory: 28324kb
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: 146ms
memory: 28328kb
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: 85ms
memory: 28324kb
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: 82ms
memory: 30316kb
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: 80ms
memory: 28284kb
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: 76ms
memory: 28320kb
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: 76ms
memory: 28256kb
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: 72ms
memory: 28192kb
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