QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#831238#8722. 卡牌游戏JEdward#AC ✓224ms34632kbC++201.5kb2024-12-25 12:08:492024-12-25 12:08:50

Judging History

你现在查看的是最新测评结果

  • [2024-12-25 12:08:50]
  • 评测
  • 测评结果:AC
  • 用时:224ms
  • 内存:34632kb
  • [2024-12-25 12:08:49]
  • 提交

answer

#include <bits/stdc++.h>
#define IOS ios::sync_with_stdio(0), cin.tie(0)
#define int long long
#define endl '\n'
#define lowbit(x) (x)&(-x)
#define pii pair<int,int>
#define all(s) s.begin(), s.end()
#define ls(x) (x<<1)
#define rs(x) (x<<1|1) 
#define here system("pause")
using namespace std;

const int N = 5e6+5;
const int mod = 998244353;
const int INF = 1e15+7;
const double eps = 1e-6;
inline int pow(int a, int b, int p){ int res = 1%p; while(b){ if(b&1) res=res*a%p; a=a*a%p, b>>=1;} return res;}
inline int inv(int a, int p){ return pow(a,p-2,p)%p;}

int n;
inline bool check(vector<int> &a, vector<int> &b){
	vector<int> c(n), op(n);
	int mxc = -1, mxn = -1;
	for(int i=0;i<n;i++){
		c[i] = min(a[i], b[i]);
		mxc = max(mxc, c[i]);
		if(a[i] > b[i]) op[i] = 1;
		else if(a[i] == b[i]) op[i] = 0;
		else op[i] = -1;
		if(op[i]==-1) mxn = max(mxn, c[i]);
	}
	
	for(int i=0;i<n;i++){
		if(c[i]==mxc && op[i]==-1) return true;
	}
	
	int cnt = count(all(c), mxc);
	if(cnt>1) return false; 
	
	for(int i=0;i<n;i++){
		if(c[i]==mxc && op[i]==0) return true;
	}
	
	if(mxn==-1) return false;
	cnt = 0;
	for(int i=0;i<n;i++){
		if(c[i] > mxn) ++cnt;
		if(cnt>1) return false;
	}
	return true;
}

inline void sol(){
	cin >> n;
	vector<int> a(n), b(n);
	for(auto &i:a) cin >> i;
	for(auto &i:b) cin >> i;
	if(check(a, b)) cout << "Alice\n";
	else cout << "Bob\n";
}

signed main(){
	IOS;
	int tc = 1;
	cin >> tc;
	while(tc--){
		sol();
	}
	return 0;
}

这程序好像有点Bug,我给组数据试试?

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3612kb

input:

5
1
100
100
2
1 1
1 1
2
1 1
0 1
3
1 1 4
5 1 4
10
116 104 101 114 101 32 97 114 101 32
102 105 118 101 32 99 97 115 101 115

output:

Alice
Bob
Alice
Alice
Alice

result:

ok 5 lines

Test #2:

score: 0
Accepted
time: 221ms
memory: 3780kb

input:

1000000
1
901418150
815121916
1
455099013
31761433
1
46418945
11466871
1
709189476
658667824
1
977821005
511405192
1
843598992
501074199
1
638564514
680433292
1
994431111
584582554
1
452689372
642414314
1
863578235
135133204
1
438404803
67246919
1
492858783
447116205
1
723252212
948645336
1
19105046...

output:

Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Alice
Bob
Bob
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Alice
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Alic...

result:

ok 1000000 lines

Test #3:

score: 0
Accepted
time: 182ms
memory: 3564kb

input:

500000
2
373642622 454169042
952441803 417874927
2
71762287 551454259
538969462 292052813
2
531091498 645143315
755275238 984088455
2
936400451 948257592
457379982 873148501
2
45309968 731348143
181471857 558039453
2
931056469 394825335
620380282 26893900
2
69376673 489359332
614858046 635100016
2
5...

output:

Alice
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alic...

result:

ok 500000 lines

Test #4:

score: 0
Accepted
time: 163ms
memory: 3560kb

input:

333334
3
255932511 789675559 760669141
384728982 140424908 361439344
3
393719043 379329282 446687639
515372386 704177992 688441074
3
939269095 492018656 596461367
570763162 161714447 384092911
3
304150759 350079205 296791887
54574629 804917425 311704304
3
120533843 787668201 243944555
281070757 3118...

