QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#69888 | #2542. Destructive Game | CSU2023# | WA | 22ms | 4932kb | C++17 | 722b | 2023-01-03 10:02:39 | 2023-01-03 10:02:42 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const ll MAXN=1e5+5;
ll a[MAXN],b[MAXN];
int main()
{
ll n;
scanf("%lld",&n);
for(ll i=1;i<=n;i++)
scanf("%lld %lld",&a[i],&b[i]);
ll ans=0,res;
for(ll i=1;i<=n;i++)
{
if(b[i]==1)
{
if(a[i]%2==1)
ans++;
continue;
}
if(b[i]%2==0)
{
if((a[i]%(b[i]+1))%2==1||(a[i]%(b[i]+1))==b[i])
ans++;
}
else
{
if(a[i]%2==1)
ans++;
}
}
if(ans%2==0)
printf("Bob\n");
else
printf("Alice\n");
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3580kb
input:
2 10 3 7 4
output:
Bob
result:
ok "Bob"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3376kb
input:
16 903 5 246 38 884 12 752 10 200 17 483 6 828 27 473 21 983 35 953 36 363 35 101 3 34 23 199 8 134 2 932 28
output:
Alice
result:
ok "Alice"
Test #3:
score: 0
Accepted
time: 2ms
memory: 3556kb
input:
16 35 37 852 17 789 37 848 40 351 27 59 32 271 11 395 20 610 3 631 33 543 14 256 28 48 8 277 24 748 38 109 40
output:
Bob
result:
ok "Bob"
Test #4:
score: 0
Accepted
time: 13ms
memory: 4264kb
input:
44093 679258466 979122815 364581740 877180543 305876472 336784414 310018487 420673582 812521202 704056164 60062693 286928662 588815435 723319078 981049166 824574842 897082766 884032874 247411373 200440521 84262500 432750630 189259452 301263664 197298622 387145248 723440748 760643145 238879131 483683...
output:
Bob
result:
ok "Bob"
Test #5:
score: 0
Accepted
time: 16ms
memory: 4708kb
input:
85063 564008172 257920744 633272297 701838197 471686987 641838348 228859492 540258004 56505561 139640913 854162136 332000798 507456382 409385319 789502859 488436446 897725438 986424049 429961966 362468275 282488244 307453823 275299829 761727285 80847398 492268356 285949877 413249110 967253324 506476...
output:
Bob
result:
ok "Bob"
Test #6:
score: 0
Accepted
time: 3ms
memory: 3792kb
input:
15159 456584677 640277521 276143107 685180215 649075585 270537282 596902528 738645545 839972147 643037504 352251047 291433626 112937227 613588688 911566309 262040871 856222973 934273408 830154179 176350163 640698370 712767767 557998169 744090301 163499800 293191148 685184847 851723223 655450134 9985...
output:
Alice
result:
ok "Alice"
Test #7:
score: 0
Accepted
time: 21ms
memory: 4144kb
input:
48231 182707385 137433174 594770231 149145181 748334752 647490102 335683079 103970317 180717542 718138935 583023288 839873461 894406465 270918561 962434339 291863382 269465847 366854455 712451298 320121162 828658978 976574134 575940520 839810723 876261498 931184956 515355731 6181542 615897408 571214...
output:
Alice
result:
ok "Alice"
Test #8:
score: 0
Accepted
time: 9ms
memory: 4560kb
input:
62809 584293436 957099436 266017506 152226732 473836971 768061838 734880272 813114492 86633333 139016512 142619296 632196809 169797783 825687110 700757898 122816713 185786123 731723 282020983 731931960 53764374 769755561 685377305 274967213 316801839 185900552 185966629 349567496 446756487 709324061...
output:
Alice
result:
ok "Alice"
Test #9:
score: 0
Accepted
time: 4ms
memory: 4276kb
input:
44492 65343107 44321911 691578797 696021116 154583561 645242101 211763281 429555898 469338417 748890462 912243997 36890236 87369018 476782487 845323990 405217832 446346837 427480468 705104340 793271741 276600309 158247249 785441693 386236151 796961122 810741827 533009934 593531071 792165080 75882535...
output:
Bob
result:
ok "Bob"
Test #10:
score: 0
Accepted
time: 3ms
memory: 3532kb
input:
3914 796554757 29525069 370432669 514166377 471353563 497039554 653054657 149770907 891645174 897208935 246519123 619430338 332126004 101847049 189455668 919687663 267279090 490868089 942319373 325013064 911353541 123011941 624183033 454908953 569784196 702570244 156000473 525286237 164879042 323321...
output:
Alice
result:
ok "Alice"
Test #11:
score: 0
Accepted
time: 22ms
memory: 4744kb
input:
75690 454724351 178710608 910377695 108012771 364819754 828585456 989498258 632026188 237299508 760000672 614513924 499763122 276948607 411602894 192699663 469355517 324460193 564935682 269158034 760379305 922234231 909036701 178217479 126967944 792990184 93895874 69592602 575670956 615808543 298592...
output:
Alice
result:
ok "Alice"
Test #12:
score: 0
Accepted
time: 21ms
memory: 4932kb
input:
86339 989200133 347532530 802233532 911687664 569576824 433998302 521878665 383296946 97329693 613725587 161340313 195358984 557668279 841784029 409976290 465565000 843477295 935091905 416428670 511303159 719386390 173052578 393780803 690341649 985576564 159062802 67154362 772880749 824853753 373893...
output:
Bob
result:
ok "Bob"
Test #13:
score: 0
Accepted
time: 12ms
memory: 4540kb
input:
61586 304118216 651759202 93039670 536557828 310046067 370019591 242442519 100783442 520170552 895402107 472234868 329345710 866259683 615697451 778271738 594353145 639953689 285193422 493341484 939487888 805580616 334915985 242232377 406511194 526425765 84502673 128736157 302689975 877660393 589781...
output:
Bob
result:
ok "Bob"
Test #14:
score: 0
Accepted
time: 2ms
memory: 3580kb
input:
47 837 7 988 10 973 32 921 24 482 31 80 20 456 8 13 11 924 11 76 21 265 5 745 4 669 36 772 40 826 14 83 4 312 23 920 33 439 13 322 12 242 9 287 39 792 5 166 25 29 36 370 34 605 27 531 8 440 34 55 7 296 22 470 40 263 38 707 1 910 16 294 29 856 24 158 23 414 20 660 32 267 31 994 19 479 32 635 34 953 2...
output:
Bob
result:
ok "Bob"
Test #15:
score: 0
Accepted
time: 0ms
memory: 3492kb
input:
76 440 30 33 25 663 21 61 26 965 31 63 34 251 29 867 10 29 36 623 24 731 20 745 12 949 14 693 23 395 31 784 20 622 33 971 31 303 1 591 18 265 19 970 30 925 1 876 38 243 11 897 22 591 32 378 11 223 26 162 21 856 40 442 31 88 37 393 40 140 29 292 25 78 40 510 30 890 23 764 2 149 28 16 10 539 6 151 36 ...
output:
Bob
result:
ok "Bob"
Test #16:
score: -100
Wrong Answer
time: 2ms
memory: 3380kb
input:
39 888 15 884 11 879 6 33 8 447 31 206 30 325 21 102 29 805 35 48 24 475 38 322 5 50 37 414 20 623 30 841 13 808 6 122 2 182 28 488 38 282 18 844 9 804 1 509 2 142 32 370 8 695 34 234 4 507 25 823 22 840 10 49 26 651 39 759 15 313 26 81 20 162 13 553 7 23 19
output:
Bob
result:
wrong answer 1st words differ - expected: 'Alice', found: 'Bob'