QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#292220 | #5704. Joker | honglan0301 | 61 | 1952ms | 84664kb | C++17 | 8.9kb | 2023-12-27 21:07:47 | 2023-12-27 21:07:48 |
Judging History
answer
/*
author: honglan0301
Sexy_goodier _ xiaoqing
*/
#pragma GCC optimize(3)
#pragma GCC target("avx")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse")
#pragma GCC optimize("-fgcse-lm")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-ftree-pre")
#pragma GCC optimize("-ftree-vrp")
#pragma GCC optimize("-fpeephole2")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-fsched-spec")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-falign-jumps")
#pragma GCC optimize("-falign-loops")
#pragma GCC optimize("-falign-labels")
#pragma GCC optimize("-fdevirtualize")
#pragma GCC optimize("-fcaller-saves")
#pragma GCC optimize("-fcrossjumping")
#pragma GCC optimize("-fthread-jumps")
#pragma GCC optimize("-funroll-loops")
#pragma GCC optimize("-fwhole-program")
#pragma GCC optimize("-freorder-blocks")
#pragma GCC optimize("-fschedule-insns")
#pragma GCC optimize("inline-functions")
#pragma GCC optimize("-ftree-tail-merge")
#pragma GCC optimize("-fschedule-insns2")
#pragma GCC optimize("-fstrict-aliasing")
#pragma GCC optimize("-fstrict-overflow")
#pragma GCC optimize("-falign-functions")
#pragma GCC optimize("-fcse-skip-blocks")
#pragma GCC optimize("-fcse-follow-jumps")
#pragma GCC optimize("-fsched-interblock")
#pragma GCC optimize("-fpartial-inlining")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("-freorder-functions")
#pragma GCC optimize("-findirect-inlining")
#pragma GCC optimize("-fhoist-adjacent-loads")
#pragma GCC optimize("-frerun-cse-after-loop")
#pragma GCC optimize("inline-small-functions")
#pragma GCC optimize("-finline-small-functions")
#pragma GCC optimize("-ftree-switch-conversion")
#pragma GCC optimize("-foptimize-sibling-calls")
#pragma GCC optimize("-fexpensive-optimizations")
#pragma GCC optimize("-funsafe-loop-optimizations")
#pragma GCC optimize("inline-functions-called-once")
#pragma GCC optimize("-fdelete-null-pointer-checks")
#pragma GCC optimize(2)
#include <iostream>
#include <cstring>
#include <algorithm>
#include <cstdio>
#include <cctype>
#include <queue>
#include <map>
#include <unordered_map>
#include <cstdlib>
#include <ctime>
#include <vector>
#include <cmath>
#include <set>
#include <bitset>
#include <assert.h>
using namespace std;
//namespace Fread{const int SIZE=1<<20;char buf[SIZE],*S,*T;inline char getchar(){if(S==T){T=(S=buf)+fread(buf,1,SIZE,stdin);if(S==T)return'\n';}return*S++;}}using namespace Fread;namespace Fwrite{const int SIZE=1<<20;char buf[SIZE],*S=buf,*T=buf+SIZE;inline void flush(){fwrite(buf,1,S-buf,stdout);S=buf;}inline void putchar(char c){*S++=c;if(S==T)flush();}struct NTR{~NTR(){flush();}}ztr;}using namespace Fwrite;
//#define getchar Fread::getchar
//#define putchar Fwrite::putchar
namespace Fastio{struct Reader{template<typename T>Reader&operator>>(T&x){x=0;short f=1;char c=getchar();while(c<'0'||c>'9'){if(c=='-')f*=-1;c=getchar();}while(c>='0'&&c<='9')x=(x<<3)+(x<<1)+(c^48),c=getchar();x*=f;return*this;}Reader&operator>>(double&x){x=0;double t=0;short f=1,s=0;char c=getchar();while((c<'0'||c>'9')&&c!='.'){if(c=='-')f*=-1;c=getchar();}while(c>='0'&&c<='9'&&c!='.')x=x*10+(c^48),c=getchar();if(c=='.')c=getchar();else{x*=f;return*this;}while(c>='0'&&c<='9')t=t*10+(c^48),s++,c=getchar();while(s--)t/=10.0;x=(x+t)*f;return*this;}Reader&operator>>(long double&x){x=0;long double t=0;short f=1,s=0;char c=getchar();while((c<'0'||c>'9')&&c!='.'){if(c=='-')f*=-1;c=getchar();}while(c>='0'&&c<='9'&&c!='.')x=x*10+(c^48),c=getchar();if(c=='.')c=getchar();else{x*=f;return*this;}while(c>='0'&&c<='9')t=t*10+(c^48),s++,c=getchar();while(s--)t/=10.0;x=(x+t)*f;return*this;}Reader&operator>>(__float128&x){x=0;__float128 t=0;short f=1,s=0;char c=getchar();while((c<'0'||c>'9')&&c!='.'){if(c=='-')f*=-1;c=getchar();}while(c>='0'&&c<='9'&&c!='.')x=x*10+(c^48),c=getchar();if(c=='.')c=getchar();else{x*=f;return*this;}while(c>='0'&&c<='9')t=t*10+(c^48),s++,c=getchar();while(s--)t/=10.0;x=(x+t)*f;return*this;}Reader&operator>>(char&c){c=getchar();while(c==' '||c=='\n'||c=='\r')c=getchar();return*this;}Reader&operator>>(char*str){int len=0;char c=getchar();while(c==' '||c=='\n'||c=='\r')c=getchar();while(c!=' '&&c!='\n'&&c!='\r')str[len++]=c,c=getchar();str[len]='\0';return*this;}Reader&operator>>(string&str){str.clear();char c=getchar();while(c==' '||c=='\n'||c=='\r')c=getchar();while(c!=' '&&c!='\n'&&c!='\r')str.push_back(c),c=getchar();return*this;}Reader(){}}cin;const char endl='\n';struct Writer{const int Setprecision=6;typedef int mxdouble;template<typename T>Writer&operator<<(T x){if(x==0){putchar('0');return*this;}if(x<0)putchar('-'),x=-x;static short sta[40];short top=0;while(x>0)sta[++top]=x%10,x/=10;while(top>0)putchar(sta[top]+'0'),top--;return*this;}Writer&operator<<(double x){if(x<0)putchar('-'),x=-x;mxdouble _=x;x-=(double)_;static short sta[40];short top=0;while(_>0)sta[++top]=_%10,_/=10;if(top==0)putchar('0');while(top>0)putchar(sta[top]+'0'),top--;putchar('.');for(int i=0;i<Setprecision;i++)x*=10;_=x;while(_>0)sta[++top]=_%10,_/=10;for(int i=0;i<Setprecision-top;i++)putchar('0');while(top>0)putchar(sta[top]+'0'),top--;return*this;}Writer&operator<<(long double x){if(x<0)putchar('-'),x=-x;mxdouble _=x;x-=(long double)_;static short sta[40];short top=0;while(_>0)sta[++top]=_%10,_/=10;if(top==0)putchar('0');while(top>0)putchar(sta[top]+'0'),top--;putchar('.');for(int i=0;i<Setprecision;i++)x*=10;_=x;while(_>0)sta[++top]=_%10,_/=10;for(int i=0;i<Setprecision-top;i++)putchar('0');while(top>0)putchar(sta[top]+'0'),top--;return*this;}Writer&operator<<(__float128 x){if(x<0)putchar('-'),x=-x;mxdouble _=x;x-=(__float128)_;static short sta[40];short top=0;while(_>0)sta[++top]=_%10,_/=10;if(top==0)putchar('0');while(top>0)putchar(sta[top]+'0'),top--;putchar('.');for(int i=0;i<Setprecision;i++)x*=10;_=x;while(_>0)sta[++top]=_%10,_/=10;for(int i=0;i<Setprecision-top;i++)putchar('0');while(top>0)putchar(sta[top]+'0'),top--;return*this;}Writer&operator<<(char c){putchar(c);return*this;}Writer&operator<<(char*str){int cur=0;while(str[cur])putchar(str[cur++]);return*this;}Writer&operator<<(const char*str){int cur=0;while(str[cur])putchar(str[cur++]);return*this;}Writer&operator<<(string str){int st=0,ed=str.size();while(st<ed)putchar(str[st++]);return*this;}Writer(){}}cout;}using namespace Fastio;
#define cin Fastio::cin
#define cout Fastio::cout
#define endl Fastio::endl//;fflush(stdout)
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define mod 998244353
int n,m,q,u[400005],v[400005],nl[200005],nr[200005],tl[200005],nmd[200005],nans,ans[200005];
int nmn[400005],nmx[400005];
vector <int> cz[600005];
void add(int l,int r,int x,int y,int k,int p)
{
if(l>=x&&r<=y) return cz[p].pb(k),void(); int mid=(l+r)>>1;
if(mid>=x) add(l,mid,x,y,k,p<<1); if(mid<y) add(mid+1,r,x,y,k,(p<<1)|1);
}
int fa[400005],sz[400005],top,mxp;
int getfa(int x) {while(fa[x]!=x) x=fa[x]; return x;}
pair <int,int> stk[8000005];
void merge(int x,int y)
{
x=getfa(x),y=getfa(y); if(x==y) return; if(sz[x]>sz[y]) swap(x,y);
stk[++top]=mp(x,sz[x]); sz[y]+=sz[x]; fa[x]=y;
}
void solve(int l,int r,int p)
{
int lst=nans,ntp=top;
if(!lst)
{
for(auto i:cz[p])
{
merge(u[i],v[i]+n); merge(u[i]+n,v[i]);
if(getfa(u[i])==getfa(u[i]+n)||getfa(v[i]==getfa(v[i]+n))) {nans=1; break;}
}
}
if(l==r) ans[l]=nans; else solve(l,(l+r)>>1,p<<1),solve(((l+r)>>1)+1,r,(p<<1)|1);
while(top>ntp) sz[fa[stk[top].fi]]-=stk[top].se,fa[stk[top].fi]=stk[top].fi,top--;
nans=lst; cz[p].clear();
}
int cnt[200005],ncc,nx[200005],ny[200005],bh[200005],mxm,mnm;
bool ck()
{
int na=0;
for(int i=1;i<=2*n;i++) fa[i]=i,sz[i]=1;
for(int i=1;i<=m;i++)
{
merge(u[i],v[i]+n),merge(u[i]+n,v[i]);
if(getfa(u[i])==getfa(u[i]+n)||getfa(v[i])==getfa(v[i]+n))
{
mnm=i; mxm=i+m; na=1; break;
}
}
return na;
}
signed main()
{
//freopen("joker.i060","r",stdin);
cin>>n>>m>>q; for(int i=1;i<=m;i++) cin>>u[i]>>v[i],u[i+m]=u[i],v[i+m]=v[i];
if(!ck()) {for(int i=1;i<=q;i++) cout<<"NO"<<endl; return 0;}
for(int i=1;i<=q;i++) cin>>nx[i]>>ny[i],cnt[ny[i]%m+1]++;
for(int i=1;i<=m;i++)
{
if(cnt[i]) ncc++,nl[ncc]=mnm,nr[ncc]=mxm,tl[ncc]=i,bh[i]=ncc;
}
tl[ncc+1]=m+m;
while(1)
{
bool flag=1;
for(int i=1;i<=ncc;i++) nmd[i]=((nl[i]+nr[i])>>1);
for(int i=1;i<=ncc;i++) flag&=(nl[i]>nr[i]); if(flag) break;
memset(nmn,127,sizeof(nmn)); memset(nmx,0,sizeof(nmx));
for(int i=1;i<=ncc;i++) for(int j=nmd[i-1]+1;j<=nmd[i];j++) nmn[j]=i;
for(int i=1;i<=ncc;i++) for(int j=tl[i];j<=tl[i+1]&&j<=nmd[i];j++) nmx[j]=i;
for(int i=1;i<=2*m;i++) if(nmx[i]>=nmn[i]) add(1,ncc,nmn[i],nmx[i],i,1);
nans=top=0; for(int i=1;i<=2*n;i++) sz[i]=1,fa[i]=i; solve(1,ncc,1);
for(int i=1;i<=ncc;i++) if(ans[i]) nr[i]=nmd[i]-1; else nl[i]=nmd[i]+1;
}
for(int i=1;i<=q;i++)
{
if(ny[i]==m) {cout<<((nl[bh[1]]<nx[i])?"YES":"NO")<<endl;}
else {cout<<((nl[bh[ny[i]+1]]<nx[i]+m)?"YES":"NO")<<endl;}
}
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 6
Accepted
Test #1:
score: 6
Accepted
time: 0ms
memory: 36440kb
input:
6 8 2 1 3 1 5 1 6 2 5 2 6 3 4 3 5 5 6 4 8 4 7
output:
NO YES
result:
ok 2 lines
Test #2:
score: 0
Accepted
time: 0ms
memory: 26112kb
input:
2 1 1 1 2 1 1
output:
NO
result:
ok single line: 'NO'
Test #3:
score: 0
Accepted
time: 0ms
memory: 32192kb
input:
4 6 6 4 3 1 4 1 3 2 1 3 2 2 4 3 3 6 6 4 5 3 4 1 2 5 6
output:
YES YES YES YES YES YES
result:
ok 6 lines
Test #4:
score: 0
Accepted
time: 3ms
memory: 36308kb
input:
3 3 6 1 2 2 3 3 1 1 1 1 2 1 3 2 2 2 3 3 3
output:
NO NO NO NO NO NO
result:
ok 6 lines
Test #5:
score: 0
Accepted
time: 3ms
memory: 30156kb
input:
4 2 1 2 3 1 4 1 2
output:
NO
result:
ok single line: 'NO'
Test #6:
score: 0
Accepted
time: 3ms
memory: 34336kb
input:
5 7 28 1 2 2 3 3 4 4 5 1 3 2 4 3 5 3 4 4 6 2 4 4 5 5 6 5 7 6 6 7 7 1 4 1 5 1 6 2 5 2 6 2 7 4 7 3 5 3 6 3 7 6 7 4 4 1 7 2 2 5 5 1 1 1 2 1 3 3 3 2 3
output:
YES NO NO YES YES NO YES YES NO NO NO NO NO NO NO NO NO NO YES YES NO YES YES YES YES NO YES YES
result:
ok 28 lines
Test #7:
score: 0
Accepted
time: 6ms
memory: 30148kb
input:
200 100 200 69 122 135 163 115 132 191 194 120 177 36 157 76 178 43 184 50 83 112 190 65 97 66 164 117 183 74 171 93 136 110 133 79 194 93 159 144 157 46 144 130 136 83 131 16 49 17 173 91 139 113 136 61 167 4 39 61 76 10 55 48 118 30 40 101 132 111 123 46 143 2 78 40 58 109 198 50 158 36 105 94 100...
output:
NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO ...
result:
ok 200 lines
Test #8:
score: 0
Accepted
time: 0ms
memory: 32220kb
input:
200 180 200 93 196 44 163 35 88 132 184 82 127 96 189 69 93 80 178 133 153 28 180 37 49 48 52 67 114 104 121 72 195 105 149 111 186 27 108 2 96 22 163 53 173 111 128 96 142 119 185 71 123 42 129 72 173 102 160 90 133 7 125 28 136 81 123 63 146 80 129 123 190 50 161 62 175 18 45 64 87 48 91 24 200 45...
output:
YES NO YES NO YES NO NO YES NO NO YES YES NO NO NO NO NO YES YES NO YES NO NO YES YES YES YES NO YES YES NO NO NO NO NO YES NO NO YES NO NO YES YES YES YES YES NO YES YES YES NO YES YES NO NO YES YES NO YES YES YES NO NO NO YES YES YES YES YES YES YES YES NO YES NO YES YES YES YES YES NO NO NO NO NO...
result:
ok 200 lines
Test #9:
score: 0
Accepted
time: 3ms
memory: 32308kb
input:
160 200 200 2 149 7 94 80 122 26 123 1 131 38 56 11 156 18 130 10 42 5 121 29 143 4 12 65 124 25 156 12 150 9 18 81 141 50 128 5 143 48 79 2 15 132 134 105 109 10 160 91 112 22 44 78 99 72 88 104 132 124 143 54 83 100 143 7 113 56 103 40 63 134 158 41 53 55 126 54 107 26 78 8 38 62 156 53 129 10 92 ...
output:
YES YES NO YES YES YES NO NO NO NO YES YES NO YES YES YES YES YES YES NO YES YES NO YES NO YES YES NO YES NO YES YES NO YES YES YES NO YES NO NO YES NO NO NO YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES NO NO YES NO YES NO YES YES NO NO NO YES YES YES...
result:
ok 200 lines
Test #10:
score: 0
Accepted
time: 8ms
memory: 32200kb
input:
100 200 200 52 54 28 29 56 81 61 79 54 57 60 74 90 95 26 69 25 74 7 90 70 72 30 52 25 48 32 53 9 46 61 100 11 82 55 72 32 35 2 77 6 29 91 92 14 100 8 17 23 62 41 96 14 16 84 88 39 45 6 40 60 90 50 75 67 86 45 77 3 61 8 88 23 58 76 95 2 94 38 41 22 31 40 66 13 71 19 84 18 56 4 89 52 93 2 36 45 67 6 6...
output:
YES YES YES NO YES YES YES YES YES YES NO YES YES YES NO YES YES YES YES YES YES YES NO YES YES NO YES YES NO YES NO YES YES YES YES YES YES NO NO NO NO YES NO NO YES NO NO YES NO NO NO YES YES NO NO YES YES NO YES NO NO NO YES YES YES NO NO NO YES YES NO YES NO YES YES NO YES YES NO NO YES YES YES ...
result:
ok 200 lines
Test #11:
score: 0
Accepted
time: 4ms
memory: 32368kb
input:
200 198 200 66 140 127 142 6 96 21 26 61 69 23 98 137 191 12 64 5 44 68 121 61 133 192 198 67 80 100 159 47 103 43 174 63 82 55 183 56 131 153 189 72 162 23 167 32 184 66 133 61 96 65 116 194 198 56 156 33 43 75 83 77 125 30 128 16 24 11 94 17 117 49 77 8 146 165 183 119 130 17 42 3 40 77 144 61 159...
output:
NO YES YES NO YES NO NO NO YES NO YES YES NO NO NO YES NO NO NO NO YES NO NO YES NO NO NO NO NO YES YES NO NO NO YES YES NO YES YES YES YES NO NO YES NO NO NO NO YES YES YES NO YES NO NO NO NO YES YES NO YES NO NO YES YES YES NO NO YES NO NO YES YES YES NO YES YES NO YES NO NO NO NO NO YES NO YES NO...
result:
ok 200 lines
Test #12:
score: 0
Accepted
time: 5ms
memory: 32208kb
input:
200 200 200 78 96 145 186 169 180 20 132 10 124 26 56 106 174 62 161 169 198 15 162 97 142 2 61 50 78 19 49 9 75 9 182 26 63 52 92 92 192 1 17 174 186 34 123 14 58 13 153 165 169 151 155 27 77 24 51 70 86 80 151 28 95 135 179 48 62 62 171 55 156 98 198 14 152 54 79 4 105 66 113 75 187 11 66 72 114 5...
output:
NO NO YES NO YES YES NO YES NO YES YES NO NO NO NO YES NO NO NO NO NO YES NO YES NO YES YES YES NO YES NO NO YES NO YES YES NO YES NO YES NO YES YES YES YES YES NO NO NO NO YES YES NO NO YES YES YES NO YES YES NO NO YES NO YES YES YES NO YES NO NO NO YES YES NO NO NO YES NO NO YES NO NO NO NO YES YE...
result:
ok 200 lines
Test #13:
score: 0
Accepted
time: 0ms
memory: 32260kb
input:
100 197 200 79 64 64 5 27 5 19 27 19 62 62 11 11 95 95 16 84 16 84 81 21 81 15 21 8 15 73 8 14 73 14 94 94 66 66 97 97 7 7 63 63 93 30 93 69 30 69 6 43 6 76 43 54 76 54 68 88 68 88 39 56 39 74 56 72 74 72 40 40 44 44 52 75 52 75 26 26 70 70 25 99 25 99 28 28 50 50 46 37 46 37 12 12 53 53 38 38 87 87...
output:
YES YES NO YES NO YES YES YES YES NO YES NO YES YES NO YES YES NO NO YES YES YES YES NO YES YES YES NO YES YES YES YES NO NO YES NO NO YES YES NO NO YES YES NO YES YES YES NO YES NO YES YES YES NO NO YES NO YES YES NO NO YES YES YES YES YES YES YES YES YES YES YES YES NO NO YES NO YES YES YES YES YE...
result:
ok 200 lines
Test #14:
score: 0
Accepted
time: 0ms
memory: 28192kb
input:
200 200 200 45 64 11 45 137 45 39 137 137 109 137 174 133 137 39 103 131 133 103 88 88 152 88 194 184 194 88 32 169 194 32 193 184 122 158 32 75 193 75 74 122 51 167 75 139 167 139 8 139 146 63 167 172 139 8 5 63 150 63 182 5 82 150 19 182 10 99 19 82 106 99 72 10 69 72 160 72 44 177 44 31 44 160 36...
output:
NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO ...
result:
ok 200 lines
Test #15:
score: 0
Accepted
time: 8ms
memory: 34276kb
input:
200 200 200 29 194 138 194 176 194 29 96 167 29 100 138 165 176 96 135 58 100 79 100 79 107 107 128 107 43 107 189 189 18 11 128 131 43 131 118 42 43 195 42 118 196 90 11 105 118 157 118 73 157 108 196 157 20 199 73 137 105 4 157 108 94 94 156 84 20 99 137 53 4 197 53 156 50 197 89 50 23 30 99 162 8...
output:
YES NO NO NO NO YES NO NO NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO NO NO NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES...
result:
ok 200 lines
Test #16:
score: 0
Accepted
time: 3ms
memory: 32240kb
input:
180 200 200 162 102 162 93 76 162 93 21 162 64 64 23 23 66 73 23 102 45 50 64 49 93 28 66 23 86 153 64 73 8 73 132 94 49 86 40 8 53 92 50 170 94 9 132 53 12 123 53 94 72 9 78 40 119 106 9 53 141 141 158 158 120 78 1 78 104 100 123 100 130 100 157 157 65 148 1 111 148 1 136 65 15 148 18 115 136 65 41...
output:
NO YES NO NO NO NO NO NO NO YES NO NO NO YES NO NO NO NO NO NO NO YES NO YES NO YES NO NO NO YES NO NO NO NO NO NO YES YES NO NO NO NO NO NO NO NO NO YES NO YES NO NO YES NO NO NO NO YES YES YES NO YES YES NO NO YES NO YES NO YES YES YES YES NO NO NO NO NO NO NO YES NO YES NO YES NO YES NO NO NO NO ...
result:
ok 200 lines
Test #17:
score: 0
Accepted
time: 3ms
memory: 32264kb
input:
100 198 200 13 28 50 81 50 33 30 50 33 29 29 24 77 33 91 24 99 91 91 100 91 88 100 90 48 100 90 68 66 90 68 98 89 98 89 63 98 3 20 89 3 41 73 41 73 35 73 70 35 61 49 58 61 7 7 39 61 83 49 67 83 10 94 67 47 40 47 74 82 10 74 97 71 47 6 82 71 51 15 51 44 87 56 44 38 31 31 43 55 56 31 69 36 38 69 23 75...
output:
NO YES NO NO NO YES NO NO NO YES NO YES NO YES NO YES NO NO YES YES NO YES YES NO NO YES YES YES YES YES NO YES YES YES NO YES YES YES YES NO NO YES YES NO NO YES YES NO YES YES NO YES YES YES NO YES YES YES YES YES YES YES NO NO NO YES YES NO YES YES YES NO YES YES YES YES YES NO YES NO NO YES NO N...
result:
ok 200 lines
Test #18:
score: 0
Accepted
time: 8ms
memory: 32308kb
input:
100 198 200 79 11 29 54 77 79 29 52 77 49 54 64 64 92 91 92 52 18 91 59 92 100 59 47 95 92 30 18 70 30 39 95 82 47 13 95 65 13 19 30 39 12 13 51 19 66 5 66 57 66 28 51 66 44 97 66 1 96 1 50 50 46 96 78 55 46 78 42 81 78 81 75 42 68 78 74 55 76 58 76 68 87 87 61 87 85 74 26 86 58 90 58 85 32 61 69 85...
output:
YES YES NO YES YES YES NO YES YES YES YES NO YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES NO NO NO YES YES NO YES NO YES NO YES YES YES NO YES YES NO YES YES NO YES NO YES NO NO YES YES YES YES YES YES NO NO YES NO YES YES NO YES NO NO YES YES YES YES YES YES YES YES YES NO YES NO YES ...
result:
ok 200 lines
Test #19:
score: 0
Accepted
time: 4ms
memory: 36344kb
input:
100 198 200 19 28 36 28 19 74 28 69 13 28 36 58 19 15 69 78 19 43 47 19 43 93 15 20 58 18 78 73 6 73 6 22 41 6 41 79 5 6 24 41 24 87 9 41 24 55 50 73 41 16 92 55 56 55 9 51 63 16 86 9 56 71 72 16 46 92 50 7 35 56 51 11 46 39 2 11 80 7 27 39 57 80 42 46 39 81 21 34 80 3 42 59 39 88 80 32 54 27 75 81 ...
output:
NO YES YES YES NO YES NO NO YES YES NO NO YES YES YES NO YES YES YES YES YES YES YES NO NO YES YES YES NO YES YES YES YES YES YES YES NO NO NO YES YES NO YES NO YES NO NO YES NO YES YES YES NO YES YES YES YES NO NO NO YES YES NO NO NO YES YES NO YES YES YES YES NO YES YES YES NO YES NO YES NO NO YES...
result:
ok 200 lines
Test #20:
score: 0
Accepted
time: 4ms
memory: 32304kb
input:
60 200 200 27 9 49 14 32 55 43 37 17 57 7 31 21 31 21 60 8 20 2 33 50 47 12 34 7 5 7 24 21 5 10 43 54 51 53 29 54 36 7 53 27 29 43 7 8 1 49 60 35 27 18 23 3 1 15 36 51 29 30 18 14 18 1 27 4 23 15 5 17 36 39 3 10 26 43 1 1 50 53 44 29 6 7 40 50 21 39 42 53 56 18 5 56 14 43 54 58 1 19 11 58 9 1 55 33 ...
output:
YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YE...
result:
ok 200 lines
Test #21:
score: 0
Accepted
time: 0ms
memory: 32364kb
input:
100 200 200 49 9 56 1 30 90 16 83 64 17 81 29 44 51 89 77 95 57 81 12 90 82 60 61 40 30 14 31 40 96 52 95 65 30 26 65 14 81 88 80 35 100 15 59 77 12 41 60 34 7 39 71 83 63 49 83 32 23 94 56 20 19 27 73 1 37 99 81 5 6 65 12 19 80 37 80 52 28 91 90 17 22 56 54 20 75 83 55 65 35 68 34 17 69 25 26 88 49...
output:
YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES ...
result:
ok 200 lines
Test #22:
score: 0
Accepted
time: 4ms
memory: 36460kb
input:
160 200 200 2 43 123 53 139 89 83 74 135 84 30 88 57 98 137 20 22 25 8 42 81 89 88 59 81 131 121 105 14 5 12 157 154 104 33 115 99 41 47 42 128 69 124 138 81 8 61 115 34 87 156 26 79 76 65 26 71 102 13 79 48 103 77 101 66 87 40 36 104 132 64 157 106 62 22 133 123 160 51 157 136 129 142 131 5 155 42 ...
output:
YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES...
result:
ok 200 lines
Test #23:
score: 0
Accepted
time: 7ms
memory: 32248kb
input:
80 200 200 31 30 30 34 34 78 30 39 31 79 39 78 40 47 39 52 46 17 26 47 52 17 46 40 79 58 28 40 72 37 26 37 9 10 58 71 37 50 27 28 18 70 27 37 71 70 9 20 18 20 50 60 27 68 80 71 4 68 41 80 11 4 14 60 22 2 68 76 22 55 2 80 14 11 11 76 1 42 14 55 2 76 1 3 2 42 11 3 6 11 38 42 6 33 7 42 67 33 38 67 69 5...
output:
NO YES YES YES YES YES NO NO NO NO NO NO YES YES YES NO NO YES YES NO YES YES YES YES NO NO NO YES YES YES NO YES YES YES NO NO YES NO NO YES NO NO NO YES YES NO NO NO YES YES YES YES NO YES NO NO YES YES NO YES NO YES NO YES NO YES NO NO YES NO YES NO NO YES YES YES NO NO YES YES YES YES NO NO YES ...
result:
ok 200 lines
Test #24:
score: 0
Accepted
time: 0ms
memory: 34264kb
input:
100 200 200 65 96 66 47 90 54 82 58 82 28 47 96 85 58 43 72 47 42 42 85 69 42 85 43 42 15 43 80 69 9 43 12 15 9 31 73 78 10 12 9 89 73 12 84 12 31 10 31 15 61 61 12 70 31 8 31 7 12 25 40 61 38 52 25 94 40 52 8 8 93 7 37 8 24 93 38 81 33 38 33 52 48 33 94 53 38 37 53 53 48 37 92 75 98 75 92 35 92 98 ...
output:
YES YES NO NO YES YES YES NO YES YES YES YES NO NO YES YES YES NO YES NO NO NO NO YES YES NO YES YES NO NO NO YES YES YES YES YES YES NO NO NO NO YES YES YES YES NO NO YES NO NO YES YES YES NO YES NO YES NO YES YES NO YES YES YES NO NO NO YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YE...
result:
ok 200 lines
Test #25:
score: 0
Accepted
time: 0ms
memory: 36392kb
input:
140 200 200 122 139 11 122 122 5 98 60 41 60 21 35 21 110 35 114 26 41 22 63 108 59 12 19 46 59 15 59 12 15 57 46 91 46 133 91 62 67 94 15 57 100 100 80 80 99 79 48 79 51 121 99 30 73 51 66 44 120 50 64 55 77 14 17 138 50 138 109 103 55 54 103 49 42 3 134 42 103 69 3 3 13 106 134 16 13 105 134 78 10...
output:
NO YES YES NO NO YES NO NO YES YES NO YES YES NO NO YES NO NO YES YES YES NO YES YES NO YES NO YES YES YES YES NO YES YES NO NO NO YES YES YES NO YES YES YES YES YES YES YES NO NO YES YES YES YES NO NO YES YES YES YES YES NO NO YES YES NO YES NO NO YES YES YES YES NO NO YES YES YES YES YES YES YES N...
result:
ok 200 lines
Test #26:
score: 0
Accepted
time: 3ms
memory: 32292kb
input:
70 200 200 53 23 34 54 69 70 67 54 48 39 66 2 8 23 30 2 29 70 21 25 61 33 68 41 7 1 28 41 55 5 52 64 31 61 66 51 45 58 14 18 56 40 44 6 13 1 47 64 66 20 38 51 54 25 8 39 65 26 14 56 14 38 28 39 4 29 42 43 3 6 20 47 68 4 32 42 20 31 44 59 40 50 12 22 51 65 18 13 40 28 52 32 23 54 62 10 23 62 53 37 18...
output:
YES YES YES YES NO NO YES YES YES YES YES YES YES NO YES YES YES NO YES NO YES NO NO NO NO YES NO YES YES NO YES YES YES NO YES YES YES NO YES YES NO YES NO YES YES YES YES YES NO YES YES NO YES NO NO NO NO NO YES YES NO YES NO NO YES YES YES NO YES NO YES YES NO NO NO YES NO NO YES NO NO YES NO NO ...
result:
ok 200 lines
Test #27:
score: 0
Accepted
time: 3ms
memory: 36444kb
input:
100 200 200 49 9 56 1 30 90 16 83 64 17 81 29 44 51 89 77 95 57 81 12 90 82 60 61 40 30 14 31 40 96 52 95 65 30 26 65 14 81 88 80 35 100 15 59 77 12 41 60 34 7 39 71 83 63 49 83 32 23 94 56 20 19 27 73 1 37 99 81 5 6 65 12 19 80 37 80 52 28 91 90 17 22 56 54 20 75 83 55 65 35 68 34 17 69 25 26 88 49...
output:
YES YES NO NO YES YES YES NO YES NO YES YES NO YES NO NO YES YES NO YES YES NO YES YES YES YES YES NO YES NO NO YES YES YES YES NO YES YES YES YES YES YES YES NO YES YES YES NO YES YES YES YES NO YES YES NO NO YES YES YES YES NO NO YES YES NO YES NO YES YES YES YES YES YES YES NO YES YES YES YES YES...
result:
ok 200 lines
Test #28:
score: 0
Accepted
time: 8ms
memory: 32364kb
input:
150 200 200 109 146 18 36 126 149 66 148 52 122 124 38 144 101 22 49 25 138 34 7 64 147 94 58 43 31 119 43 136 134 12 107 62 26 124 53 108 55 85 101 57 100 22 76 55 121 101 131 144 96 118 89 45 79 26 127 103 84 122 18 146 101 10 120 8 90 61 75 47 117 109 4 50 111 87 84 83 102 96 1 31 41 29 33 91 118...
output:
NO NO NO NO NO NO YES NO NO YES NO NO YES NO YES YES NO YES NO NO NO YES NO NO YES NO NO YES YES NO YES YES NO YES NO YES YES YES YES YES YES YES NO YES NO YES YES YES NO YES YES NO YES YES YES YES YES NO NO YES YES NO YES YES NO YES NO NO YES YES YES YES YES NO YES YES NO YES YES NO YES YES NO YES ...
result:
ok 200 lines
Subtask #2:
score: 8
Accepted
Dependency #1:
100%
Accepted
Test #29:
score: 8
Accepted
time: 0ms
memory: 30140kb
input:
2000 1000 2000 143 636 1758 229 68 948 489 540 509 143 766 1995 969 708 259 1795 1688 797 1636 1704 1089 1594 1857 386 1885 1756 1741 191 362 1722 1312 1327 617 927 1286 775 383 1786 1455 1743 1384 188 1309 324 1920 78 744 1847 1000 1656 1117 603 1911 283 11 1707 550 1144 1397 1506 147 231 323 241 1...
output:
NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO ...
result:
ok 2000 lines
Test #30:
score: 0
Accepted
time: 7ms
memory: 32516kb
input:
2000 1800 2000 659 1154 595 155 287 1279 1180 901 1312 1063 1991 697 646 518 1728 700 296 1658 855 103 1519 806 95 1975 200 943 1137 811 1414 370 775 1194 222 1788 545 58 1498 288 1011 1786 1447 1605 789 1577 806 134 1826 1532 1934 1904 697 1772 56 471 1775 1766 1234 1585 1643 1177 621 1129 665 1307...
output:
YES YES YES NO YES YES NO YES YES YES YES NO YES YES YES YES YES YES YES NO NO YES NO YES YES NO YES YES NO NO YES YES NO YES NO YES NO YES YES YES YES YES YES YES NO YES NO NO YES NO NO NO YES YES YES NO NO NO NO YES YES YES YES NO YES YES YES YES NO YES YES YES NO NO NO NO YES YES YES NO NO YES NO...
result:
ok 2000 lines
Test #31:
score: 0
Accepted
time: 8ms
memory: 34384kb
input:
1600 2000 2000 1066 1409 222 91 158 1229 1216 1261 1107 1469 720 764 1359 120 60 936 10 1272 1062 1124 752 1096 358 568 1122 1293 1286 767 565 1018 900 1258 1201 1178 1107 1148 1363 202 922 1549 1099 1467 1139 647 1343 1525 1326 1388 582 783 139 973 494 56 1348 340 1207 49 257 380 1302 465 33 851 12...
output:
YES NO YES YES YES YES YES YES YES NO YES YES NO YES NO YES YES YES NO YES NO YES YES NO NO YES NO YES YES NO YES YES YES YES YES YES YES YES NO NO YES YES NO YES NO YES NO YES YES NO NO YES YES NO YES NO NO NO YES YES NO YES YES NO YES YES YES YES NO YES YES YES NO YES YES YES NO YES NO YES NO YES ...
result:
ok 2000 lines
Test #32:
score: 0
Accepted
time: 8ms
memory: 32312kb
input:
1000 2000 2000 518 425 290 35 488 578 839 851 981 467 366 354 673 218 528 258 120 192 288 471 621 749 766 273 75 356 676 837 352 450 691 661 109 891 423 771 191 446 47 114 465 732 502 205 424 788 573 78 389 538 422 921 647 292 650 702 918 972 701 122 393 961 805 526 409 981 494 471 404 472 800 588 4...
output:
YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES NO YES YES YES YES YES NO YES YES YES YES NO NO YES NO YES YES NO NO YES YES NO YES YES YES NO YES YES YES NO NO YES YES YES YES YES YES YES YES YE...
result:
ok 2000 lines
Test #33:
score: 0
Accepted
time: 10ms
memory: 32412kb
input:
600 2000 2000 443 180 504 440 477 573 469 521 147 519 452 410 267 77 425 43 332 235 128 319 452 510 423 126 99 406 337 596 46 347 20 264 517 30 52 110 189 155 118 533 310 126 582 234 325 42 425 251 540 363 75 293 102 374 59 431 107 28 434 277 274 107 584 221 226 372 327 37 519 78 190 139 596 42 383 ...
output:
YES NO YES NO YES YES YES YES YES YES NO YES YES YES YES YES NO YES YES NO YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES NO NO YES YES YES NO YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO NO YES YES YES YES YES YES YES YES YES YES NO YES YES Y...
result:
ok 2000 lines
Test #34:
score: 0
Accepted
time: 8ms
memory: 32352kb
input:
2000 1998 2000 1055 64 1073 677 1840 1258 269 278 537 1697 1927 103 1411 126 594 953 1498 190 1107 1238 879 692 1223 968 1047 1348 683 608 714 1738 1602 1824 373 1089 1491 513 344 1885 1257 190 1273 1985 929 1623 1552 1833 287 1679 1209 1602 1017 1775 1973 541 426 1889 760 208 689 453 1773 756 496 1...
output:
YES NO NO YES YES YES NO YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO NO YES NO NO NO NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES NO YES YES YES NO YES YES NO YES YES YES YES YES NO YES...
result:
ok 2000 lines
Test #35:
score: 0
Accepted
time: 6ms
memory: 36464kb
input:
2000 2000 2000 501 709 445 921 928 1130 929 1580 1304 384 1281 617 1395 458 277 1844 1629 575 1145 1383 1842 1610 78 143 1301 1626 967 270 653 1858 125 1736 1346 1002 524 182 484 1900 1940 198 1381 1976 120 1864 346 32 1858 194 285 1773 13 542 1694 1096 1866 23 253 1954 1436 1487 178 1084 1404 364 1...
output:
YES NO NO YES YES NO NO NO YES NO NO YES NO YES YES YES NO NO NO NO YES NO YES NO NO YES YES YES NO NO YES NO NO NO NO YES YES NO YES YES NO NO YES YES NO YES NO NO NO NO NO YES YES YES YES YES YES YES YES NO YES YES NO YES NO NO NO YES NO YES YES NO NO NO YES YES NO NO YES NO YES YES YES YES YES YE...
result:
ok 2000 lines
Test #36:
score: 0
Accepted
time: 3ms
memory: 32396kb
input:
1000 1997 2000 306 556 306 275 275 163 297 163 365 297 475 365 475 156 156 188 188 710 414 710 414 917 999 917 202 999 119 202 119 437 437 364 451 364 613 451 623 613 623 44 994 44 994 139 139 470 470 565 968 565 27 968 463 27 241 463 712 241 13 712 13 109 109 888 49 888 979 49 485 979 485 825 825 2...
output:
NO NO NO YES YES YES YES NO YES YES YES YES NO YES YES YES YES NO YES NO NO YES NO YES YES YES YES YES YES YES YES YES YES NO YES NO YES YES NO YES YES YES YES NO YES NO YES YES YES YES YES YES YES NO YES NO YES NO YES NO YES YES YES YES YES NO NO NO YES YES NO YES YES NO NO NO YES NO YES YES YES NO...
result:
ok 2000 lines
Test #37:
score: 0
Accepted
time: 3ms
memory: 36408kb
input:
2000 2000 2000 1114 1853 1841 1853 1853 1255 1114 348 540 348 348 563 1865 1255 540 1998 1865 754 754 490 1865 152 418 152 152 437 393 152 510 393 418 325 1101 393 150 510 1741 1101 325 1167 1101 544 135 544 1836 135 1167 1779 1836 1547 1600 1547 598 1836 1547 209 1074 209 1600 352 804 209 804 1368 ...
output:
NO YES YES YES NO NO NO NO NO YES YES YES NO NO NO YES NO YES NO NO NO NO NO NO NO YES NO NO NO NO NO YES NO NO NO YES NO NO YES YES NO NO YES NO NO NO NO NO NO NO NO NO NO NO YES NO NO NO YES YES NO NO NO NO YES NO NO YES NO NO NO NO NO YES NO NO YES NO NO NO YES YES NO NO NO NO NO NO NO NO NO YES ...
result:
ok 2000 lines
Test #38:
score: 0
Accepted
time: 6ms
memory: 26104kb
input:
2000 2000 2000 1773 1949 1306 1773 1128 1949 1051 1306 1128 112 112 1930 1672 1306 1675 1773 112 1715 112 1469 889 1672 1672 899 1051 918 918 52 1307 1469 889 515 898 1675 899 136 52 1299 918 1456 136 1865 1692 515 1307 9 1299 1171 1692 941 515 257 1948 1299 1888 9 1888 897 279 941 1565 897 1888 793...
output:
NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO ...
result:
ok 2000 lines
Test #39:
score: 0
Accepted
time: 3ms
memory: 36532kb
input:
1800 2000 2000 436 988 767 988 988 925 1172 436 436 1207 767 657 988 1142 739 988 436 1125 35 657 580 436 685 767 739 1296 919 657 925 453 1402 453 453 1381 919 1654 637 580 721 1654 365 1402 1695 721 637 362 1529 365 906 919 1592 657 906 1319 357 685 1351 637 1695 957 1351 1147 685 1550 1296 1065 3...
output:
NO YES YES NO YES NO YES NO NO YES YES NO YES NO NO NO YES NO YES NO YES NO NO NO NO YES NO YES NO YES YES YES NO NO NO YES YES YES NO NO YES NO NO NO YES NO YES NO NO YES NO NO YES NO NO NO YES YES NO NO NO YES NO NO NO NO YES NO YES NO NO NO NO NO YES YES NO YES NO YES NO YES NO NO YES YES NO NO N...
result:
ok 2000 lines
Test #40:
score: 0
Accepted
time: 3ms
memory: 36412kb
input:
1000 1998 2000 817 270 270 805 270 56 218 56 805 499 351 56 56 464 568 218 351 983 52 464 691 568 568 663 413 52 691 566 585 234 530 413 966 413 530 897 924 897 685 897 859 924 859 851 859 276 851 652 333 859 333 347 916 104 573 916 42 347 916 511 635 916 369 930 300 635 625 635 625 570 879 508 221 ...
output:
YES NO YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES NO YES NO YES NO YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES NO YES NO NO YES YES YES YES YES NO YES YES YES YES YES YES YES NO YES YES YES YES NO NO YES NO YES YES NO NO YES YES NO YES YES YES YES YES NO NO NO YES ...
result:
ok 2000 lines
Test #41:
score: 0
Accepted
time: 5ms
memory: 34460kb
input:
1000 1998 2000 329 599 599 401 647 587 198 647 587 642 401 512 156 401 155 642 647 633 642 41 805 432 155 820 805 645 820 496 674 820 674 989 496 148 388 696 989 334 48 96 330 96 334 80 467 80 264 330 761 868 80 933 80 884 26 884 180 933 933 814 238 26 814 765 765 649 238 220 649 701 965 765 450 649...
output:
NO YES YES YES YES YES NO YES YES YES YES NO NO NO YES YES YES NO YES NO YES YES YES YES NO YES YES YES YES YES YES YES NO NO NO NO YES YES YES NO NO YES YES YES YES YES NO NO NO YES NO NO YES YES NO YES YES YES YES YES YES YES NO NO NO NO NO NO YES NO YES NO YES YES YES YES YES YES YES YES YES NO N...
result:
ok 2000 lines
Test #42:
score: 0
Accepted
time: 7ms
memory: 36388kb
input:
1000 1998 2000 419 351 426 351 419 190 352 351 861 351 190 16 912 419 352 503 475 503 51 419 384 352 503 962 503 363 173 51 871 16 283 962 871 275 75 196 196 223 772 98 321 173 871 953 682 283 772 750 772 80 80 451 223 786 953 802 168 223 412 953 80 676 239 802 168 680 217 80 710 421 168 345 61 345 ...
output:
NO NO NO YES NO YES NO YES YES YES NO YES NO NO NO YES YES NO YES NO YES YES YES YES YES NO YES NO YES YES YES YES NO YES YES NO YES YES NO YES YES YES YES YES YES YES YES NO NO NO YES YES YES YES YES NO NO YES NO YES YES NO YES NO YES YES YES YES NO YES YES YES YES YES YES NO YES YES NO NO NO YES Y...
result:
ok 2000 lines
Test #43:
score: 0
Accepted
time: 3ms
memory: 34420kb
input:
600 2000 2000 3 349 91 297 93 343 242 543 176 355 350 467 519 327 76 431 140 298 82 394 496 499 398 393 196 592 328 155 578 344 318 410 243 391 562 405 386 180 492 445 363 52 498 470 167 566 5 447 26 235 599 357 389 341 494 250 372 27 414 530 13 369 180 362 14 75 592 1 378 443 32 590 235 25 336 546 ...
output:
YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES Y...
result:
ok 2000 lines
Test #44:
score: 0
Accepted
time: 4ms
memory: 36480kb
input:
1000 2000 2000 51 986 197 724 841 692 579 588 762 844 120 942 415 345 235 913 122 651 278 271 919 132 587 213 486 132 130 697 673 739 832 145 298 667 838 48 187 30 478 317 42 453 507 906 634 719 847 432 107 204 114 743 399 853 330 430 246 756 807 114 302 125 706 785 684 990 242 492 54 318 734 653 98...
output:
YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES Y...
result:
ok 2000 lines
Test #45:
score: 0
Accepted
time: 7ms
memory: 32392kb
input:
1600 2000 2000 709 949 872 990 1275 404 717 831 1215 829 662 1303 1425 630 160 911 1315 1233 175 72 69 674 1123 561 1445 287 158 1124 839 1525 114 792 1526 881 1082 272 30 1483 37 123 1057 113 1229 1250 314 415 1557 354 351 269 35 329 1206 835 1371 186 324 932 1120 1598 631 476 620 1314 621 157 440 ...
output:
YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YE...
result:
ok 2000 lines
Test #46:
score: 0
Accepted
time: 7ms
memory: 32440kb
input:
2000 2000 2000 898 644 806 1970 97 229 1226 1959 151 1281 1079 473 1900 1236 330 1239 409 1169 1035 637 490 354 538 249 466 59 1812 563 1110 478 404 1076 1335 1133 1474 1367 45 1759 789 268 894 320 1997 1920 546 1502 374 463 1038 1722 1067 1902 145 1114 237 1255 813 1132 372 212 142 659 294 1943 451...
output:
YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO NO YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES N...
result:
ok 2000 lines
Test #47:
score: 0
Accepted
time: 10ms
memory: 36464kb
input:
800 2000 2000 313 79 616 496 150 79 150 264 79 22 150 85 22 85 610 496 692 264 22 610 382 592 692 173 85 292 56 430 173 538 292 173 538 592 334 430 173 741 583 592 538 51 583 430 741 430 741 51 254 292 562 51 254 424 562 117 254 340 653 562 653 195 419 297 424 348 348 340 160 348 297 294 340 235 624...
output:
YES YES YES YES YES YES YES YES NO YES YES YES NO YES YES YES YES YES NO NO YES NO YES YES NO YES NO NO NO YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES NO YES NO NO YES YES YES YES YES NO NO YES YES YES NO NO NO NO YES NO YES YES NO YES NO YES YES NO YES YES YES NO YES YES NO NO NO...
result:
ok 2000 lines
Test #48:
score: 0
Accepted
time: 3ms
memory: 36452kb
input:
1000 2000 2000 787 584 671 787 221 787 356 671 341 671 174 341 499 414 221 401 956 136 871 559 573 136 37 514 43 573 788 302 718 514 718 804 638 514 804 638 355 638 178 638 858 946 323 355 858 323 638 822 946 469 946 263 227 970 557 822 164 469 91 970 407 227 164 394 394 407 263 45 873 91 873 394 87...
output:
YES NO NO YES YES YES YES YES NO YES YES YES NO YES YES NO YES NO NO YES NO NO YES YES YES YES YES YES YES NO YES YES NO NO YES YES NO YES YES NO YES NO NO YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES NO YES NO YES YES YES NO YES YES YES YES YES NO YES NO YES NO YES YES ...
result:
ok 2000 lines
Test #49:
score: 0
Accepted
time: 3ms
memory: 32492kb
input:
1400 2000 2000 476 224 224 192 224 370 453 110 1251 1143 294 977 1164 199 1269 294 626 1164 294 878 1313 1271 208 1271 600 233 878 26 893 878 208 1133 893 1133 893 868 893 417 868 501 893 185 335 845 834 845 550 417 902 834 968 902 902 1129 751 968 637 993 943 400 637 1129 665 550 1129 760 732 400 6...
output:
YES YES YES NO YES NO NO YES YES NO YES NO NO YES YES YES NO NO NO YES NO YES NO YES NO YES YES YES YES YES NO YES NO YES YES NO NO YES YES YES YES NO YES NO NO YES YES YES YES YES YES NO YES NO YES YES NO NO YES YES YES NO YES YES NO YES YES YES NO YES YES NO YES NO YES YES YES NO YES NO NO YES YES...
result:
ok 2000 lines
Test #50:
score: 0
Accepted
time: 5ms
memory: 32440kb
input:
2000 2000 2000 1841 1868 1868 279 1667 1703 942 1151 1667 1178 981 1625 981 144 1133 1444 1566 144 475 864 1560 1621 475 1560 837 864 897 1566 925 481 1727 656 1121 870 828 1727 925 828 178 656 925 904 1623 583 178 904 1632 904 1632 840 840 1315 1315 743 743 776 776 726 2000 726 1356 630 92 726 630 ...
output:
YES NO NO YES YES NO NO NO YES NO YES NO YES NO NO YES NO NO YES NO NO YES YES YES YES YES NO NO YES NO YES NO YES YES YES YES NO YES YES YES YES NO YES YES NO NO YES YES YES YES YES YES YES YES YES YES YES NO NO YES YES NO NO YES YES NO YES YES NO NO NO NO YES YES YES NO NO NO NO YES YES NO NO YES ...
result:
ok 2000 lines
Test #51:
score: 0
Accepted
time: 3ms
memory: 36424kb
input:
700 2000 2000 423 66 466 83 60 427 315 558 204 387 36 233 397 460 507 513 392 84 549 490 296 268 685 305 255 285 35 322 388 226 532 125 41 564 387 207 300 666 284 248 150 30 497 560 679 292 418 383 252 136 407 665 607 137 226 529 80 697 383 652 297 353 19 219 323 181 186 34 14 484 646 448 368 102 42...
output:
YES YES YES YES YES NO YES NO NO YES YES NO NO YES YES NO NO NO YES NO YES NO YES YES YES YES NO YES YES YES YES NO YES NO YES NO YES NO NO YES YES YES YES YES NO YES NO YES NO YES YES YES YES NO NO YES YES YES YES YES NO NO NO YES YES NO NO NO YES YES YES NO YES YES YES NO YES YES YES NO YES NO YES...
result:
ok 2000 lines
Test #52:
score: 0
Accepted
time: 8ms
memory: 34480kb
input:
1000 2000 2000 51 986 197 724 841 692 579 588 762 844 120 942 415 345 235 913 122 651 278 271 919 132 587 213 486 132 130 697 673 739 832 145 298 667 838 48 187 30 478 317 42 453 507 906 634 719 847 432 107 204 114 743 399 853 330 430 246 756 807 114 302 125 706 785 684 990 242 492 54 318 734 653 98...
output:
YES NO NO YES YES YES YES NO NO NO YES NO YES NO YES YES YES YES YES YES NO YES NO YES NO NO YES NO YES YES NO YES YES YES YES NO NO YES YES NO NO NO NO YES YES YES YES YES NO NO NO NO YES YES YES YES YES NO YES YES YES NO NO NO NO YES YES NO NO YES NO YES YES YES NO YES YES YES YES NO YES YES NO YE...
result:
ok 2000 lines
Test #53:
score: 0
Accepted
time: 12ms
memory: 32492kb
input:
1400 2000 2000 1025 1164 10 456 713 1309 923 976 175 352 301 469 1128 1211 1024 1100 1252 982 585 255 793 484 1192 238 349 43 483 134 505 1261 415 263 1345 1288 963 122 356 1352 582 1036 33 587 427 225 1343 135 2 1315 250 1082 1300 872 1235 1367 719 715 1319 1067 885 271 1386 1049 946 592 1292 549 2...
output:
NO NO YES YES YES YES YES YES YES YES YES NO NO YES NO YES YES YES NO NO YES YES NO NO NO YES YES NO NO YES YES NO NO YES YES NO NO YES YES NO YES NO YES YES YES YES YES NO YES YES NO YES NO NO YES YES YES YES NO NO NO YES YES YES NO YES NO YES YES YES NO NO YES NO NO YES NO YES YES YES YES YES YES ...
result:
ok 2000 lines
Test #54:
score: 0
Accepted
time: 8ms
memory: 36516kb
input:
2000 2000 2000 898 644 806 1970 97 229 1226 1959 151 1281 1079 473 1900 1236 330 1239 409 1169 1035 637 490 354 538 249 466 59 1812 563 1110 478 404 1076 1335 1133 1474 1367 45 1759 789 268 894 320 1997 1920 546 1502 374 463 1038 1722 1067 1902 145 1114 237 1255 813 1132 372 212 142 659 294 1943 451...
output:
YES YES NO YES YES YES YES YES NO NO NO YES YES YES NO NO NO NO NO NO YES YES NO NO YES NO YES YES YES YES NO YES YES NO NO NO NO YES YES YES YES NO YES YES YES NO YES YES NO YES YES YES NO YES YES YES NO YES YES YES YES NO NO NO YES YES YES YES YES YES YES YES NO NO NO NO NO NO YES YES YES YES YES ...
result:
ok 2000 lines
Subtask #3:
score: 25
Accepted
Test #55:
score: 25
Accepted
time: 1281ms
memory: 84664kb
input:
100000 199997 200000 79109 44896 79109 66117 66117 91800 91800 24387 24387 74514 48558 74514 48558 37561 37561 76920 79598 76920 79598 69196 69196 79004 49065 79004 70038 49065 15497 70038 15497 67507 25073 67507 25073 41762 41762 71848 71848 32073 32073 43754 72852 43754 41209 72852 68112 41209 629...
output:
NO NO YES NO NO NO NO NO NO NO NO NO NO YES NO YES NO NO NO NO NO YES NO NO NO YES NO NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO YES NO NO NO NO NO NO NO YES NO NO NO NO NO NO NO NO NO NO NO YES NO NO YES NO NO YES NO NO NO YES NO NO NO NO NO NO NO NO YES NO NO NO NO NO NO NO YES NO NO NO NO YES ...
result:
ok 200000 lines
Test #56:
score: 0
Accepted
time: 14ms
memory: 33156kb
input:
200000 200000 200000 156700 169748 169748 15408 158166 15408 117779 158166 2384 169748 4408 156700 117779 33510 90442 4408 4408 162134 117779 171528 90442 38746 33510 152759 171528 184558 162134 8761 154354 171528 23832 171528 23832 68341 98972 152759 80275 98972 98972 67486 67486 31710 31710 127052...
output:
NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO ...
result:
ok 200000 lines
Test #57:
score: 0
Accepted
time: 618ms
memory: 50016kb
input:
180000 200000 200000 95819 27342 123468 27342 95819 45980 95819 36699 71942 45980 36699 30023 30023 98714 30023 101707 71942 134121 148555 45980 45980 66377 74540 101707 66170 101707 67584 123468 66360 27342 95819 53123 101707 65852 148860 123468 148555 119737 143349 30023 148555 86262 66377 102544 ...
output:
NO NO NO NO YES YES NO NO NO NO NO YES NO YES YES NO NO NO YES NO YES NO NO NO NO NO NO NO NO NO YES NO YES NO NO NO NO NO YES NO NO NO NO NO NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO YES NO NO YES NO YES NO NO YES NO YES NO NO YES YES YES YES NO NO NO NO NO YES...
result:
ok 200000 lines
Test #58:
score: 0
Accepted
time: 831ms
memory: 52872kb
input:
100000 199998 200000 87308 6340 6340 65354 52754 87308 88178 52754 6340 5495 22090 52754 98806 22090 5495 73821 9604 52754 37077 52754 68317 37077 21343 68317 12967 98806 69585 68317 69585 28583 21343 69734 69585 20913 57662 69734 94110 91458 14376 69734 41402 57662 94921 14376 96594 58350 14376 578...
output:
NO NO YES NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO YES YES NO NO NO NO YES YES NO NO NO YES NO NO NO NO NO NO NO NO YES NO NO NO NO NO NO YES NO NO NO NO NO NO NO NO NO YES NO NO NO NO NO NO NO NO YES NO YES YES NO YES NO NO YES YE...
result:
ok 200000 lines
Test #59:
score: 0
Accepted
time: 879ms
memory: 54380kb
input:
100000 199998 200000 28343 15804 28343 94432 28343 23326 59830 23326 10127 59830 28343 43794 10127 23571 23571 3145 43794 81307 3717 43794 66710 59830 21890 28343 28353 28343 3145 70155 28343 35892 70678 15804 10127 83329 3717 35392 73105 23571 3145 19619 87075 27586 90214 83329 32670 21890 22856 87...
output:
YES NO NO NO NO YES NO NO NO NO YES YES NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO NO NO YES NO NO NO NO NO NO YES NO NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO N...
result:
ok 200000 lines
Test #60:
score: 0
Accepted
time: 972ms
memory: 51940kb
input:
60000 200000 200000 47535 59290 4275 37708 43568 37576 957 18676 27619 37179 19026 4602 52742 32392 14534 22002 26055 47146 45919 41903 37887 56149 36060 42697 8741 313 28057 15816 56765 34869 26554 14156 12833 13682 44772 28577 18097 31289 36656 3501 40514 15833 26141 35850 19093 50872 40660 37526 ...
output:
YES NO YES YES YES YES YES YES YES YES NO YES YES NO YES NO YES NO YES YES YES YES YES YES NO NO NO YES YES NO YES YES YES NO YES YES YES YES YES YES YES YES NO YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES NO YE...
result:
ok 200000 lines
Test #61:
score: 0
Accepted
time: 1446ms
memory: 60824kb
input:
100000 200000 200000 77786 6752 26401 60048 31910 17910 65779 52734 11872 54867 11498 82141 93189 80000 87783 60280 22166 77429 51584 95507 2261 30821 12929 59760 42423 48187 10729 26779 24258 74392 67495 60621 42163 26061 12641 11404 71465 82245 52055 3427 13752 34140 20925 31926 14287 97161 58584 ...
output:
YES YES YES NO YES YES NO YES YES YES YES YES NO YES YES YES YES YES YES YES NO YES NO YES YES YES YES YES YES NO YES YES YES YES YES YES NO YES YES YES YES YES YES YES NO NO YES NO YES NO YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES NO YES NO YES NO YES YES NO YES YES ...
result:
ok 200000 lines
Test #62:
score: 0
Accepted
time: 1943ms
memory: 63640kb
input:
200000 200000 200000 197731 68719 145501 57647 34483 149695 62098 31160 160935 43346 70944 126156 194438 93717 133681 33810 143842 4779 84849 63629 179978 147132 75441 104532 11976 28821 20385 110393 133541 21240 149042 64811 135285 3108 138414 165849 100523 121508 79580 92189 49291 44875 138988 711...
output:
NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES NO YES YES YES NO NO YES YES NO NO YES YES YES YES NO YES NO YES YES YES YES YES NO YES YES NO YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES NO YES YE...
result:
ok 200000 lines
Test #63:
score: 0
Accepted
time: 1268ms
memory: 61852kb
input:
100000 200000 200000 91199 7467 35612 91199 7467 3610 7467 7468 3610 44904 44904 7468 91027 47259 44904 2753 48718 11316 11316 92818 23795 93555 93555 11316 5417 14329 93555 50009 90447 50009 93555 78407 14329 90447 73524 90447 21658 90447 56875 61966 21658 61966 19145 78407 56875 19145 79811 9701 6...
output:
NO NO NO NO NO NO NO NO NO NO YES NO YES NO NO NO NO NO NO NO YES YES NO NO NO NO NO NO NO NO NO NO NO YES YES NO YES NO YES NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO N...
result:
ok 200000 lines
Test #64:
score: 0
Accepted
time: 1417ms
memory: 61696kb
input:
180000 200000 200000 48044 116141 149941 97532 108024 153885 48044 164680 167561 108024 164680 125849 81699 125849 125849 19101 117501 127237 70827 19101 14065 127237 127237 81126 93655 70827 41364 134339 125630 41364 125415 123173 142478 125630 2139 125415 50880 10270 142478 50880 136482 5039 14247...
output:
NO NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO YES NO NO NO NO NO NO NO NO YES NO NO NO NO NO NO YES YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO YES NO YES NO NO NO NO NO YES NO NO YES YES YES NO NO NO NO NO NO NO NO NO NO YES NO NO N...
result:
ok 200000 lines
Test #65:
score: 0
Accepted
time: 879ms
memory: 46996kb
input:
20000 200000 200000 17080 3271 6065 5381 7484 15940 18311 3140 11602 9470 2894 1072 8425 4218 16737 8744 8615 12148 18845 15437 8863 4501 433 14607 835 12426 7833 1411 7614 13860 7554 16289 13415 12180 13972 15293 1191 15245 931 17175 19824 6768 10000 18782 12041 15601 7510 9734 17454 5230 16237 484...
output:
NO NO NO YES YES NO NO NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO YES NO NO YES NO YES NO NO NO NO NO NO YES NO NO NO NO NO NO NO NO NO YES NO NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO YES NO NO YES NO YE...
result:
ok 200000 lines
Test #66:
score: 0
Accepted
time: 1012ms
memory: 52492kb
input:
60000 200000 200000 47535 59290 4275 37708 43568 37576 957 18676 27619 37179 19026 4602 52742 32392 14534 22002 26055 47146 45919 41903 37887 56149 36060 42697 8741 313 28057 15816 56765 34869 26554 14156 12833 13682 44772 28577 18097 31289 36656 3501 40514 15833 26141 35850 19093 50872 40660 37526 ...
output:
NO NO NO NO NO NO YES NO NO NO NO NO NO NO YES NO NO NO NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO NO NO YES YES NO YES NO NO NO NO NO NO NO NO NO YES NO YES NO YES NO NO NO NO NO YES NO NO NO NO NO YES YES NO NO NO N...
result:
ok 200000 lines
Test #67:
score: 0
Accepted
time: 1636ms
memory: 60284kb
input:
140000 200000 200000 76834 9131 135811 73947 77276 137710 49994 104785 76787 107620 17804 71946 123058 134210 18830 127913 46949 93779 38771 75648 69206 134597 16321 66343 65538 134280 37783 74563 82646 564 44569 137484 105009 10351 71026 49636 6687 22732 122561 92211 117741 6102 18948 37956 24674 1...
output:
NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO YES YES NO NO NO NO NO NO YES NO NO NO NO NO YES NO NO YES NO NO NO NO NO YES YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO...
result:
ok 200000 lines
Test #68:
score: 0
Accepted
time: 1952ms
memory: 61376kb
input:
200000 200000 200000 197731 68719 145501 57647 34483 149695 62098 31160 160935 43346 70944 126156 194438 93717 133681 33810 143842 4779 84849 63629 179978 147132 75441 104532 11976 28821 20385 110393 133541 21240 149042 64811 135285 3108 138414 165849 100523 121508 79580 92189 49291 44875 138988 711...
output:
NO NO NO NO NO YES NO NO YES NO NO YES NO NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO YES NO YES NO NO NO YES NO NO NO NO NO NO NO NO NO YES NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO NO YES NO NO NO NO NO NO NO YES NO NO NO NO ...
result:
ok 200000 lines
Subtask #4:
score: 0
Time Limit Exceeded
Dependency #3:
100%
Accepted
Test #69:
score: 10
Accepted
time: 1271ms
memory: 84320kb
input:
100000 199997 200000 1304 38053 86107 1304 68527 86107 68527 1612 66259 1612 66259 45383 45383 86918 86918 92171 8178 92171 8178 84276 84276 63841 68544 63841 68544 18174 3108 18174 15718 3108 79171 15718 79171 63115 2935 63115 19505 2935 69846 19505 79230 69846 79230 85213 43038 85213 43038 73657 7...
output:
YES YES YES YES NO YES NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO YES NO YES NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO YES NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO NO N...
result:
ok 200000 lines
Test #70:
score: 0
Accepted
time: 11ms
memory: 31504kb
input:
200000 200000 200000 148591 58374 61708 58374 107489 148591 58374 23155 61708 53341 58374 83486 160140 148591 160140 177551 53341 144556 62008 83486 53341 95782 37102 62008 91580 95782 104228 95782 156582 95782 156582 10158 141290 156582 10158 125134 107936 10158 182575 10158 156582 96176 96176 1067...
output:
NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO ...
result:
ok 200000 lines
Test #71:
score: 0
Accepted
time: 663ms
memory: 52120kb
input:
200000 200000 200000 24977 29213 29213 75265 24977 127189 29213 3381 29213 191713 135417 3381 24977 6420 90469 127189 70116 75265 66348 191713 166611 127189 134882 66348 6420 159809 173241 75265 182044 159809 120511 134882 127232 75265 127232 126290 167177 191713 135417 152748 107248 167177 44847 10...
output:
NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO ...
result:
ok 200000 lines
Test #72:
score: 0
Accepted
time: 739ms
memory: 50796kb
input:
100000 199998 200000 57254 12810 63850 12810 63850 89790 65809 57254 89790 36056 59922 65809 45313 59922 92569 36056 66178 65809 59922 27109 45313 85190 45313 41884 284 59922 84460 92569 74526 84460 99478 27109 84460 99497 65218 99478 43136 99497 97303 43136 43136 38905 84735 65218 56793 43136 43136...
output:
NO NO YES YES YES NO NO YES YES YES NO YES NO NO YES NO NO YES NO NO YES NO NO NO NO YES NO NO YES NO NO YES NO YES YES NO NO NO NO YES NO NO NO YES NO NO NO NO NO YES NO NO NO YES NO NO YES NO NO NO NO NO NO NO NO YES NO NO NO YES NO NO NO NO NO YES YES NO NO NO YES NO NO NO YES NO NO NO NO NO NO N...
result:
ok 200000 lines
Test #73:
score: 0
Accepted
time: 862ms
memory: 56004kb
input:
100000 199998 200000 26113 11559 11559 63846 54714 63846 54714 56676 99054 19395 56676 68911 56676 25310 54714 89476 56676 30650 67183 20130 74869 25310 74869 83689 56676 74832 84806 74832 56676 38570 87782 89476 9628 54714 6693 26113 13008 24110 67183 40865 84806 70738 70738 80115 85660 87782 19395...
output:
NO NO YES YES NO NO NO NO NO YES NO NO NO NO NO NO NO NO NO NO YES NO YES YES NO NO NO NO YES NO NO YES YES NO YES NO NO YES YES NO NO YES NO YES NO NO NO NO NO NO NO YES YES YES YES NO NO NO YES NO NO NO NO NO YES NO NO YES NO NO NO NO NO NO NO NO NO NO YES NO YES NO NO NO NO NO YES NO NO NO NO NO ...
result:
ok 200000 lines
Test #74:
score: 0
Accepted
time: 1493ms
memory: 58244kb
input:
100000 200000 200000 33031 34423 72848 8710 88459 18732 47047 18041 40574 23828 45665 6558 92355 26082 20647 62938 27251 49247 64067 91149 14068 88869 82458 43266 19476 66003 14280 22051 83537 78060 14005 18925 55681 12161 15164 84361 61684 55025 58031 22988 16948 668 64041 6312 69664 992 13273 7776...
output:
YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES ...
result:
ok 200000 lines
Test #75:
score: -10
Time Limit Exceeded
input:
200000 200000 200000 73795 17417 118651 109547 126011 10896 168828 105443 48694 158639 37824 28107 72734 131370 29328 100076 139735 124753 92157 102428 145140 14454 129788 49111 32941 1685 172088 129126 137595 145164 109232 78187 154246 44222 122202 48013 47132 158671 112281 175258 172405 70339 1140...
output:
YES YES NO YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES NO YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO NO YES NO YES YES YES YES YES YES NO YES YES YE...
result:
Subtask #5:
score: 22
Accepted
Dependency #2:
100%
Accepted
Test #83:
score: 22
Accepted
time: 749ms
memory: 54788kb
input:
100000 199997 2000 21350 43930 21350 51098 51098 26100 94005 26100 65480 94005 81541 65480 41366 81541 15253 41366 15253 31779 31779 94738 94738 26949 34818 26949 34818 10537 10537 81018 67848 81018 67848 28739 4868 28739 4868 59908 58719 59908 58719 80959 80959 81502 81502 87580 87580 50966 69130 5...
output:
YES YES YES NO YES NO NO YES NO YES YES YES YES YES YES YES NO NO NO YES NO NO YES YES YES YES YES YES NO YES YES YES NO YES YES NO YES NO NO NO YES YES YES YES YES NO NO NO YES NO NO YES YES NO NO NO YES NO YES YES NO YES NO YES NO YES YES YES NO YES YES YES YES YES NO YES NO YES YES YES NO YES YES...
result:
ok 2000 lines
Test #84:
score: 0
Accepted
time: 12ms
memory: 32408kb
input:
200000 200000 2000 55606 76199 55815 55606 55815 36066 76199 174168 52937 55815 143878 36066 97370 143878 143878 156015 156015 181993 113771 181993 159920 156015 113771 181960 36583 113771 159920 14114 175855 14114 36583 51036 38071 51036 38071 24995 38071 139592 38071 153194 4131 139592 4131 15742 ...
output:
NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO ...
result:
ok 2000 lines
Test #85:
score: 0
Accepted
time: 306ms
memory: 44000kb
input:
180000 200000 2000 30628 123063 33359 123063 54359 33359 77025 30628 54359 39102 659 77025 64163 659 58460 123063 64163 69765 99054 123063 30628 32651 64163 39252 32651 114299 169594 114299 135812 64163 169594 163186 100941 99054 163186 161363 99054 159078 176620 39252 125756 39252 90786 176620 3320...
output:
YES NO NO NO NO YES NO NO NO NO NO YES NO NO NO NO YES NO YES NO NO NO NO NO YES NO YES NO YES YES YES NO YES NO NO YES NO NO YES NO NO NO NO YES NO YES YES YES NO NO NO NO NO NO NO YES YES YES YES YES YES NO YES NO YES NO YES YES NO NO NO NO NO NO YES NO NO YES NO NO YES NO YES YES NO YES YES NO NO...
result:
ok 2000 lines
Test #86:
score: 0
Accepted
time: 467ms
memory: 43200kb
input:
100000 199998 2000 15682 7176 97125 15682 88372 15682 50486 88372 40362 88372 40362 63737 92934 63737 31985 63737 2013 40362 63737 81377 97125 26711 92934 61139 95109 61139 61139 80668 70340 95109 51177 31985 2013 40955 11540 95109 37270 23366 8074 11540 61139 67895 59090 25635 59090 15314 25635 160...
output:
YES YES YES YES NO NO YES NO NO NO YES NO NO YES YES NO YES YES NO YES NO YES NO YES YES NO NO YES NO YES YES YES YES YES NO NO YES YES NO NO YES YES YES YES NO YES NO YES YES YES NO YES NO YES NO NO NO YES NO NO YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES NO NO NO YES YES NO YES ...
result:
ok 2000 lines
Test #87:
score: 0
Accepted
time: 904ms
memory: 48768kb
input:
100000 200000 2000 2053 52512 72237 51890 36516 44970 5069 56817 46192 85613 53386 7989 91201 18480 54736 91478 10405 38803 49549 92476 79908 9212 73919 953 4774 83688 39566 36289 34514 24507 67539 14129 36728 97624 59175 4098 54632 62722 91692 33109 52912 59222 90616 22637 9172 4020 56270 70708 755...
output:
YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YE...
result:
ok 2000 lines
Test #88:
score: 0
Accepted
time: 1274ms
memory: 54024kb
input:
160000 200000 2000 21325 120479 111827 43950 90917 129723 58746 139778 128074 82808 141933 93784 116109 27666 23965 4760 41720 67784 42626 20694 78198 88099 84960 17331 62693 123515 70384 89984 40254 128723 155093 34818 133644 135909 156409 87855 102498 145971 103323 155914 99570 130834 107633 88473...
output:
YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES ...
result:
ok 2000 lines
Test #89:
score: 0
Accepted
time: 722ms
memory: 47800kb
input:
100000 200000 2000 18402 13988 47976 18402 62940 75386 55632 34981 51831 66886 62940 82002 58650 51831 82002 1684 62940 66886 96149 58650 5370 58650 37466 8531 5370 74126 96149 37466 8531 32544 67820 74126 46915 37466 87249 21291 38490 67820 52485 46915 38835 46915 6970 48550 38835 6970 42120 48503 ...
output:
NO YES NO YES YES YES YES YES NO YES YES NO YES YES NO NO NO YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES NO NO YES YES YES NO YES YES NO YES YES NO YES YES YES YES NO NO NO YES YES NO NO NO YES NO NO NO NO NO YES YES NO YES YES NO YES YES NO NO YES YES YES YES NO YES NO YES NO NO YES ...
result:
ok 2000 lines
Test #90:
score: 0
Accepted
time: 923ms
memory: 51960kb
input:
180000 200000 2000 152829 48590 16999 12709 14957 104250 44652 4736 14957 48590 16999 116989 44652 166462 18930 164909 26904 82911 65278 32220 45436 69658 127348 60121 113323 131919 32220 119520 143010 69658 127816 126218 103731 61969 93099 18871 176827 3556 18871 20659 127816 178931 18871 88408 604...
output:
YES YES NO YES YES YES NO YES YES NO YES YES YES YES NO NO YES YES NO YES NO YES YES YES NO YES NO YES YES YES YES YES NO YES NO NO NO YES YES YES YES YES YES YES NO NO YES YES YES NO YES NO YES YES NO YES YES NO YES YES YES YES YES YES YES YES NO YES NO NO YES NO YES YES YES YES NO YES YES NO NO YE...
result:
ok 2000 lines
Test #91:
score: 0
Accepted
time: 585ms
memory: 43224kb
input:
40000 200000 2000 38468 36912 4542 19750 6811 29314 27076 39678 1050 12266 18776 32886 21013 23222 20830 36207 9720 11069 15913 33211 23257 9429 9509 14569 35164 3669 25094 31423 39150 19160 7530 26630 27542 7320 30203 20989 18785 27275 18813 1225 19579 29260 17937 8760 37264 17623 10657 28422 14724...
output:
NO YES YES YES NO NO NO NO YES NO NO YES NO NO YES NO YES NO YES YES YES NO YES YES YES YES YES YES YES NO YES YES YES NO NO YES YES NO NO YES NO YES YES NO YES YES NO NO YES NO NO YES YES NO NO YES YES YES NO YES YES YES YES NO YES NO YES YES YES YES YES NO YES YES YES YES YES YES NO NO YES YES YES...
result:
ok 2000 lines
Test #92:
score: 0
Accepted
time: 931ms
memory: 49980kb
input:
120000 200000 2000 76623 32935 22176 104247 73526 57366 79316 28465 72593 10506 25463 9000 1598 66520 6592 73480 103161 47288 69205 33058 13677 81331 7496 81614 49718 49332 91179 76722 81953 68963 31130 71223 101492 52321 99827 11596 19870 56631 57492 93716 4693 79969 88436 50124 36320 31588 99854 1...
output:
NO YES NO YES YES YES YES YES YES YES NO YES YES YES NO YES NO YES NO YES YES YES NO NO NO NO YES YES YES YES NO YES YES YES YES YES NO YES NO YES NO YES NO YES NO YES NO YES YES YES YES NO NO NO YES YES YES YES YES NO YES NO NO YES NO NO YES YES YES NO YES YES NO NO YES YES NO NO YES YES YES NO YES...
result:
ok 2000 lines
Test #93:
score: 0
Accepted
time: 1132ms
memory: 49344kb
input:
180000 200000 2000 163160 179523 150467 20024 142555 159160 144809 137058 151335 46768 90277 58790 4577 34677 109201 47630 47497 7261 89528 80409 16144 85804 91439 159246 68425 75772 64161 2026 116775 42259 9319 165774 36628 9911 10669 63926 138784 141141 78751 78877 142353 112146 90405 64173 25157 ...
output:
NO NO YES YES YES YES NO NO YES NO NO NO YES YES NO YES YES YES YES NO YES YES NO YES YES NO YES YES YES NO YES YES YES YES YES YES YES YES NO NO YES YES YES YES NO YES NO NO NO YES NO YES YES NO YES YES YES YES NO YES NO YES YES NO NO YES YES NO NO YES NO YES NO NO NO NO YES YES YES NO NO NO NO NO ...
result:
ok 2000 lines
Subtask #6:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
0%