output:

Alice
Alice
Bob
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Al...

result:

ok 333334 lines

Test #5:

score: 0
Accepted
time: 159ms
memory: 3612kb

input:

250000
4
433189692 125182076 154608701 309612754
522048869 157942182 257538154 148757376
4
932599775 953264671 532072322 109408648
243015330 466422620 347709852 523909322
4
779016547 171920667 474134651 198758440
218117745 477480878 358050786 891482000
4
835254525 380944361 650059555 954568851
94728...

output:

Alice
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Bob
Bob
Alice
Bob
Bob
Alice
Bob
Alice
Alice
Alice
...

result:

ok 250000 lines

Test #6:

score: 0
Accepted
time: 151ms
memory: 3500kb

input:

200000
5
315479581 124252105 179952043 446844829 780837560
954336048 880492165 785040744 77109657 486885376
5
754808995 829908259 358202421 330167945 449755992
539371459 461093031 812475269 420738799 974016054
5
893157388 27096064 181378986 679253230 392611044
911184149 544888624 949932667 633194309...

output:

Alice
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Bob
Bob
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Bob
Alice
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Alice
Bob
...

result:

ok 200000 lines

Test #7:

score: 0
Accepted
time: 149ms
memory: 3612kb

input:

166667
6
787704054 754725914 573891604 657705832 629075344 187757098
796688644 561572949 312543334 300429230 435788130 22385714
6
464180683 270559705 512723125 317525900 680776345 929062617
238039721 101041215 959796342 765518522 95721291 124666319
6
937568865 977562099 503758752 600693233 482891755...

output:

Alice
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Bob
Bob
Alice
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Bob
...

result:

ok 166667 lines

Test #8:

score: 0
Accepted
time: 142ms
memory: 3560kb

input:

142858
7
669993943 458828651 599234946 205003324 182345837 989301423 762016619
565412311 579090223 208642144 933814220 974625469 726738333 720019121
7
224386186 105343720 185295808 99799082 536061877 283693326 275870967
389607162 162417396 598490187 648854654 114509431 282358088 913068064
7
61490646...

output:

Bob
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Bob
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Alice
Bob
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Al...

result:

ok 142858 lines

Test #9:

score: 0
Accepted
time: 143ms
memory: 3780kb

input:

125000
8
552283832 89302459 288141798 710831619 30583621 790845747 59852554 136743470
997699491 301640204 31112026 862166501 218495514 504719880 128369591 678173109
8
656495120 758098425 223854527 69432210 629817788 942776057 357457949 583254104
701474939 389992655 907020724 399319835 579974579 9262...

output:

Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Bob
Bob
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Bob
Al...

result:

ok 125000 lines

Test #10:

score: 0
Accepted
time: 141ms
memory: 3616kb

input:

111112
9
729541013 88372488 682081360 258129110 878821407 297422778 62721199 90569951 839050299
135019377 319157478 558614617 790518782 167398268 577668719 315381698 966739056 904095993
9
625868334 11473484 971398763 680974958 241084925 468605657 443130759 238053542 472276082
181495123 460154086 979...

output:

Alice
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Alice
Bob
Alice
Alice
Al...

result:

ok 111112 lines

Test #11:

score: 0
Accepted
time: 149ms
memory: 3568kb

input:

100000
10
805513144 16228409 293487744 138613792 904651590 443174087 579288498 179297759 92837851 983905980
38998401 266085559 471510400 649258082 244678415 503924246 219903162 762760972 728185679 299473031
10
832979751 172561293 280283392 787972981 793926222 737031746 557170071 125596289 496666505 ...

output:

Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Al...

result:

ok 100000 lines

Test #12:

score: 0
Accepted
time: 121ms
memory: 3508kb

input:

10000
100
258451417 131461228 90882155 515132461 142193666 268703262 438399665 496441726 272155240 488884603 434294700 46665933 85686327 427508332 924703210 940706911 435760562 530430234 883161948 143892 380020584 457415756 724899860 153927087 496191785 779583285 610659939 499798744 516835198 856344...

output:

Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Bob
Bob
Alice
...

result:

ok 10000 lines

Test #13:

score: 0
Accepted
time: 123ms
memory: 3652kb

input:

