QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#291845 | #5704. Joker | honglan0301 | 14 | 1514ms | 123120kb | C++17 | 8.7kb | 2023-12-27 09:39:21 | 2023-12-27 09:39:22 |
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[800005],v[800005],nl[800005],nr[800005],tl[800005],nmd[800005],nans,ans[800005];
int nmn[800005],nmx[800005];
vector <int> cz[2000005];
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[800005],sz[800005],top;
int getfa(int x) {while(fa[x]!=x) x=fa[x]; return x;}
pair <int,int> stk[16000005];
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;
}
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]);
for(int i=1;i<=n;i++) na|=(getfa(i)==getfa(i+n));
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];
for(int i=1;i<=m;i++) nl[i]=1,nr[i]=m+m,tl[i]=i; tl[m+1]=m+m;
if(!ck()) {for(int i=1;i<=q;i++) cout<<"NO"<<endl; return 0;}
//int cntt=0;
while(1)
{
//cout<<(++cntt)<<endl;
bool flag=1;
for(int i=1;i<=m;i++) nmd[i]=(nl[i]+nr[i])>>1,flag&=(nl[i]>nr[i]); if(flag) break;
memset(nmn,127,sizeof(nmn)); memset(nmx,0,sizeof(nmx));
for(int i=1;i<=m;i++) for(int j=nmd[i-1]+1;j<=nmd[i];j++) nmn[j]=i;
for(int i=1;i<=m;i++) for(int j=i;j<=tl[i+1]&&j<=nmd[i];j++) nmx[j]=i;
for(int i=1;i<=530000;i++) cz[i].clear();
for(int i=1;i<=2*m;i++) if(nmx[i]>=nmn[i]) add(1,m,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,m,1);
for(int i=1;i<=m;i++) if(ans[i]) nr[i]=nmd[i]-1; else nl[i]=nmd[i]+1;
}
while(q--)
{
int x,y; cin>>x>>y;
if(y==m) {cout<<((nl[1]<x)?"YES":"NO")<<endl;}
else {cout<<((nl[y+1]<x+m)?"YES":"NO")<<endl;}
}
}
詳細信息
Subtask #1:
score: 6
Accepted
Test #1:
score: 6
Accepted
time: 8ms
memory: 75304kb
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: 10ms
memory: 51952kb
input:
2 1 1 1 2 1 1
output:
NO
result:
ok single line: 'NO'
Test #3:
score: 0
Accepted
time: 11ms
memory: 62464kb
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: 15ms
memory: 56836kb
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: 12ms
memory: 51900kb
input:
4 2 1 2 3 1 4 1 2
output:
NO
result:
ok single line: 'NO'
Test #6:
score: 0
Accepted
time: 12ms
memory: 58076kb
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: 7ms
memory: 67112kb
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: 21ms
memory: 74272kb
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: 15ms
memory: 75240kb
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: 23ms
memory: 75336kb
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: 15ms
memory: 75260kb
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: 10ms
memory: 73920kb
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: 19ms
memory: 75396kb
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: 7ms
memory: 67040kb
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: 25ms
memory: 75324kb
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: 18ms
memory: 75260kb
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: 15ms
memory: 75264kb
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: 18ms
memory: 73328kb
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: 14ms
memory: 75320kb
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: 19ms
memory: 75316kb
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: 15ms
memory: 75384kb
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: 17ms
memory: 75332kb
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: 11ms
memory: 73644kb
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: 16ms
memory: 73980kb
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: 19ms
memory: 75280kb
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: 12ms
memory: 73212kb
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: 13ms
memory: 73728kb
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: 19ms
memory: 73396kb
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: 3ms
memory: 67116kb
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: 24ms
memory: 73880kb
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: 24ms
memory: 75636kb
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: 20ms
memory: 75544kb
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: 19ms
memory: 75500kb
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: 29ms
memory: 75544kb
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: 26ms
memory: 75540kb
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: 16ms
memory: 71700kb
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: 19ms
memory: 75512kb
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: 3ms
memory: 67084kb
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: 16ms
memory: 72980kb
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: 26ms
memory: 75168kb
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: 27ms
memory: 70732kb
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: 21ms
memory: 76292kb
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: 12ms
memory: 75364kb
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: 24ms
memory: 75464kb
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: 16ms
memory: 75424kb
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: 22ms
memory: 73840kb
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: 24ms
memory: 75432kb
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: 16ms
memory: 73620kb
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: 18ms
memory: 75600kb
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: 25ms
memory: 75540kb
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: 23ms
memory: 75380kb
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: 24ms
memory: 75404kb
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: 27ms
memory: 75564kb
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: 24ms
memory: 75476kb
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: 0
Time Limit Exceeded
Test #55:
score: 25
Accepted
time: 1429ms
memory: 122936kb
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: 24ms
memory: 79780kb
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: 1250ms
memory: 105964kb
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: 1011ms
memory: 103872kb
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: 1031ms
memory: 105364kb
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: 1097ms
memory: 97672kb
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: 1433ms
memory: 112200kb
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: -25
Time Limit Exceeded
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:
result:
Subtask #4:
score: 0
Skipped
Dependency #3:
0%
Subtask #5:
score: 0
Time Limit Exceeded
Dependency #2:
100%
Accepted
Test #83:
score: 22
Accepted
time: 1415ms
memory: 123120kb
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: 19ms
memory: 79988kb
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: 1102ms
memory: 103584kb
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: 1043ms
memory: 100932kb
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: 1514ms
memory: 111464kb
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: -22
Time Limit Exceeded
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:
result:
Subtask #6:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
0%