QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#426374 | #7863. Parity Game | lmeowdn | WA | 2ms | 4104kb | C++14 | 2.6kb | 2024-05-31 09:23:33 | 2024-05-31 09:23:33 |
Judging History
answer
//Shirasu Azusa 2024.5
#include <bits/stdc++.h>
#define fi first
#define se second
#define eb emplace_back
#define mp make_pair
using namespace std;
typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;
typedef __int128 i128;
template<class T,class S>
bool chmax(T &a,const S b) {return (a<b?a=b,1:0);}
template<class T,class S>
bool chmin(T &a,const S b) {return (a>b?a=b,1:0);}
int popcnt(int x) {return __builtin_popcount(x);}
int popcnt(ll x) {return __builtin_popcountll(x);}
int topbit(int x) {return (x==0?-1:31-__builtin_clz(x));}
int topbit(ll x) {return (x==0?-1:63-__builtin_clzll(x));}
int lowbit(int x) {return (x==0?-1:__builtin_ctz(x));}
int lowbit(ll x) {return (x==0?-1:__builtin_ctzll(x));}
#define int long long
#define rep(i,a,b) for(int i=(a);i<=(b);i++)
#define per(i,a,b) for(int i=(a);i>=(b);i--)
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<pii> vp;
typedef tuple<int,int,int> tiii;
int read() {
int x=0,w=1; char c=getchar();
while(!isdigit(c)) {if(c=='-') w=-1; c=getchar();}
while(isdigit(c)) {x=x*10+(c-'0'); c=getchar();}
return x*w;
}
const int N=505;
int a[N],n,k,stp;
void work(int pos,char *opt) {
if(opt[0]=='*') {
a[pos]=a[pos]&a[pos+1];
} else {
a[pos]=a[pos]^a[pos+1];
}
rep(j,pos+2,n) a[j-1]=a[j]; n--;
}
void play(int cur,int role,int p) {
if(cur==1) {
if(role==1) puts("Alice");
else puts("Bob");
fflush(stdout);
}
if(n==1) return;
if((cur&1)==role) {
int x=0; static char opt[3]; rep(i,0,2) opt[i]=0;
if(p==1) {
bool flag=0;
rep(i,1,n-1) if(a[i]==0&&a[i+1]==0) flag=1, x=i;
if(!flag) {
if(a[1]==0) x=1;
else if(a[n]==0) x=n-1;
else rep(i,1,n-1) if(a[i]==0) {x=i; break;}
}
if(!x) opt[0]='*', x=1;
else opt[0]='+';
} else {
bool flag=0;
rep(i,1,n) if(a[i]==1&&a[i+1]==1) flag=1, x=i;
if(!flag) rep(i,1,n-1) if(a[i]==1) x=i;
opt[0]=(flag?'+':'*');
}
printf("%lld %s\n",x,opt); fflush(stdout);
work(x,opt);
} else {
int x; char opt[3]; scanf("%lld%s",&x,opt);
work(x,opt);
}
play(cur+1,role,p);
}
signed main() {
n=read(), k=read();
rep(i,1,n) a[i]=read();
rep(i,1,n) {
if(a[i]==1) stp++;
if(a[i]&&a[i+1]) i++;
}
if(n%2==0) { //Alice dom
if(k==0) play(1,1,0);
else {
int bs=(n-2)/2;
if(stp<=bs) play(1,0,0);
else play(1,1,1);
}
} else { //Bob dom
if(k==1) play(1,0,0);
else {
int as=(n-1)/2;
if(stp<=as) play(1,1,0);
else play(1,0,1);
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 4100kb
input:
4 1 0 1 0 1 1 * 1
output:
Alice 1 + 1 +
result:
ok The player wins!
Test #2:
score: 0
Accepted
time: 0ms
memory: 3864kb
input:
4 0 1 0 1 0 2 + 1
output:
Alice 3 * 1 *
result:
ok The player wins!
Test #3:
score: 0
Accepted
time: 0ms
memory: 3792kb
input:
5 1 1 1 1 0 0 4 + 2 + 1
output:
Bob 2 + 1 *
result:
ok The player wins!
Test #4:
score: 0
Accepted
time: 0ms
memory: 3768kb
input:
3 0 1 1 1 1 + 1
output:
Bob 1 +
result:
ok The player wins!
Test #5:
score: 0
Accepted
time: 1ms
memory: 3804kb
input:
3 1 1 0 1 1 * 1
output:
Bob 2 +
result:
ok The player wins!
Test #6:
score: 0
Accepted
time: 0ms
memory: 3860kb
input:
3 0 1 0 1 1 * 1
output:
Bob 1 +
result:
ok The player wins!
Test #7:
score: 0
Accepted
time: 1ms
memory: 3752kb
input:
2 1 0 1 1
output:
Alice 1 +
result:
ok The player wins!
Test #8:
score: 0
Accepted
time: 0ms
memory: 3812kb
input:
499 0 0 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 0 ...
output:
Alice 495 + 491 + 485 + 483 + 479 + 475 + 471 + 469 + 463 + 461 + 457 + 453 + 451 + 449 + 445 + 439 + 437 + 435 + 433 + 429 + 427 + 421 + 417 + 415 + 411 + 409 + 405 + 403 + 401 + 397 + 395 + 393 + 389 + 383 + 381 + 379 + 375 + 373 + 371 + 367 + 365 + 359 + 355 + 351 + 349 + 347 + 341 + 337 + 335 + ...
result:
ok The player wins!
Test #9:
score: 0
Accepted
time: 2ms
memory: 3804kb
input:
499 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 0 1 ...
output:
Bob 1 + 2 + 2 + 2 + 4 + 6 + 6 + 8 + 10 + 12 + 12 + 14 + 14 + 18 + 18 + 18 + 18 + 18 + 20 + 22 + 24 + 24 + 24 + 26 + 26 + 30 + 32 + 34 + 34 + 34 + 34 + 36 + 38 + 44 + 46 + 48 + 48 + 50 + 50 + 52 + 52 + 54 + 58 + 60 + 60 + 62 + 64 + 64 + 66 + 66 + 70 + 70 + 72 + 74 + 76 + 76 + 78 + 78 + 84 + 86 + 86 +...
result:
ok The player wins!
Test #10:
score: 0
Accepted
time: 0ms
memory: 3792kb
input:
500 0 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 ...
output:
Alice 499 + 494 + 492 + 488 + 484 + 480 + 476 + 474 + 470 + 466 + 464 + 460 + 458 + 454 + 452 + 450 + 446 + 444 + 442 + 440 + 436 + 434 + 430 + 428 + 424 + 420 + 416 + 414 + 410 + 408 + 402 + 400 + 394 + 392 + 388 + 384 + 380 + 378 + 374 + 370 + 368 + 366 + 364 + 360 + 356 + 354 + 352 + 344 + 340 + ...
result:
ok The player wins!
Test #11:
score: 0
Accepted
time: 2ms
memory: 4084kb
input:
499 1 0 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 0 1 0 ...
output:
Bob 498 + 496 + 490 + 488 + 484 + 482 + 480 + 476 + 474 + 470 + 468 + 466 + 464 + 460 + 458 + 454 + 450 + 448 + 444 + 436 + 434 + 432 + 430 + 426 + 424 + 420 + 418 + 416 + 414 + 412 + 406 + 398 + 396 + 392 + 390 + 388 + 384 + 382 + 380 + 374 + 372 + 370 + 364 + 360 + 358 + 352 + 350 + 348 + 346 + 34...
result:
ok The player wins!
Test #12:
score: 0
Accepted
time: 2ms
memory: 3744kb
input:
499 1 1 0 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 ...
output:
Bob 498 + 496 + 494 + 490 + 488 + 484 + 482 + 478 + 476 + 472 + 470 + 466 + 460 + 458 + 452 + 448 + 446 + 442 + 440 + 438 + 432 + 430 + 426 + 424 + 422 + 420 + 416 + 412 + 408 + 406 + 402 + 400 + 398 + 392 + 388 + 386 + 384 + 380 + 378 + 374 + 368 + 366 + 364 + 362 + 360 + 358 + 352 + 348 + 346 + 34...
result:
ok The player wins!
Test #13:
score: 0
Accepted
time: 2ms
memory: 3816kb
input:
500 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 0 ...
output:
Alice 1 + 1 + 1 + 2 + 2 + 2 + 2 + 2 + 4 + 4 + 6 + 12 + 12 + 14 + 14 + 14 + 16 + 16 + 16 + 20 + 22 + 22 + 24 + 24 + 26 + 26 + 26 + 28 + 28 + 28 + 34 + 36 + 36 + 36 + 38 + 38 + 40 + 42 + 42 + 44 + 46 + 46 + 46 + 46 + 50 + 52 + 52 + 58 + 58 + 60 + 62 + 64 + 66 + 72 + 72 + 74 + 74 + 74 + 76 + 78 + 78 + ...
result:
ok The player wins!
Test #14:
score: 0
Accepted
time: 2ms
memory: 3804kb
input:
500 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ...
output:
Alice 498 * 498 + 495 * 493 * 491 * 489 * 487 * 485 * 483 * 481 * 479 * 477 * 475 * 473 * 471 * 469 * 467 * 465 * 463 * 461 * 459 * 457 * 455 * 453 * 451 * 449 * 447 * 445 * 443 * 441 * 439 * 437 * 435 * 433 * 431 * 429 * 427 * 425 * 423 * 421 * 419 * 417 * 415 * 413 * 411 * 409 * 407 * 405 * 403 * ...
result:
ok The player wins!
Test #15:
score: 0
Accepted
time: 2ms
memory: 3792kb
input:
499 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ...
output:
Alice 498 * 496 * 494 * 492 * 490 * 488 * 486 * 484 * 482 * 480 * 478 * 476 * 474 * 472 * 470 * 468 * 466 * 464 * 462 * 460 * 458 * 456 * 454 * 452 * 450 * 448 * 446 * 444 * 442 * 440 * 438 * 436 * 434 * 432 * 430 * 428 * 426 * 424 * 422 * 420 * 418 * 416 * 414 * 412 * 410 * 408 * 406 * 404 * 402 * ...
result:
ok The player wins!
Test #16:
score: 0
Accepted
time: 2ms
memory: 3832kb
input:
499 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 ...
output:
Bob 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + ...
result:
ok The player wins!
Test #17:
score: 0
Accepted
time: 2ms
memory: 3796kb
input:
500 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ...
output:
Alice 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 ...
result:
ok The player wins!
Test #18:
score: 0
Accepted
time: 2ms
memory: 4084kb
input:
499 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ...
output:
Bob 497 * 495 * 493 * 491 * 489 * 487 * 485 * 483 * 481 * 479 * 477 * 475 * 473 * 471 * 469 * 467 * 465 * 463 * 461 * 459 * 457 * 455 * 453 * 451 * 449 * 447 * 445 * 443 * 441 * 439 * 437 * 435 * 433 * 431 * 429 * 427 * 425 * 423 * 421 * 419 * 417 * 415 * 413 * 411 * 409 * 407 * 405 * 403 * 401 * 39...
result:
ok The player wins!
Test #19:
score: 0
Accepted
time: 2ms
memory: 3796kb
input:
499 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 ...
output:
Bob 498 + 495 * 493 * 491 * 489 * 487 * 485 * 483 * 481 * 479 * 477 * 475 * 473 * 471 * 469 * 467 * 465 * 463 * 461 * 459 * 457 * 455 * 453 * 451 * 449 * 447 * 445 * 443 * 441 * 439 * 437 * 435 * 433 * 431 * 429 * 427 * 425 * 423 * 421 * 419 * 417 * 415 * 413 * 411 * 409 * 407 * 405 * 403 * 401 * 39...
result:
ok The player wins!
Test #20:
score: 0
Accepted
time: 1ms
memory: 3804kb
input:
500 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 ...
output:
Alice 499 * 497 * 495 * 493 * 491 * 489 * 487 * 485 * 483 * 481 * 479 * 477 * 475 * 473 * 471 * 469 * 467 * 465 * 463 * 461 * 459 * 457 * 455 * 453 * 451 * 449 * 447 * 445 * 443 * 441 * 439 * 437 * 435 * 433 * 431 * 429 * 427 * 425 * 423 * 421 * 419 * 417 * 415 * 413 * 411 * 409 * 407 * 405 * 403 * ...
result:
ok The player wins!
Test #21:
score: 0
Accepted
time: 2ms
memory: 3804kb
input:
500 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 ...
output:
Alice 499 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + ...
result:
ok The player wins!
Test #22:
score: 0
Accepted
time: 2ms
memory: 4100kb
input:
500 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 0 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 ...
output:
Alice 498 + 494 + 492 + 490 + 486 + 482 + 478 + 474 + 472 + 468 + 466 + 462 + 458 + 454 + 452 + 450 + 448 + 444 + 442 + 440 + 438 + 436 + 432 + 428 + 424 + 422 + 416 + 414 + 412 + 408 + 402 + 400 + 396 + 392 + 388 + 386 + 382 + 380 + 376 + 370 + 368 + 366 + 364 + 360 + 356 + 354 + 352 + 344 + 340 + ...
result:
ok The player wins!
Test #23:
score: 0
Accepted
time: 2ms
memory: 3796kb
input:
500 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 ...
output:
Alice 499 + 1 + 2 + 2 + 4 + 4 + 4 + 4 + 6 + 6 + 6 + 12 + 14 + 14 + 14 + 16 + 16 + 16 + 18 + 20 + 22 + 24 + 24 + 26 + 26 + 26 + 28 + 28 + 28 + 28 + 36 + 36 + 36 + 38 + 38 + 40 + 40 + 42 + 44 + 44 + 46 + 48 + 48 + 48 + 50 + 54 + 54 + 60 + 60 + 62 + 62 + 66 + 66 + 72 + 72 + 74 + 74 + 76 + 78 + 80 + 80 ...
result:
ok The player wins!
Test #24:
score: 0
Accepted
time: 1ms
memory: 3784kb
input:
500 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 0 1 0 1 0 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1 ...
output:
Alice 493 + 498 + 482 + 452 + 444 + 434 + 428 + 404 + 396 + 394 + 380 + 368 + 360 + 358 + 354 + 342 + 332 + 328 + 298 + 260 + 258 + 252 + 248 + 240 + 214 + 208 + 206 + 192 + 172 + 170 + 168 + 164 + 160 + 154 + 146 + 138 + 130 + 118 + 112 + 90 + 86 + 80 + 78 + 70 + 66 + 64 + 58 + 40 + 16 + 10 + 2 + 3...
result:
ok The player wins!
Test #25:
score: 0
Accepted
time: 0ms
memory: 3832kb
input:
500 1 1 0 1 0 1 1 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 ...
output:
Alice 252 + 4 + 6 + 12 + 28 + 38 + 42 + 46 + 54 + 62 + 66 + 68 + 92 + 108 + 110 + 112 + 114 + 116 + 120 + 126 + 134 + 136 + 140 + 156 + 156 + 180 + 186 + 202 + 222 + 236 + 244 + 248 + 270 + 270 + 276 + 278 + 290 + 318 + 328 + 342 + 344 + 348 + 358 + 360 + 370 + 370 + 374 + 382 + 388 + 392 + 392 + 1 ...
result:
ok The player wins!
Test #26:
score: 0
Accepted
time: 0ms
memory: 4104kb
input:
500 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ...
output:
Alice 498 * 498 + 495 * 493 * 491 * 489 * 487 * 485 * 483 * 481 * 479 * 477 * 475 * 473 * 471 * 469 * 467 * 465 * 463 * 461 * 459 * 457 * 455 * 453 * 451 * 449 * 447 * 445 * 443 * 441 * 439 * 437 * 435 * 433 * 431 * 429 * 427 * 425 * 423 * 421 * 419 * 417 * 415 * 413 * 411 * 409 * 407 * 405 * 403 * ...
result:
ok The player wins!
Test #27:
score: 0
Accepted
time: 2ms
memory: 3804kb
input:
500 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ...
output:
Alice 100 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + ...
result:
ok The player wins!
Test #28:
score: 0
Accepted
time: 2ms
memory: 3808kb
input:
500 0 1 0 1 1 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 ...
output:
Alice 499 + 496 + 492 + 488 + 482 + 478 + 474 + 470 + 468 + 464 + 462 + 450 + 442 + 440 + 438 + 434 + 428 + 426 + 424 + 412 + 410 + 400 + 390 + 388 + 384 + 380 + 378 + 376 + 374 + 372 + 366 + 354 + 342 + 334 + 330 + 328 + 316 + 312 + 310 + 308 + 302 + 296 + 278 + 274 + 268 + 266 + 264 + 260 + 254 + ...
result:
ok The player wins!
Test #29:
score: -100
Wrong Answer
time: 2ms
memory: 3796kb
input:
500 1 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 ...
output:
Alice 2 + 1 + 3 + 11 + 13 + 15 + 15 + 19 + 19 + 19 + 19 + 21 + 23 + 23 + 29 + 33 + 35 + 37 + 43 + 45 + 47 + 49 + 53 + 57 + 75 + 75 + 77 + 79 + 79 + 81 + 83 + 91 + 91 + 93 + 97 + 103 + 109 + 109 + 109 + 111 + 117 + 123 + 123 + 127 + 133 + 133 + 133 + 137 + 147 + 151 + 157 + 159 + 159 + 163 + 167 + 16...
result:
wrong answer The interactor wins!