1000
1000
818764393 365785354 182329463 505722718 170434181 271553309 682902243 969587436 357926604 726853357 365462194 450888086 623408110 207066774 856645299 759038423 7909179 766781340 606491108 870056833 795101174 962703326 886499707 948293516 722050066 121757393 790355795 935584955 699241546 10...

output:

Alice
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
...

result:

ok 1000 lines

Test #14:

score: 0
Accepted
time: 114ms
memory: 3752kb

input:

100
10000
134585047 198253791 832787942 379503394 759930568 78098848 856344096 687752429 955359447 604231866 633132058 917017611 871376871 690456996 647742795 662264486 595368882 913081962 176310084 166738544 140290705 677038583 562494362 872653067 941311074 417588015 273081597 220145645 394812742 6...

output:

Bob
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Al...

result:

ok 100 lines

Test #15:

score: 0
Accepted
time: 132ms
memory: 6484kb

input:

10
100000
695714444 813918810 630808478 11366687 728101884 313790123 336178036 917835491 75687191 293774105 312834569 474048791 468299389 799170568 641239437 339199025 438895973 600678429 484096403 877169248 36096533 155063171 926295418 785171522 468066843 779290770 735443817 505563889 804173005 698...

output:

Alice
Alice
Alice
Bob
Bob
Alice
Alice
Bob
Bob
Bob

result:

ok 10 lines

Test #16:

score: 0
Accepted
time: 128ms
memory: 34236kb

input:

1
1000000
810947263 242717000 7327146 838843348 890067548 804305071 21918222 802185588 285698523 895089055 186939209 279451727 107834740 929947555 476318383 586385736 770100990 987173872 722315109 224531103 794320253 495864614 140786321 632520516 958019853 519002273 560006689 126550712 433800823 503...

output:

Bob

result:

ok single line: 'Bob'

Test #17:

score: 0
Accepted
time: 75ms
memory: 34244kb

input:

1
1000000
1 0 1 0 0 1 0 0 0 1 1 1 0 1 1 0 1 1 1 1 1 0 1 1 0 1 0 0 1 1 0 0 0 1 1 1 1 1 1 1 1 0 1 0 1 0 0 0 1 0 1 0 1 0 1 0 0 1 0 1 0 0 1 1 1 0 1 1 0 0 0 1 1 1 1 1 0 0 1 1 0 1 0 1 0 0 1 1 0 0 0 1 0 1 1 0 1 0 1 0 1 0 1 0 0 0 0 1 1 1 1 1 0 0 0 1 0 0 1 0 1 0 1 0 1 1 0 1 1 0 1 0 1 1 1 1 0 1 0 1 0 0 1 0 0 ...

output:

Bob

result:

ok single line: 'Bob'

Test #18:

score: 0
Accepted
time: 75ms
memory: 34216kb

input:

1
1000000
2 1 1 0 0 2 0 1 0 2 2 1 1 0 1 0 2 2 0 2 0 0 1 0 2 2 1 1 2 2 0 2 2 2 1 0 0 2 0 1 1 2 0 2 2 0 2 1 1 0 0 1 1 2 2 2 0 2 2 1 2 2 0 1 2 0 0 2 2 1 2 1 1 0 2 1 2 0 0 2 0 2 0 0 0 0 1 0 2 1 1 1 0 2 1 0 1 0 2 1 2 0 2 0 0 0 2 2 0 0 1 1 0 2 2 0 0 0 2 2 0 2 0 2 2 1 1 2 2 2 1 2 1 2 2 1 1 0 2 1 1 0 1 1 2 ...

output:

Bob

result:

ok single line: 'Bob'

Test #19:

score: 0
Accepted
time: 83ms
memory: 3560kb

input:

123836
1
1
1
2
0 1
0 1
2
0 1
1 0
2
0 1
1 1
2
1 0
0 1
2
1 0
1 0
2
1 0
1 1
2
1 1
0 1
2
1 1
1 0
2
1 1
1 1
3
0 0 1
0 0 1
3
0 0 1
0 1 0
3
0 0 1
0 1 1
3
0 0 1
1 0 0
3
0 0 1
1 0 1
3
0 0 1
1 1 0
3
0 0 1
1 1 1
3
0 1 0
0 0 1
3
0 1 0
0 1 0
3
0 1 0
0 1 1
3
0 1 0
1 0 0
3
0 1 0
1 0 1
3
0 1 0
1 1 0
3
0 1 0
1 1 1
3...

output:

Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Al...

result:

ok 123836 lines

