QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#828532 | #9185. Garden Decorations | Prosperity | 100 ✓ | 6ms | 9808kb | C++23 | 1.7kb | 2024-12-23 17:52:53 | 2024-12-23 17:52:54 |
Judging History
answer
#include<bits/stdc++.h>
#define ll long long
using namespace std;
inline ll read(){
ll s=0,k=1;
char c=getchar();
while(c>'9'||c<'0'){
if(c=='-') k=-1;
c=getchar();
}
while(c>='0'&&c<='9'){
s=(s<<3)+(s<<1)+(c^48);
c=getchar();
}
return s*k;
}
const int N=505;
ll w,n,a[N],mat[3][N][N],b[N];
int main(){
// freopen(".in","r",stdin);
// freopen(".out","w",stdout);
cin>>w>>n;
for(int i=1;i<=n;i++) cin>>a[i];
if(!w){
cout<<3<<endl;
return 0;
}
for(int i=1;i<=n;i++){
mat[0][i][i]=1;
mat[1][i][a[i]+1]=1;
mat[2][i][i]=1;
}
vector<pair<ll,ll> >vec0,vec2;
for(int i=1;i<=n;i++){
if(mat[1][i][i]==0){
for(int j=i+1;j<=n;j++)
if(mat[1][i][j]==1){
for(int k=1;k<=n;k++)
mat[1][k][i]^=mat[1][k][j];
vec0.push_back({i,j});
break;
}
}
for(int j=i+1;j<=n;j++)
if(mat[1][j][i]==1){
for(int k=i;k<=n;k++)
mat[1][j][k]^=mat[1][i][k];
vec2.push_back({i,j});
}
}
reverse(vec0.begin(),vec0.end());
reverse(vec2.begin(),vec2.end());
int x,y;
for(auto z:vec0){
tie(x,y)=z;
for(int k=y;k<=n;k++)
mat[0][k][x]^=mat[0][k][y];
}
for(auto z:vec2){
tie(x,y)=z;
for(int k=1;k<=x;k++)
mat[2][y][k]^=mat[2][x][k];
}
// for(int i=0;i<3;i++,puts(""))
// for(int j=1;j<=n;j++,puts(""))
// for(int k=1;k<=n;k++) printf("%d ",mat[i][j][k]);
w--;
if(w&1){
for(int i=n;i>=1;i--){
cin>>b[i];
int x=0;
for(int j=i;j<=n;j++)
x^=b[j]&mat[w][i][j];
cout<<x<<endl;
}
}
else{
for(int i=1;i<=n;i++){
cin>>b[i];
int x=0;
for(int j=1;j<=i;j++)
x^=b[j]&mat[w][i][j];
cout<<x<<endl;
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 10
Accepted
Test #1:
score: 10
Accepted
time: 1ms
memory: 7736kb
input:
0
output:
3
input:
1 2 1 0 0 1
output:
0 1
input:
2 2 1 0 1 0
output:
1 1
input:
3 2 1 0 1 1
output:
1 0
result:
points 1.0 W = 3
Test #2:
score: 10
Accepted
time: 1ms
memory: 7892kb
input:
0
output:
3
input:
1 2 0 1 1 0
output:
1 0
input:
2 2 0 1 0 1
output:
0 1
input:
3 2 0 1 1 0
output:
1 0
result:
points 1.0 W = 3
Test #3:
score: 10
Accepted
time: 1ms
memory: 7704kb
input:
0
output:
3
input:
1 2 1 0 1 0
output:
1 1
input:
2 2 1 0 1 1
output:
1 0
input:
3 2 1 0 0 1
output:
0 1
result:
points 1.0 W = 3
Test #4:
score: 10
Accepted
time: 1ms
memory: 7736kb
input:
0
output:
3
input:
1 2 1 0 0 0
output:
0 0
input:
2 2 1 0 0 0
output:
0 0
input:
3 2 1 0 0 0
output:
0 0
result:
points 1.0 W = 3
Test #5:
score: 10
Accepted
time: 1ms
memory: 7932kb
input:
0
output:
3
input:
1 2 1 0 1 1
output:
1 0
input:
2 2 1 0 0 1
output:
0 1
input:
3 2 1 0 1 0
output:
1 1
result:
points 1.0 W = 3
Test #6:
score: 10
Accepted
time: 1ms
memory: 7736kb
input:
0
output:
3
input:
1 2 0 1 0 1
output:
0 1
input:
2 2 0 1 1 0
output:
1 0
input:
3 2 0 1 0 1
output:
0 1
result:
points 1.0 W = 3
Test #7:
score: 10
Accepted
time: 1ms
memory: 7932kb
input:
0
output:
3
input:
1 2 1 0 1 1
output:
1 0
input:
2 2 1 0 0 1
output:
0 1
input:
3 2 1 0 1 0
output:
1 1
result:
points 1.0 W = 3
Test #8:
score: 10
Accepted
time: 1ms
memory: 7896kb
input:
0
output:
3
input:
1 2 1 0 1 1
output:
1 0
input:
2 2 1 0 0 1
output:
0 1
input:
3 2 1 0 1 0
output:
1 1
result:
points 1.0 W = 3
Test #9:
score: 10
Accepted
time: 1ms
memory: 7700kb
input:
0
output:
3
input:
1 2 1 0 0 1
output:
0 1
input:
2 2 1 0 1 0
output:
1 1
input:
3 2 1 0 1 1
output:
1 0
result:
points 1.0 W = 3
Test #10:
score: 10
Accepted
time: 1ms
memory: 7700kb
input:
0
output:
3
input:
1 2 1 0 1 0
output:
1 1
input:
2 2 1 0 1 1
output:
1 0
input:
3 2 1 0 0 1
output:
0 1
result:
points 1.0 W = 3
Test #11:
score: 10
Accepted
time: 1ms
memory: 7696kb
input:
0
output:
3
input:
1 2 1 0 1 0
output:
1 1
input:
2 2 1 0 1 1
output:
1 0
input:
3 2 1 0 0 1
output:
0 1
result:
points 1.0 W = 3
Test #12:
score: 10
Accepted
time: 1ms
memory: 7804kb
input:
0
output:
3
input:
1 2 1 0 1 0
output:
1 1
input:
2 2 1 0 1 1
output:
1 0
input:
3 2 1 0 0 1
output:
0 1
result:
points 1.0 W = 3
Test #13:
score: 10
Accepted
time: 1ms
memory: 7928kb
input:
0
output:
3
input:
1 2 1 0 0 1
output:
0 1
input:
2 2 1 0 1 0
output:
1 1
input:
3 2 1 0 1 1
output:
1 0
result:
points 1.0 W = 3
Subtask #2:
score: 24
Accepted
Test #14:
score: 24
Accepted
time: 1ms
memory: 7860kb
input:
0
output:
3
input:
1 3 2 1 0 1 1 1
output:
1 1 0
input:
2 3 2 1 0 0 1 1
output:
0 1 1
input:
3 3 2 1 0 1 1 0
output:
1 1 1
result:
points 1.0 W = 3
Test #15:
score: 24
Accepted
time: 1ms
memory: 7936kb
input:
0
output:
3
input:
1 4 2 0 3 1 1 0 0 1
output:
1 0 1 0
input:
2 4 2 0 3 1 0 1 0 1
output:
0 1 1 0
input:
3 4 2 0 3 1 0 1 1 0
output:
0 1 1 0
result:
points 1.0 W = 3
Test #16:
score: 24
Accepted
time: 1ms
memory: 7772kb
input:
0
output:
3
input:
1 5 4 0 1 2 3 1 1 1 1 0
output:
1 1 1 1 0
input:
2 5 4 0 1 2 3 0 1 1 1 1
output:
0 1 0 1 0
input:
3 5 4 0 1 2 3 0 1 0 1 0
output:
0 1 1 1 1
result:
points 1.0 W = 3
Test #17:
score: 24
Accepted
time: 1ms
memory: 7948kb
input:
0
output:
3
input:
1 15 8 2 4 1 13 0 10 3 9 11 12 6 14 5 7 1 0 0 0 0 1 1 0 1 1 0 0 0 0 0
output:
1 0 0 0 0 1 1 0 1 0 1 0 1 0 1
input:
2 15 8 2 4 1 13 0 10 3 9 11 12 6 14 5 7 1 0 1 0 1 0 1 0 1 1 0 0 0 0 1
output:
1 1 0 1 0 0 1 0 0 0 0 0 0 0 1
input:
3 15 8 2 4 1 13 0 10 3 9 11 12 6 14 5 7 1 0 0 0 0 0 0 0 1 0 0 1 0 1 1
output:
1 0 0 0 0 1 0 0 1 0 0 1 0 1 0
result:
points 1.0 W = 3
Test #18:
score: 24
Accepted
time: 2ms
memory: 7984kb
input:
0
output:
3
input:
1 14 7 3 2 11 0 10 6 4 5 1 12 9 13 8 1 0 0 1 1 0 1 1 0 0 1 0 0 1
output:
1 0 0 1 1 0 1 1 0 0 1 1 1 0
input:
2 14 7 3 2 11 0 10 6 4 5 1 12 9 13 8 0 1 1 1 0 0 1 1 0 1 1 0 0 1
output:
0 1 1 0 1 1 1 1 1 0 0 0 1 1
input:
3 14 7 3 2 11 0 10 6 4 5 1 12 9 13 8 1 1 0 0 0 1 1 1 1 1 0 1 1 0
output:
1 1 0 0 1 1 1 1 0 0 0 0 1 0
result:
points 1.0 W = 3
Test #19:
score: 24
Accepted
time: 1ms
memory: 7980kb
input:
0
output:
3
input:
1 15 4 11 3 7 10 0 13 5 9 6 8 2 1 14 12 1 1 0 0 1 1 1 0 1 0 1 0 0 0 0
output:
1 1 0 0 0 1 1 0 1 1 0 1 0 1 1
input:
2 15 4 11 3 7 10 0 13 5 9 6 8 2 1 14 12 1 1 0 1 0 1 1 0 1 1 0 0 0 1 1
output:
1 0 1 0 0 1 0 0 0 1 1 0 0 0 1
input:
3 15 4 11 3 7 10 0 13 5 9 6 8 2 1 14 12 1 0 0 0 1 1 0 0 0 1 0 0 1 0 1
output:
1 0 0 0 1 1 0 1 0 1 1 0 1 0 0
result:
points 1.0 W = 3
Test #20:
score: 24
Accepted
time: 1ms
memory: 7740kb
input:
0
output:
3
input:
1 14 6 13 5 12 10 9 4 1 2 0 11 3 7 8 0 0 0 1 1 0 0 1 1 0 1 0 0 1
output:
0 0 0 1 1 0 0 1 1 1 1 1 0 0
input:
2 14 6 13 5 12 10 9 4 1 2 0 11 3 7 8 0 0 1 1 1 1 1 0 0 1 1 0 0 0
output:
0 0 1 0 0 0 1 0 0 1 0 0 1 0
input:
3 14 6 13 5 12 10 9 4 1 2 0 11 3 7 8 0 1 0 0 1 0 0 1 0 0 0 1 0 0
output:
0 1 0 0 1 0 1 0 0 0 0 1 1 1
result:
points 1.0 W = 3
Test #21:
score: 24
Accepted
time: 1ms
memory: 7780kb
input:
0
output:
3
input:
1 14 11 10 13 12 9 8 7 2 0 5 3 1 6 4 0 0 1 0 0 0 1 1 0 1 1 1 1 1
output:
0 0 1 0 0 0 1 0 0 1 1 0 0 0
input:
2 14 11 10 13 12 9 8 7 2 0 5 3 1 6 4 0 0 0 1 1 0 0 1 0 0 0 1 0 0
output:
0 0 0 1 1 1 0 1 0 1 1 1 1 1
input:
3 14 11 10 13 12 9 8 7 2 0 5 3 1 6 4 1 1 1 1 1 0 1 0 1 1 1 0 0 0
output:
1 1 1 1 1 0 1 1 0 0 0 0 1 0
result:
points 1.0 W = 3
Test #22:
score: 24
Accepted
time: 1ms
memory: 7752kb
input:
0
output:
3
input:
1 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 1 0 1 0 1 0 0 1 0 1 1 0 1 0
output:
1 1 0 1 0 1 0 0 1 0 1 1 0 1 0
input:
2 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 1 0 1 1 0 1 0 0 1 0 1 0 1 1
output:
0 1 0 1 1 0 1 0 0 1 0 1 0 1 1
input:
3 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 1 0 1 0 1 0 0 1 0 1 1 0 1 0
output:
1 1 0 1 0 1 0 0 1 0 1 1 0 1 0
result:
points 1.0 W = 3
Test #23:
score: 24
Accepted
time: 1ms
memory: 7708kb
input:
0
output:
3
input:
1 3 1 2 0 1 1 1
output:
1 0 1
input:
2 3 1 2 0 1 0 1
output:
1 1 1
input:
3 3 1 2 0 1 1 1
output:
1 1 1
result:
points 1.0 W = 3
Test #24:
score: 24
Accepted
time: 1ms
memory: 7704kb
input:
0
output:
3
input:
1 3 2 0 1 0 0 0
output:
0 0 0
input:
2 3 2 0 1 0 0 0
output:
0 0 0
input:
3 3 2 0 1 0 0 0
output:
0 0 0
result:
points 1.0 W = 3
Subtask #3:
score: 9
Accepted
Test #25:
score: 9
Accepted
time: 5ms
memory: 9604kb
input:
0
output:
3
input:
1 500 499 498 497 496 495 494 493 492 491 490 489 488 487 486 485 484 483 482 481 480 479 478 477 476 475 474 473 472 471 470 469 468 467 466 465 464 463 462 461 460 459 458 457 456 455 454 453 452 451 450 449 448 447 446 445 444 443 442 441 440 439 438 437 436 435 434 433 432 431 430 429 428 427 42...
output:
0 1 0 0 1 0 0 1 0 1 1 1 0 0 0 0 0 0 1 0 1 1 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 1 1 1 0 0 1 1 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 1 1 0 0 0 0 0 1 1 0 0 1 1 1 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 1 1 0 1 1 0 1 1 0 0 1 1 1 1 1 1 1 0 0 0 1 1 1 0 0 1 0 0 1 0 1 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 1 0 1 1 0 1 1 1 0 1 1 0 1 1 1 1 ...
input:
2 500 499 498 497 496 495 494 493 492 491 490 489 488 487 486 485 484 483 482 481 480 479 478 477 476 475 474 473 472 471 470 469 468 467 466 465 464 463 462 461 460 459 458 457 456 455 454 453 452 451 450 449 448 447 446 445 444 443 442 441 440 439 438 437 436 435 434 433 432 431 430 429 428 427 42...
output:
0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 0 0 1 1 0 0 0 1 0 0 1 0 0 0 0 1 1 1 0 0 0 0 1 0 0 1 0 1 1 0 1 1 1 0 0 0 1 0 0 0 0 1 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 0 1 1 1 0 1 0 1 1 0 0 1 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 1 1 1 0 0 1 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 1 0 0 ...
input:
3 500 499 498 497 496 495 494 493 492 491 490 489 488 487 486 485 484 483 482 481 480 479 478 477 476 475 474 473 472 471 470 469 468 467 466 465 464 463 462 461 460 459 458 457 456 455 454 453 452 451 450 449 448 447 446 445 444 443 442 441 440 439 438 437 436 435 434 433 432 431 430 429 428 427 42...
output:
0 1 0 1 1 1 0 1 0 1 1 1 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 1 1 0 0 0 1 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 1 1 1 1 0 0 0 0 1 1 1 0 1 1 0 0 0 1 0 1 1 0 1 0 1 1 1 0 1 0 1 0 0 0 0 1 0 0 0 0 1 1 1 0 0 0 1 0 0 1 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 1 0 0 1 0 1 0 1 0 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 1 1 ...
result:
points 1.0 W = 3
Test #26:
score: 9
Accepted
time: 5ms
memory: 9564kb
input:
0
output:
3
input:
1 499 498 497 496 495 494 493 492 491 490 489 488 487 486 485 484 483 482 481 480 479 478 477 476 475 474 473 472 471 470 469 468 467 466 465 464 463 462 461 460 459 458 457 456 455 454 453 452 451 450 449 448 447 446 445 444 443 442 441 440 439 438 437 436 435 434 433 432 431 430 429 428 427 426 42...
output:
0 0 1 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 1 0 1 0 1 1 1 1 0 1 0 1 0 0 1 0 1 1 1 0 0 0 1 1 1 0 0 0 0 1 0 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 0 ...
input:
2 499 498 497 496 495 494 493 492 491 490 489 488 487 486 485 484 483 482 481 480 479 478 477 476 475 474 473 472 471 470 469 468 467 466 465 464 463 462 461 460 459 458 457 456 455 454 453 452 451 450 449 448 447 446 445 444 443 442 441 440 439 438 437 436 435 434 433 432 431 430 429 428 427 426 42...
output:
1 0 1 0 1 0 0 0 1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 0 1 1 1 0 0 0 0 1 1 0 1 0 0 1 1 1 0 1 1 1 0 1 1 1 1 0 1 1 0 0 0 0 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 0 1 1 0 0 1 0 0 1 1 0 0 1 0 0 0 0 1 0 1 0 1 0 0 0 1 1 0 0 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 0 1 1 0 1 0 1 1 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 1 0 1 0 ...
input:
3 499 498 497 496 495 494 493 492 491 490 489 488 487 486 485 484 483 482 481 480 479 478 477 476 475 474 473 472 471 470 469 468 467 466 465 464 463 462 461 460 459 458 457 456 455 454 453 452 451 450 449 448 447 446 445 444 443 442 441 440 439 438 437 436 435 434 433 432 431 430 429 428 427 426 42...
output:
1 0 0 1 1 0 0 1 1 0 1 0 0 1 1 0 0 0 1 1 0 1 0 1 1 0 0 1 0 0 1 0 1 1 0 1 0 1 0 1 1 1 0 0 0 0 1 1 0 1 1 1 1 0 1 1 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 0 0 0 1 0 1 0 0 1 1 0 0 1 1 0 1 1 1 1 0 0 0 1 1 1 0 1 0 0 1 0 1 0 1 0 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1 1 1 0 ...
result:
points 1.0 W = 3
Subtask #4:
score: 13
Accepted
Test #27:
score: 13
Accepted
time: 6ms
memory: 9504kb
input:
0
output:
3
input:
1 500 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 10...
output:
1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 1 0 1 1 1 1 0 1 0 0 1 0 0 1 0 1 0 0 0 0 0 0 1 1 0 1 0 1 1 0 1 1 1 0 1 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 0 1 0 0 1 0 1 0 0 1 1 0 1 0 1 1 1 1 1 0 0 0 1 1 1 1 0 0 1 0 1 1 0 0 1 0 1 1 1 0 0 0 1 1 0 1 1 0 0 0 0 1 1 0 1 0 0 0 0 ...
input:
2 500 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 10...
output:
1 0 0 1 1 0 0 0 1 0 1 0 0 0 1 1 0 0 0 1 1 0 1 1 0 0 1 1 1 0 0 0 0 1 0 0 0 1 1 1 0 1 1 1 1 1 0 1 0 0 1 0 0 0 1 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 0 0 1 0 1 0 0 0 0 1 0 1 1 1 0 1 0 0 0 1 0 1 0 1 0 0 1 1 1 0 0 1 1 0 0 1 0 1 1 1 1 1 1 0 1 1 0 0 1 0 1 1 0 1 0 1 1 1 1 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 1 1 0 ...
input:
3 500 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 10...
output:
1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 1 0 0 0 1 1 1 0 1 1 0 1 1 1 1 0 0 0 0 0 1 0 1 1 1 1 0 1 1 0 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 1 0 1 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1 1 0 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 0 1 0 1 1 1 0 0 0 0 ...
result:
points 1.0 W = 3
Test #28:
score: 13
Accepted
time: 2ms
memory: 9576kb
input:
0
output:
3
input:
1 499 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 10...
output:
0 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 1 1 0 1 0 1 1 0 0 0 0 0 1 1 1 0 0 1 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 0 1 1 0 1 0 1 1 1 1 1 1 0 0 1 1 1 0 0 1 1 1 1 0 1 0 0 0 0 1 0 1 0 1 0 1 0 0 1 0 0 0 1 1 0 0 1 1 1 1 0 1 0 1 1 1 1 0 0 0 0 0 0 0 0 1 0 1 0 1 1 0 0 1 0 1 0 0 0 1 1 1 0 0 1 0 0 1 1 1 0 0 0 ...
input:
2 499 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 10...
output:
1 0 0 1 1 1 0 1 0 1 1 0 0 1 1 1 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 1 0 1 1 0 0 1 0 0 1 1 0 1 1 1 1 1 0 1 1 0 1 0 1 0 0 1 0 0 0 1 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 0 1 1 0 1 1 0 0 1 0 1 0 0 0 0 0 0 0 1 1 0 0 1 0 0 1 0 1 1 1 0 0 0 1 0 1 0 1 1 1 1 1 1 1 1 0 1 1 0 1 0 0 0 0 1 1 1 1 0 0 1 0 0 ...
input:
3 499 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 10...
output:
0 1 1 0 0 1 1 0 0 1 1 1 1 1 1 1 0 0 1 1 1 1 0 1 0 0 0 0 1 0 0 1 0 1 1 1 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 1 0 1 1 1 1 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 1 0 1 1 0 0 1 0 1 0 1 0 0 0 1 1 1 1 0 0 0 1 0 0 0 0 0 0 0 1 1 1 1 1 0 1 0 1 1 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 0 1 ...
result:
points 1.0 W = 3
Subtask #5:
score: 13
Accepted
Test #29:
score: 13
Accepted
time: 4ms
memory: 9744kb
input:
0
output:
3
input:
1 500 499 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...
output:
1 0 1 1 0 1 1 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 1 1 1 1 1 0 1 0 0 1 0 1 1 0 0 1 0 1 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 0 1 1 0 1 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 1 1 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 1 1 ...
input:
2 500 499 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...
output:
0 0 1 1 1 1 0 0 0 0 1 1 1 1 1 0 1 1 0 0 1 1 0 1 0 1 0 1 1 1 0 1 1 0 1 1 1 1 1 1 0 1 1 1 0 0 0 1 1 0 0 0 1 0 1 0 0 1 1 1 1 1 1 1 0 0 1 1 0 1 0 0 1 0 1 1 1 1 1 0 1 0 0 1 0 0 1 1 0 1 0 1 0 0 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 1 1 0 1 0 0 1 0 1 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 1 1 1 0 0 1 0 0 ...
input:
3 500 499 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...
output:
1 1 0 1 1 0 1 1 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 1 1 1 1 1 0 1 0 0 1 0 1 1 0 0 1 0 1 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 0 1 1 0 1 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 1 1 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 1 ...
result:
points 1.0 W = 3
Test #30:
score: 13
Accepted
time: 5ms
memory: 9808kb
input:
0
output:
3
input:
1 499 498 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...
output:
0 0 1 0 0 1 0 0 0 1 1 1 0 1 1 1 0 1 1 1 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 0 1 0 0 1 1 1 0 1 0 1 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 1 0 1 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 0 0 1 0 1 0 1 1 1 1 1 0 1 0 1 0 1 1 0 1 1 0 1 1 0 0 1 1 1 0 1 0 0 1 0 1 0 1 0 0 1 1 0 0 1 0 0 1 1 0 0 1 0 1 0 0 0 1 0 0 0 0 1 1 1 0 0 0 0 ...
input:
2 499 498 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...
output:
0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 0 1 0 1 1 1 0 0 1 0 0 0 0 0 0 0 0 1 0 1 1 0 0 1 0 1 1 1 1 0 1 0 0 0 1 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 1 1 1 1 0 1 1 0 0 0 0 1 1 1 1 0 0 0 1 1 0 0 0 1 0 0 1 1 1 1 1 0 0 0 0 0 1 0 0 1 1 1 0 0 0 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 0 0 1 1 1 1 0 0 1 1 0 0 1 1 1 0 1 1 ...
input:
3 499 498 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...
output:
0 0 0 1 0 0 1 0 0 0 1 1 1 0 1 1 1 0 1 1 1 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 0 1 0 0 1 1 1 0 1 0 1 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 1 0 1 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 0 0 1 0 1 0 1 1 1 1 1 0 1 0 1 0 1 1 0 1 1 0 1 1 0 0 1 1 1 0 1 0 0 1 0 1 0 1 0 0 1 1 0 0 1 0 0 1 1 0 0 1 0 1 0 0 0 1 0 0 0 0 1 1 1 0 0 0 ...
result:
points 1.0 W = 3
Subtask #6:
score: 31
Accepted
Test #31:
score: 31
Accepted
time: 5ms
memory: 9780kb
input:
0
output:
3
input:
1 500 285 191 63 156 100 260 361 355 8 0 91 328 136 126 224 358 13 449 148 467 153 378 129 360 295 496 213 430 337 258 140 456 367 33 364 340 184 366 248 412 159 176 421 160 150 185 379 489 19 97 171 85 413 220 437 396 107 300 5 446 203 25 401 35 279 442 169 451 475 167 486 103 71 494 334 79 327 146...
output:
0 1 1 0 0 1 1 0 0 1 0 1 1 0 0 0 0 0 1 0 0 0 1 1 0 0 0 1 1 1 0 1 1 1 0 1 0 0 0 0 0 1 1 0 1 1 0 0 1 1 0 1 0 1 1 0 1 1 1 1 0 1 0 0 1 1 1 0 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 0 0 1 1 1 1 1 1 0 1 1 0 0 0 0 0 0 0 1 0 1 1 1 0 0 1 1 0 0 1 0 1 1 1 0 1 1 1 0 1 0 0 1 0 1 0 1 0 0 0 1 1 0 0 0 0 0 0 1 0 ...
input:
2 500 285 191 63 156 100 260 361 355 8 0 91 328 136 126 224 358 13 449 148 467 153 378 129 360 295 496 213 430 337 258 140 456 367 33 364 340 184 366 248 412 159 176 421 160 150 185 379 489 19 97 171 85 413 220 437 396 107 300 5 446 203 25 401 35 279 442 169 451 475 167 486 103 71 494 334 79 327 146...
output:
1 1 0 1 1 0 0 0 0 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 1 0 1 1 0 1 0 1 0 1 0 0 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 0 1 1 0 1 1 0 0 1 0 1 0 1 1 1 1 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 1 0 1 0 1 0 1 0 1 0 1 1 0 0 1 1 0 1 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 1 1 0 1 0 0 1 1 1 1 1 1 1 0 ...
input:
3 500 285 191 63 156 100 260 361 355 8 0 91 328 136 126 224 358 13 449 148 467 153 378 129 360 295 496 213 430 337 258 140 456 367 33 364 340 184 366 248 412 159 176 421 160 150 185 379 489 19 97 171 85 413 220 437 396 107 300 5 446 203 25 401 35 279 442 169 451 475 167 486 103 71 494 334 79 327 146...
output:
1 1 1 1 1 0 0 1 0 0 0 0 0 1 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 0 1 1 1 1 0 1 1 1 1 0 1 0 1 0 0 1 0 1 0 0 1 0 0 1 0 0 1 0 1 0 1 0 0 1 1 0 1 0 0 0 0 0 0 0 0 1 0 0 1 1 1 1 1 1 0 1 1 0 1 0 0 1 0 0 1 0 0 0 1 0 0 1 1 0 0 1 0 0 0 1 0 0 1 1 1 1 1 1 0 1 1 0 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 1 0 1 0 0 1 0 1 1 ...
result:
points 1.0 W = 3
Test #32:
score: 31
Accepted
time: 6ms
memory: 9808kb
input:
0
output:
3
input:
1 499 268 194 277 346 145 186 138 205 120 126 254 102 229 381 49 270 197 458 123 410 68 23 371 490 432 208 377 325 272 175 99 481 209 35 487 267 155 292 215 335 67 398 392 46 28 59 105 498 185 183 89 70 303 250 391 141 379 136 51 423 71 54 113 293 386 55 442 331 475 214 470 316 12 5 301 211 317 39 3...
output:
0 0 0 1 1 1 1 1 1 0 0 1 0 1 0 0 0 1 1 0 1 0 1 0 1 0 1 1 1 0 1 1 0 1 0 1 1 0 1 0 0 0 1 0 1 0 0 0 0 1 1 0 1 1 1 0 1 1 0 0 1 1 1 1 1 0 1 0 0 0 1 1 1 0 1 1 1 1 1 0 1 0 1 0 1 0 0 1 1 0 1 1 1 1 0 0 0 0 1 1 0 0 0 1 0 0 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 0 0 1 1 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 1 1 1 1 0 1 1 0 0 ...
input:
2 499 268 194 277 346 145 186 138 205 120 126 254 102 229 381 49 270 197 458 123 410 68 23 371 490 432 208 377 325 272 175 99 481 209 35 487 267 155 292 215 335 67 398 392 46 28 59 105 498 185 183 89 70 303 250 391 141 379 136 51 423 71 54 113 293 386 55 442 331 475 214 470 316 12 5 301 211 317 39 3...
output:
1 1 1 1 0 0 1 0 1 0 1 0 1 1 0 0 1 0 1 1 0 0 1 0 0 1 0 0 1 1 0 0 1 1 1 1 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 1 0 0 0 1 1 0 0 0 0 1 1 0 1 1 0 0 0 1 1 1 0 1 0 0 1 0 1 0 0 1 0 0 0 0 0 1 1 1 0 1 1 0 1 1 0 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 1 1 1 0 1 0 1 1 0 0 0 1 0 0 ...
input:
3 499 268 194 277 346 145 186 138 205 120 126 254 102 229 381 49 270 197 458 123 410 68 23 371 490 432 208 377 325 272 175 99 481 209 35 487 267 155 292 215 335 67 398 392 46 28 59 105 498 185 183 89 70 303 250 391 141 379 136 51 423 71 54 113 293 386 55 442 331 475 214 470 316 12 5 301 211 317 39 3...
output:
0 0 0 1 1 1 1 0 0 1 0 1 0 1 1 1 0 0 0 1 1 0 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 1 1 0 0 0 1 1 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 1 1 0 0 0 0 1 1 0 0 0 0 1 1 1 1 1 1 0 1 1 1 0 0 1 1 0 0 0 1 1 1 1 0 0 1 0 0 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 0 1 1 0 1 1 1 0 0 0 0 1 0 ...
result:
points 1.0 W = 3
Test #33:
score: 31
Accepted
time: 6ms
memory: 9588kb
input:
0
output:
3
input:
1 500 30 5 174 168 64 74 256 422 29 325 149 67 414 442 429 110 179 331 287 484 329 494 118 431 180 82 104 90 283 230 242 418 129 352 106 493 222 365 272 167 148 401 72 402 140 134 172 374 259 56 28 6 458 9 19 382 282 160 77 301 66 432 296 328 318 451 32 169 111 131 314 238 88 233 122 154 276 341 225...
output:
1 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 1 0 0 1 1 1 0 1 0 1 0 0 1 1 0 1 1 0 0 0 0 1 0 0 1 1 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 1 0 0 0 0 0 1 0 1 1 1 0 0 1 0 ...
input:
2 500 30 5 174 168 64 74 256 422 29 325 149 67 414 442 429 110 179 331 287 484 329 494 118 431 180 82 104 90 283 230 242 418 129 352 106 493 222 365 272 167 148 401 72 402 140 134 172 374 259 56 28 6 458 9 19 382 282 160 77 301 66 432 296 328 318 451 32 169 111 131 314 238 88 233 122 154 276 341 225...
output:
0 0 1 1 1 1 0 0 0 1 0 0 1 0 1 1 1 1 0 1 0 0 1 1 0 1 0 0 0 0 0 1 1 0 0 0 1 1 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 1 1 1 1 1 0 0 0 0 0 0 1 1 0 0 1 0 0 1 1 0 1 1 1 1 0 0 0 0 1 1 0 0 1 1 1 0 0 1 0 1 1 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 1 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 0 1 0 1 0 0 1 0 1 0 0 1 0 0 1 1 1 1 0 0 1 0 1 ...
input:
3 500 30 5 174 168 64 74 256 422 29 325 149 67 414 442 429 110 179 331 287 484 329 494 118 431 180 82 104 90 283 230 242 418 129 352 106 493 222 365 272 167 148 401 72 402 140 134 172 374 259 56 28 6 458 9 19 382 282 160 77 301 66 432 296 328 318 451 32 169 111 131 314 238 88 233 122 154 276 341 225...
output:
0 0 1 0 0 0 0 1 1 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 1 0 1 1 0 0 1 1 1 0 1 1 0 0 1 0 1 1 0 1 0 1 1 0 1 0 0 1 0 0 0 1 1 0 0 0 0 1 0 1 1 0 1 0 0 1 1 1 1 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 1 1 0 1 1 0 0 1 1 0 0 0 1 1 1 0 0 0 0 1 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 1 1 1 0 0 1 0 ...
result:
points 1.0 W = 3
Test #34:
score: 31
Accepted
time: 6ms
memory: 9608kb
input:
0
output:
3
input:
1 499 407 20 406 394 446 169 359 188 328 372 198 216 134 235 209 57 403 417 145 437 310 360 17 147 262 427 384 368 456 154 428 122 258 350 6 494 379 120 495 33 156 278 206 203 388 279 171 425 176 366 67 163 4 248 31 488 202 94 289 448 249 88 468 11 45 325 442 299 98 338 348 238 108 24 356 187 101 42...
output:
0 1 0 1 0 0 1 0 1 1 1 0 0 1 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 0 1 1 0 1 1 0 1 0 0 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 1 0 0 1 1 0 0 0 0 0 1 1 1 0 0 1 1 0 1 1 1 0 0 0 1 1 0 0 0 0 1 1 1 1 0 0 1 0 0 0 1 1 0 1 1 1 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 1 0 1 0 1 1 0 0 0 0 0 1 1 0 1 1 0 1 0 0 1 1 1 0 0 0 0 1 ...
input:
2 499 407 20 406 394 446 169 359 188 328 372 198 216 134 235 209 57 403 417 145 437 310 360 17 147 262 427 384 368 456 154 428 122 258 350 6 494 379 120 495 33 156 278 206 203 388 279 171 425 176 366 67 163 4 248 31 488 202 94 289 448 249 88 468 11 45 325 442 299 98 338 348 238 108 24 356 187 101 42...
output:
0 1 0 1 0 1 1 0 0 0 1 1 0 1 0 0 1 1 1 0 1 0 1 0 1 0 1 1 0 0 0 0 1 1 1 1 0 1 1 1 1 0 0 0 1 0 1 1 1 0 1 1 0 1 1 1 0 0 1 0 1 1 1 1 0 0 0 0 1 1 1 0 1 0 0 0 0 1 1 1 1 0 1 1 1 1 1 0 1 0 0 1 0 0 0 1 1 0 1 1 0 0 1 0 1 0 1 1 0 1 1 0 1 0 1 1 0 0 0 0 0 0 1 1 0 1 0 0 1 1 0 1 1 1 1 1 1 1 0 1 1 0 1 1 0 0 1 0 0 1 ...
input:
3 499 407 20 406 394 446 169 359 188 328 372 198 216 134 235 209 57 403 417 145 437 310 360 17 147 262 427 384 368 456 154 428 122 258 350 6 494 379 120 495 33 156 278 206 203 388 279 171 425 176 366 67 163 4 248 31 488 202 94 289 448 249 88 468 11 45 325 442 299 98 338 348 238 108 24 356 187 101 42...
output:
1 1 0 1 1 1 0 0 0 0 0 1 1 0 0 1 1 1 1 0 0 0 0 1 0 0 0 1 1 1 0 1 0 0 1 1 0 1 1 0 1 0 0 0 0 0 0 0 0 1 1 1 0 1 1 0 1 1 1 1 1 0 1 0 1 0 1 1 0 0 1 1 1 0 0 1 0 0 0 1 1 0 1 1 0 0 0 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 0 1 1 0 0 1 0 1 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 1 0 0 0 1 1 1 0 1 1 0 1 0 0 0 1 0 1 0 1 0 0 0 1 1 ...
result:
points 1.0 W = 3
Test #35:
score: 31
Accepted
time: 0ms
memory: 9616kb
input:
0
output:
3
input:
1 500 452 378 487 437 399 489 316 252 499 392 295 449 396 385 469 338 455 473 479 448 470 413 320 476 351 261 267 340 389 302 301 421 330 347 341 488 443 264 406 430 461 288 404 486 298 352 292 344 369 494 415 322 433 272 271 269 299 423 324 371 290 257 308 463 312 412 456 355 366 281 276 453 420 29...
output:
0 1 0 1 0 0 1 1 1 1 0 0 0 1 1 0 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 0 0 1 0 1 0 0 0 0 1 1 0 1 0 1 1 0 1 1 0 1 1 1 0 0 0 1 0 0 1 0 1 1 1 1 1 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 0 0 1 1 0 1 1 0 0 0 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 0 0 0 0 1 1 0 0 1 1 0 0 1 0 0 1 1 0 1 0 1 1 1 1 1 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0 ...
input:
2 500 452 378 487 437 399 489 316 252 499 392 295 449 396 385 469 338 455 473 479 448 470 413 320 476 351 261 267 340 389 302 301 421 330 347 341 488 443 264 406 430 461 288 404 486 298 352 292 344 369 494 415 322 433 272 271 269 299 423 324 371 290 257 308 463 312 412 456 355 366 281 276 453 420 29...
output:
0 1 0 1 1 1 1 0 1 0 1 1 1 1 1 0 0 1 1 0 1 0 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0 1 1 1 0 0 1 1 1 1 0 0 0 1 0 1 0 1 0 0 0 1 1 0 0 0 1 0 0 1 0 0 1 0 1 1 0 0 0 1 1 1 0 1 0 1 0 0 1 1 0 1 1 0 0 0 0 1 0 1 0 0 1 1 1 1 1 0 1 0 1 0 1 0 0 1 1 1 0 1 1 1 0 1 0 0 1 1 1 1 1 1 0 1 1 1 0 1 1 0 0 1 0 0 1 1 1 0 0 0 1 1 1 0 ...
input:
3 500 452 378 487 437 399 489 316 252 499 392 295 449 396 385 469 338 455 473 479 448 470 413 320 476 351 261 267 340 389 302 301 421 330 347 341 488 443 264 406 430 461 288 404 486 298 352 292 344 369 494 415 322 433 272 271 269 299 423 324 371 290 257 308 463 312 412 456 355 366 281 276 453 420 29...
output:
1 0 1 0 0 1 1 1 0 1 0 1 1 0 1 1 1 1 0 0 1 0 1 1 0 1 0 1 0 0 0 1 1 1 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 0 0 0 0 0 1 1 0 0 0 1 0 0 1 0 0 0 0 1 1 0 1 0 1 0 1 0 1 0 0 1 1 1 0 0 1 1 1 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 1 1 0 0 1 0 0 1 0 1 1 1 0 0 1 1 0 0 1 1 1 ...
result:
points 1.0 W = 3
Test #36:
score: 31
Accepted
time: 5ms
memory: 9512kb
input:
0
output:
3
input:
1 500 121 129 11 59 186 238 151 89 164 236 182 96 25 152 105 156 120 95 146 131 0 173 198 60 239 204 82 71 207 249 9 193 213 73 67 34 91 15 20 99 12 201 130 206 80 234 143 54 208 2 248 179 40 116 217 243 203 44 209 118 22 154 199 240 72 133 147 210 142 192 124 63 97 181 50 128 166 183 157 18 167 159...
output:
0 0 1 0 0 1 1 0 1 0 0 1 1 0 0 0 0 0 0 1 1 0 1 1 1 0 0 0 1 1 0 1 1 1 1 0 1 0 1 1 1 0 0 0 1 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 1 0 1 1 0 0 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 0 0 1 0 0 1 1 1 0 1 ...
input:
2 500 121 129 11 59 186 238 151 89 164 236 182 96 25 152 105 156 120 95 146 131 0 173 198 60 239 204 82 71 207 249 9 193 213 73 67 34 91 15 20 99 12 201 130 206 80 234 143 54 208 2 248 179 40 116 217 243 203 44 209 118 22 154 199 240 72 133 147 210 142 192 124 63 97 181 50 128 166 183 157 18 167 159...
output:
1 0 0 0 1 1 0 0 0 1 0 0 1 0 1 1 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 0 1 1 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 1 1 0 0 0 1 0 1 1 1 0 1 0 1 1 1 1 1 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 1 0 0 1 1 1 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 1 1 1 0 0 1 0 1 0 0 0 1 0 0 1 1 0 1 1 0 0 ...
input:
3 500 121 129 11 59 186 238 151 89 164 236 182 96 25 152 105 156 120 95 146 131 0 173 198 60 239 204 82 71 207 249 9 193 213 73 67 34 91 15 20 99 12 201 130 206 80 234 143 54 208 2 248 179 40 116 217 243 203 44 209 118 22 154 199 240 72 133 147 210 142 192 124 63 97 181 50 128 166 183 157 18 167 159...
output:
1 1 0 0 0 1 0 1 1 1 0 0 1 1 1 0 1 1 0 1 0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 0 1 0 1 0 1 1 1 0 0 1 1 1 0 1 1 1 1 0 0 1 1 0 1 0 1 1 0 1 1 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 1 1 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 1 0 0 1 1 1 1 1 0 0 1 1 1 0 1 1 0 1 0 0 0 0 1 0 1 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 1 1 0 ...
result:
points 1.0 W = 3
Test #37:
score: 31
Accepted
time: 5ms
memory: 9808kb
input:
0
output:
3
input:
1 500 7 498 232 121 372 462 92 267 185 8 477 324 61 361 424 152 175 275 20 436 244 33 223 472 130 366 312 64 466 207 104 330 411 52 346 215 90 395 253 49 289 479 74 179 351 154 394 279 46 209 470 114 243 364 113 407 216 69 323 413 48 304 173 58 408 352 159 255 410 6 230 311 12 457 353 145 186 432 1 ...
output:
1 0 1 1 1 0 1 0 1 1 0 1 1 0 0 1 0 0 1 0 0 1 1 1 0 0 1 1 1 0 0 1 0 0 0 0 1 0 1 1 1 0 1 0 1 1 1 0 0 1 1 1 1 0 0 1 0 1 1 0 0 0 1 1 0 0 1 0 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 0 1 0 0 0 0 0 1 1 1 0 1 0 1 0 1 0 1 1 0 1 0 0 1 1 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 1 1 1 0 0 0 0 0 0 1 1 1 1 1 0 ...
input:
2 500 7 498 232 121 372 462 92 267 185 8 477 324 61 361 424 152 175 275 20 436 244 33 223 472 130 366 312 64 466 207 104 330 411 52 346 215 90 395 253 49 289 479 74 179 351 154 394 279 46 209 470 114 243 364 113 407 216 69 323 413 48 304 173 58 408 352 159 255 410 6 230 311 12 457 353 145 186 432 1 ...
output:
0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 0 1 1 1 1 1 0 0 0 1 0 1 0 1 1 0 1 0 0 0 0 0 1 0 0 0 0 1 1 1 0 0 0 0 0 1 1 0 0 0 1 0 0 0 1 0 1 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 0 0 1 0 1 1 1 1 0 1 1 1 1 0 0 0 1 1 1 0 0 1 1 1 1 0 0 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 1 1 1 1 1 1 0 1 0 0 0 0 ...
input:
3 500 7 498 232 121 372 462 92 267 185 8 477 324 61 361 424 152 175 275 20 436 244 33 223 472 130 366 312 64 466 207 104 330 411 52 346 215 90 395 253 49 289 479 74 179 351 154 394 279 46 209 470 114 243 364 113 407 216 69 323 413 48 304 173 58 408 352 159 255 410 6 230 311 12 457 353 145 186 432 1 ...
output:
1 0 1 0 0 0 0 0 1 1 0 0 1 0 0 1 1 1 1 0 1 1 0 1 1 1 1 1 1 0 1 1 1 1 0 1 0 0 1 0 0 1 0 0 0 1 1 0 1 1 0 1 1 1 1 0 0 1 0 0 0 0 1 1 1 0 1 1 0 1 1 1 1 1 1 0 0 0 0 1 0 1 1 1 0 1 1 0 1 1 0 1 1 0 0 1 1 1 0 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 0 1 0 0 1 0 0 1 1 1 1 1 0 1 1 0 1 0 1 1 1 0 0 0 0 1 1 1 1 1 0 0 1 0 0 ...
result:
points 1.0 W = 3
Test #38:
score: 31
Accepted
time: 6ms
memory: 9584kb
input:
0
output:
3
input:
1 500 349 341 416 411 232 170 222 315 443 211 269 276 474 168 336 429 479 356 406 453 446 294 186 305 495 415 448 372 435 193 313 400 187 403 309 225 350 244 296 378 263 351 425 458 288 188 242 206 216 250 201 401 368 330 285 223 454 424 195 376 212 360 292 410 346 291 274 386 237 421 258 256 438 44...
output:
0 0 1 1 0 0 1 1 0 1 0 0 0 0 1 1 0 0 1 1 1 0 1 1 1 1 0 0 1 1 1 0 1 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 0 1 0 1 0 1 0 1 0 1 1 0 1 0 0 1 1 1 1 1 0 0 1 1 0 0 1 0 1 1 0 0 0 0 1 1 0 1 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 0 1 1 1 0 0 1 1 0 1 1 0 1 1 0 1 0 1 0 1 1 1 0 1 1 1 1 0 0 0 1 0 0 1 1 1 1 0 1 0 0 0 0 0 0 1 ...
input:
2 500 349 341 416 411 232 170 222 315 443 211 269 276 474 168 336 429 479 356 406 453 446 294 186 305 495 415 448 372 435 193 313 400 187 403 309 225 350 244 296 378 263 351 425 458 288 188 242 206 216 250 201 401 368 330 285 223 454 424 195 376 212 360 292 410 346 291 274 386 237 421 258 256 438 44...
output:
0 0 1 0 0 0 1 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 0 1 1 1 0 0 1 1 1 0 1 0 1 0 1 1 0 0 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 1 1 0 0 0 1 0 1 0 0 0 1 0 0 1 0 1 0 1 0 1 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 1 0 1 0 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 1 1 1 0 0 0 1 1 0 0 0 1 0 1 1 1 0 0 1 1 1 0 0 0 0 0 1 0 0 1 1 0 0 0 1 0 0 1 1 ...
input:
3 500 349 341 416 411 232 170 222 315 443 211 269 276 474 168 336 429 479 356 406 453 446 294 186 305 495 415 448 372 435 193 313 400 187 403 309 225 350 244 296 378 263 351 425 458 288 188 242 206 216 250 201 401 368 330 285 223 454 424 195 376 212 360 292 410 346 291 274 386 237 421 258 256 438 44...
output:
0 0 1 0 0 1 0 0 0 0 1 1 0 0 0 1 1 0 1 0 1 0 0 0 1 1 0 0 1 0 1 1 0 1 0 0 0 0 1 1 1 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 1 1 0 1 1 1 0 1 0 0 0 1 0 0 1 0 0 1 0 1 1 1 1 0 0 1 1 1 1 0 0 1 0 1 0 1 1 1 0 1 1 0 1 0 0 0 1 0 1 0 1 0 0 1 0 1 0 0 0 1 0 0 1 0 1 0 1 1 1 0 0 1 0 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 1 0 1 1 1 ...
result:
points 1.0 W = 3