Test #20:

score: 0
Accepted
time: 82ms
memory: 3776kb

input:

178944
1
1
1
1
1
2
1
2
1
1
2
2
2
0 1
0 1
2
0 1
0 2
2
0 1
1 0
2
0 1
1 1
2
0 1
1 2
2
0 1
2 0
2
0 1
2 1
2
0 1
2 2
2
0 2
0 1
2
0 2
0 2
2
0 2
1 0
2
0 2
1 1
2
0 2
1 2
2
0 2
2 0
2
0 2
2 1
2
0 2
2 2
2
1 0
0 1
2
1 0
0 2
2
1 0
1 0
2
1 0
1 1
2
1 0
1 2
2
1 0
2 0
2
1 0
2 1
2
1 0
2 2
2
1 1
0 1
2
1 1
0 2
2
1 1
1 0...

output:

Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
...

result:

ok 178944 lines

Test #21:

score: 0
Accepted
time: 78ms
memory: 3596kb

input:

214734
1
1
1
1
1
2
1
1
3
1
2
1
1
2
2
1
2
3
1
3
1
1
3
2
1
3
3
2
0 1
0 1
2
0 1
0 2
2
0 1
0 3
2
0 1
1 0
2
0 1
1 1
2
0 1
1 2
2
0 1
1 3
2
0 1
2 0
2
0 1
2 1
2
0 1
2 2
2
0 1
2 3
2
0 1
3 0
2
0 1
3 1
2
0 1
3 2
2
0 1
3 3
2
0 2
0 1
2
0 2
0 2
2
0 2
0 3
2
0 2
1 0
2
0 2
1 1
2
0 2
1 2
2
0 2
1 3
2
0 2
2 0
2
0 2
2 1...

output:

Alice
Alice
Alice
Bob
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
...

result:

ok 214734 lines

Test #22:

score: 0
Accepted
time: 88ms
memory: 3596kb

input:

254144
1
1
1
1
1
2
1
1
3
1
1
4
1
2
1
1
2
2
1
2
3
1
2
4
1
3
1
1
3
2
1
3
3
1
3
4
1
4
1
1
4
2
1
4
3
1
4
4
2
0 1
0 1
2
0 1
0 2
2
0 1
0 3
2
0 1
0 4
2
0 1
1 0
2
0 1
1 1
2
0 1
1 2
2
0 1
1 3
2
0 1
1 4
2
0 1
2 0
2
0 1
2 1
2
0 1
2 2
2
0 1
2 3
2
0 1
2 4
2
0 1
3 0
2
0 1
3 1
2
0 1
3 2
2
0 1
3 3
2
0 1
3 4
2
0 1
4...

output:

Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Bob
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Al...

result:

ok 254144 lines

Test #23:

score: 0
Accepted
time: 88ms
memory: 3612kb

input:

262187
1
1
1
1
1
2
1
1
3
1
1
4
1
1
5
1
2
1
1
2
2
1
2
3
1
2
4
1
2
5
1
3
1
1
3
2
1
3
3
1
3
4
1
3
5
1
4
1
1
4
2
1
4
3
1
4
4
1
4
5
1
5
1
1
5
2
1
5
3
1
5
4
1
5
5
2
0 1
0 1
2
0 1
0 2
2
0 1
0 3
2
0 1
0 4
2
0 1
0 5
2
0 1
1 0
2
0 1
1 1
2
0 1
1 2
2
0 1
1 3
2
0 1
1 4
2
0 1
1 5
2
0 1
2 0
2
0 1
2 1
2
0 1
2 2
2
0...

output:

Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Bob
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Al...

result:

ok 262187 lines

Test #24:

score: 0
Accepted
time: 142ms
memory: 3620kb

input:

140974
1
981241784
985495911
1
381983544
381983544
1
742839650
603202993
2
683536728 0
0 830012704
2
0 620715140
211047202 642526535
2
0 776943391
902236202 776943391
2
0 968124432
430302156 748936590
2
0 777548137
0 871216897
2
310832284 0
310832284 0
2
0 859186255
0 752655474
2
303238506 864307428...

output:

Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Alice
...

result:

ok 140974 lines

Test #25:

score: 0
Accepted
time: 224ms
memory: 3532kb

input:

1000000
1
167959138
554064814
1
634074577
634074577
1
740396294
740396294
1
688126016
579721197
1
995635483
971207867
1
268792717
909069041
1
16843337
16843337
1
691952767
691952767
1
821102242
787375311
1
624307064
519096229
1
762263553
939216595
1
314525141
274667940
1
155191458
155191458
1
939835...

output:

Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Bob
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Bob
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Bob
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Bob
Alice
Bob
...

result:

ok 1000000 lines

Test #26:

score: 0
Accepted
time: 185ms
memory: 3616kb

input:

500000
2
641009858 378059044
754176802 54748095
2
829588567 486340885
453189533 453189533
2
710156468 521365643
710156468 521365643
2
945650732 796517759
889676591 587186696
2
919802025 135993560
255361534 789063608
2
787290244 996416746
787290244 999203117
2
992472518 988895276
988895276 988895276
...

output:

Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alic...

result:

ok 500000 lines

Test #27:

score: 0
Accepted
time: 180ms
memory: 3592kb

input:

333334
3
374288890 605792134 923264236
374288890 524125986 998832258
3
773363570 319728746 773363570
773363570 319728746 773363570
3
931759704 155605776 733781507
931759704 695566903 733781507
3
985394892 14483681 188451995
981010587 14483681 188451995
3
190264756 31800643 981882660
486639062 396754...

output:

Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alic...

result:

ok 333334 lines

Test #28:

score: 0
Accepted
time: 166ms
memory: 3560kb

input:

250000
4
702209410 673102148 561219906 703675693
983409620 975248668 561219906 496813080
4
791665077 204759511 949281063 556880351
773483968 920543998 773483968 173191161
4
645351347 333165289 726980719 951567551
645351347 333165289 892953046 951567551
4
667464877 534432523 987440516 852500795
86664...

output:

Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alic...

result:

ok 250000 lines

Test #29:

score: 0
Accepted
time: 153ms
memory: 3776kb

input:

200000
5
365329220 412106894 719810572 775215571 585325538
948292271 529246094 291882088 564718672 617656864
5
930919905 966026535 593942769 485781287 480642951
930919905 930919905 737224331 485781287 480642951
5
29599936 288981802 366732947 108887128 479275453
864102377 288981802 696500051 38702637...

output:

Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alic...

result:

ok 200000 lines

Test #30:

score: 0
Accepted
time: 148ms
memory: 3776kb

input:

166667
6
544067925 58376258 149014674 643910769 854382513 902981666
590600926 58376258 5887447 643910769 757703053 949645368
6
786384356 750617509 625758293 352339447 972029786 998954570
299554306 704626516 558225302 435571584 944638774 944638774
6
405752008 976807342 996654170 855626498 43451391 59...

output:

Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alic...

result:

ok 166667 lines

Test #31:

score: 0
Accepted
time: 129ms
memory: 3560kb

input:

142858
7
941492386 901882176 449924897 191845387 72235421 378192987 592684635
977714571 783332531 791815302 147499871 72235421 378192987 592684635
7
335796175 439482551 958764925 638740574 585501312 580852651 447934223
335796175 774029075 638740574 638740574 871651714 580852651 447934223
7
594004383...

output:

Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alic...

result:

ok 142858 lines

Test #32:

score: 0
Accepted
time: 138ms
memory: 3652kb

input:

125000
8
43705450 940751562 824608514 317463342 432130708 734420022 652509536 513994712
598265148 955245756 937083758 317463342 432130708 687041818 652509536 816393258
8
37078564 940587749 488853995 5333883 369138692 634521086 448899208 873236001
37078564 873236001 534181928 5333883 588403506 283843...

output:

Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alic...

result:

ok 125000 lines

Test #33:

score: 0
Accepted
time: 144ms
memory: 3568kb

input:

111112
9
539624190 279200010 514300406 30225806 2691938 794839341 805996363 976609485 631858790
750472966 669461301 514300406 258674220 532310510 752268029 782710196 998066877 631858790
9
375836693 77258751 507704624 823775843 997421611 562810006 144383291 228097971 997421611
567878628 77258751 1499...

output:

Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alic...

result:

ok 111112 lines

Test #34:

score: 0
Accepted
time: 144ms
memory: 3812kb

input:

100000
10
598196517 845687802 402690753 799843966 640274070 308675127 704501956 796619137 96204861 983359970
598196517 802030517 402690753 799843966 892305265 71550120 446173606 868232868 96204861 999849942
10
788357783 722058108 956277742 915440633 997679405 999688356 561180608 489714477 653492209 ...

output:

Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alic...

result:

ok 100000 lines

Test #35:

score: 0
Accepted
time: 123ms
memory: 3844kb

input:

10000
100
815029984 806991557 191896352 996397393 346366756 45567030 904642052 567289721 945425589 969494380 987227892 703994497 982181335 886685062 161589319 999317549 953465931 472766327 680005634 933943790 841600613 929975197 930749192 8974912 585777736 361389939 976354008 718369995 383641568 592...

output:

Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alic...

result:

ok 10000 lines

Test #36:

score: 0
Accepted
time: 122ms
memory: 3592kb

input:

1000
1000
588268819 281756520 254479299 293805749 893636208 717594857 5562515 313020910 162407522 244297381 947171903 270736081 187138688 211187093 915733731 805015704 941848976 31580595 689936857 998683595 701596464 569143805 911667040 380003816 802508527 22148865 296662468 875743375 581777534 9442...

output:

Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alic...

result:

ok 1000 lines

Test #37:

score: 0
Accepted
time: 124ms
memory: 3624kb

input:

100
10000
985886088 948100718 372908178 346111903 571722101 570176307 786335662 828652499 892401055 811113156 724884014 667709989 394754016 69640698 484583183 255992112 519154371 971028122 154635535 798346447 954957873 721932670 539565632 697851020 568168625 701569965 687918598 995574961 976174651 9...

output:

Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alic...

result:

ok 100 lines

Test #38:

score: 0
Accepted
time: 121ms
memory: 6528kb

input:

10
100000
558917837 662587440 967184011 491231200 122786146 725828083 874894884 432961667 90259530 638952385 64059365 962951442 591348536 888328450 410678028 734214384 700301748 892045501 206346974 42657863 372564666 786497866 863249002 807809285 150569984 364109904 763931335 920397029 933956634 679...

output:

Alice
Bob
Alice
Bob
Alice
Alice
Bob
Alice
Bob
Alice

result:

ok 10 lines

Test #39:

score: 0
Accepted
time: 123ms
memory: 34220kb

input:

1
1000000
995139578 764668713 140748807 562205672 284567552 934054142 666119952 35545719 332166636 774551678 471338364 741252579 445163978 927438915 636525962 192847925 841031854 928905560 770250500 559799144 856084184 994055998 509206732 102720981 511241483 968663780 960465318 979234726 27807466 46...

output:

Alice

result:

ok single line: 'Alice'

Test #40:

score: 0
Accepted
time: 128ms
memory: 34400kb

input:

1
1000000
865002199 34280120 249179834 519400626 71374404 979126812 922090433 826649702 800060888 255637330 747510272 571436019 208613385 638742842 535442752 497405162 876469525 582668728 688519320 67583037 648772481 953308453 32981209 951726194 170133489 138468774 875361273 501503320 376415699 9408...

output:

Bob

result:

ok single line: 'Bob'

Test #41:

score: 0
Accepted
time: 129ms
memory: 34632kb

input:

1
1000000
804468714 103717839 542423602 390382323 473147116 961278978 745628816 716059160 700463912 755488283 942147527 731911196 2861497 463676523 749820198 390271018 748931988 434226259 242072748 201592048 561837963 535651515 757562651 439380202 288281754 794521740 988547826 637139550 312389304 66...

output:

Alice

result:

ok single line: 'Alice'

Test #42:

score: 0
Accepted
time: 126ms
memory: 34396kb

input:

1
1000000
852926392 885664294 517964335 535939706 248350797 122078490 322667459 894715985 421065617 846900822 55700438 527703276 947708631 15186980 792794511 444456999 441312699 775644293 860186026 954989898 914184400 77253565 577404637 701539786 659185185 225037261 608252205 435434598 264460825 935...

output:

Bob

result:

ok single line: 'Bob'

Test #43:

score: 0
Accepted
time: 128ms
memory: 34260kb

input:

1
1000000
167272076 126748690 812088791 10182258 459414560 261244852 663318159 613027170 634559327 983582198 51862101 583752070 944794703 801942367 867331243 408147 647284304 628671912 634369469 163154455 244867735 196530760 775190797 584231509 758956393 835195952 525699786 870261366 330670086 89086...

output:

Alice

result:

ok single line: 'Alice'

Extra Test:

score: 0
Extra Test Passed