QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#23005#2542. Destructive GameFudanU1#AC ✓25ms2012kbC++20820b2022-03-11 15:07:172022-04-30 00:39:30

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-04-30 00:39:30]
  • 评测
  • 测评结果:AC
  • 用时:25ms
  • 内存:2012kb
  • [2022-03-11 15:07:17]
  • 提交

answer

#include <stdio.h>
#include <algorithm>

using namespace std;

int n , k;
int sg[1200];
int ex[120];
int ans;
void work () {
	int i , j , a, b , now;
	/*k = 8;
	sg[0] = 0;
	printf ( "0 " );
	for ( i = 1 ; i <= 100 ; i++ ) {
		for ( j = 0 ; j <= 10 ; j++ ) ex[j] = 0;
		for ( j = 1 ; j <= i ; j = j * k ) {
			ex[sg[i-j]] = 1;
		}
		for ( j = 0 ; j <= 10 ; j++ ) {
			if ( ex[j] == 0 ) {
				sg[i] = j;
				break;
			}
		}
		printf ( "%d " , sg[i] );
	}*/
	scanf ( "%d" , &n );
	for ( i = 1 ; i <= n ; i++ ) {
		scanf ( "%d%d" , &a , &b );
		if ( b % 2 == 0 ) {
			now = a % (b+1);
			if ( now == b ) now = 2;
			else now = now % 2;
		}
		else now = a % 2;
		ans ^= now;
	}
	if ( ans == 0 ) printf ( "Bob\n" );
	else printf ( "Alice\n" );
}
int main () {
	work ();
	return 0;
}

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 1960kb

input:

2
10 3
7 4

output:

Bob

result:

ok "Bob"

Test #2:

score: 0
Accepted
time: 1ms
memory: 1804kb

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: 1ms
memory: 1824kb

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: 9ms
memory: 1772kb

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: 22ms
memory: 1808kb

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: 6ms
memory: 1968kb

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: 17ms
memory: 2012kb

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: 13ms
memory: 1772kb

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: 15ms
memory: 1772kb

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: 4ms
memory: 1708kb

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: 1808kb

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: 24ms
memory: 2008kb

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: 9ms
memory: 1824kb

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: 1ms
memory: 1964kb

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: 1824kb

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: 0
Accepted
time: 1ms
memory: 1764kb

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:

Alice

result:

ok "Alice"

Test #17:

score: 0
Accepted
time: 1ms
memory: 1768kb

input:

79
940 12
714 11
118 17
840 38
109 26
103 9
396 6
319 15
165 29
94 31
756 3
94 1
213 1
139 9
210 18
431 25
21 27
340 25
262 4
430 18
410 3
210 17
825 32
15 15
962 10
248 4
5 32
738 3
348 21
744 17
727 2
185 39
219 39
211 8
622 21
350 12
73 10
807 34
874 7
735 28
805 38
184 12
143 21
252 5
791 16
193...

output:

Bob

result:

ok "Bob"

Test #18:

score: 0
Accepted
time: 0ms
memory: 1768kb

input:

42
960 29
290 25
996 20
656 33
365 5
787 6
492 12
94 40
751 4
429 31
129 10
866 22
170 35
643 17
673 3
696 20
77 19
434 1
67 22
871 37
34 40
378 8
922 20
872 16
67 24
5 17
266 23
373 27
766 11
495 31
9 4
603 7
58 10
251 9
231 19
400 32
943 33
20 16
638 11
324 28
777 22
809 5

output:

Alice

result:

ok "Alice"

Test #19:

score: 0
Accepted
time: 1ms
memory: 1812kb

input:

97
720 36
65 14
17 30
37 8
671 10
456 34
764 18
742 3
358 22
790 1
995 35
905 26
374 7
319 37
843 3
248 11
122 2
371 4
459 14
71 3
759 34
739 27
503 9
36 27
556 5
91 36
858 4
592 4
753 21
495 27
753 16
277 35
561 4
247 5
524 34
207 29
514 38
733 15
518 30
638 19
721 34
451 20
306 11
664 15
575 17
58...

output:

Alice

result:

ok "Alice"

Test #20:

score: 0
Accepted
time: 1ms
memory: 1772kb

input:

44
397 22
280 21
413 29
139 13
970 21
1 32
276 4
691 3
853 39
97 21
688 14
579 30
959 37
624 40
737 38
902 21
886 20
239 32
976 35
797 32
1 35
938 22
531 4
422 7
152 11
413 37
622 18
188 1
974 21
48 27
82 1
492 2
849 7
557 38
320 38
699 18
302 31
814 40
684 34
706 29
95 29
945 11
427 21
724 13

output:

Bob

result:

ok "Bob"

Test #21:

score: 0
Accepted
time: 0ms
memory: 1768kb

input:

22
269 14
173 15
667 12
850 9
618 37
413 40
642 26
130 22
788 1
827 18
713 36
112 30
771 17
395 11
899 6
600 19
320 36
298 35
481 36
105 11
514 2
631 11

output:

Alice

result:

ok "Alice"

Test #22:

score: 0
Accepted
time: 1ms
memory: 1772kb

input:

91
557 25
316 23
215 35
993 7
992 12
496 22
465 33
600 40
359 13
648 35
55 6
538 40
544 11
762 35
313 9
983 37
936 21
957 19
612 28
69 15
8 6
642 20
229 40
984 16
866 25
818 26
819 5
72 18
907 5
772 40
487 7
591 20
448 17
365 21
92 9
498 21
530 16
423 33
625 30
357 39
556 39
373 8
115 26
417 4
657 1...

output:

Bob

result:

ok "Bob"

Test #23:

score: 0
Accepted
time: 0ms
memory: 1808kb

input:

64
468 1
516 1
857 31
124 1
882 28
172 23
419 9
7 26
337 25
888 34
309 38
4 1
793 10
4 30
763 16
851 30
934 13
510 23
360 13
649 34
727 14
990 12
68 27
760 18
569 22
854 38
118 14
858 10
687 40
361 8
506 29
862 27
29 8
743 38
908 34
601 31
704 28
576 40
827 40
286 18
375 29
188 13
766 5
318 33
988 4...

output:

Alice

result:

ok "Alice"

Test #24:

score: 0
Accepted
time: 0ms
memory: 1772kb

input:

34
917 32
681 26
989 22
374 9
814 4
683 9
164 32
614 13
830 29
319 10
387 32
504 4
671 38
929 6
642 40
774 17
694 23
829 28
364 18
255 1
537 7
827 17
306 5
721 13
633 7
626 5
258 37
545 14
439 37
198 20
979 15
759 24
543 29
243 10

output:

Alice

result:

ok "Alice"

Test #25:

score: 0
Accepted
time: 2ms
memory: 1764kb

input:

44
377 37
159 25
601 25
285 34
942 14
748 13
675 40
343 24
72 1
848 4
421 19
729 25
620 36
294 28
423 7
793 14
273 35
693 2
193 26
212 10
632 40
724 23
492 38
340 35
853 10
300 20
60 13
578 32
252 24
937 8
752 12
692 10
764 29
569 23
936 10
824 5
839 3
42 34
694 39
999 6
95 25
463 3
37 39
258 36

output:

Bob

result:

ok "Bob"

Test #26:

score: 0
Accepted
time: 1ms
memory: 1880kb

input:

98
687 4
735 29
846 32
840 39
511 21
660 36
140 6
71 22
339 18
306 13
616 28
564 4
763 30
772 37
822 14
512 12
974 19
133 32
747 16
852 38
749 6
61 32
485 1
803 35
781 1
956 38
221 40
571 22
747 27
339 22
670 18
506 28
831 1
727 15
877 9
74 20
164 1
807 40
208 13
783 32
660 33
867 28
161 23
781 18
6...

output:

Alice

result:

ok "Alice"

Test #27:

score: 0
Accepted
time: 1ms
memory: 1964kb

input:

50
458 12
52 15
565 35
12 9
743 25
260 33
479 38
257 23
43 37
219 27
68 27
661 11
727 23
111 26
344 17
366 24
66 32
998 2
569 35
302 38
912 35
785 38
949 28
837 30
746 31
564 3
320 37
720 11
252 10
380 3
371 3
789 24
234 21
215 37
733 20
636 22
897 4
759 31
798 24
967 5
628 37
23 38
438 25
66 31
492...

output:

Bob

result:

ok "Bob"

Test #28:

score: 0
Accepted
time: 1ms
memory: 1968kb

input:

27
313 2
452 9
544 10
866 13
693 26
615 20
602 23
248 28
412 30
724 20
870 26
941 17
266 20
457 35
285 9
197 2
102 5
405 10
547 5
650 13
71 34
960 31
836 33
27 21
841 24
838 15
40 3

output:

Alice

result:

ok "Alice"

Test #29:

score: 0
Accepted
time: 0ms
memory: 1884kb

input:

4191
876761276 526
3676535 525
955689436 653
18186629 737
148198748 623
380474299 736
186852235 957
199526663 647
711681153 93
778164297 79
431684521 619
122219540 599
733930776 337
331998324 549
359239521 404
335728833 578
401861699 264
343447486 22
689365971 667
923147239 850
11962505 529
80813275...

output:

Alice

result:

ok "Alice"

Test #30:

score: 0
Accepted
time: 0ms
memory: 1772kb

input:

87707
479839206 636
945890899 980
307654215 334
266390606 149
132528237 393
362445894 992
282197682 225
238440813 876
605094914 746
445077085 432
635953525 79
355738984 826
203063074 89
150071280 788
473688792 925
567223945 335
190442200 652
924903386 126
360827608 522
7401064 837
76941091 25
784591...

output:

Alice

result:

ok "Alice"

Test #31:

score: 0
Accepted
time: 15ms
memory: 1772kb

input:

55703
130382739 452
541731468 895
676169623 261
989786945 718
540408649 139
875852614 232
23190417 837
703668767 784
545210695 902
647095121 829
325166538 259
154611410 999
583870246 104
909074047 540
344093805 47
747732708 113
972828234 128
489735570 50
674710001 66
685543624 412
543392175 306
9609...

output:

Alice

result:

ok "Alice"

Test #32:

score: 0
Accepted
time: 3ms
memory: 1772kb

input:

39905
542636012 621
556844257 572
560560403 193
787906018 818
988482853 828
498310493 499
131142024 540
537935805 49
417833807 42
350190659 936
632087446 708
255700198 226
451741992 47
343734731 483
346410934 940
454140599 455
308404760 418
498436647 359
191257266 806
568831357 205
477400050 672
879...

output:

Alice

result:

ok "Alice"

Test #33:

score: 0
Accepted
time: 0ms
memory: 1768kb

input:

21783
569898907 325
803402414 569
734726441 503
710907018 212
677233141 960
233887336 516
678308740 476
824810230 574
183267322 66
453339564 183
345182289 299
576263217 846
173430070 34
290223090 876
19833640 788
120507656 498
883795674 7
438916047 590
15618272 29
803211173 555
916630914 471
6011409...

output:

Alice

result:

ok "Alice"

Test #34:

score: 0
Accepted
time: 25ms
memory: 1796kb

input:

95635
278067741 565
474082227 71
413276191 664
970623154 284
922986921 802
360591598 433
674206519 412
850709007 86
916035098 348
118482533 857
734486440 674
145147645 303
434161972 54
45667459 865
208386560 581
457518802 347
177860319 456
854891290 552
964577622 245
656173089 544
496859233 94
65264...

output:

Alice

result:

ok "Alice"

Test #35:

score: 0
Accepted
time: 14ms
memory: 1964kb

input:

53001
104172074 938
410903548 995
940850366 421
450039991 131
584734730 440
457117568 445
353319942 81
771772391 89
409533809 252
875293751 210
886102483 794
1746657 446
72768673 754
805799995 773
146266973 687
941132306 211
341835557 548
73594723 166
236498801 930
3913595 661
736936985 293
25393397...

output:

Alice

result:

ok "Alice"

Test #36:

score: 0
Accepted
time: 25ms
memory: 1776kb

input:

91538
932636792 824
8029555 165
99261373 274
379605657 671
771810947 587
303304698 941
390534123 993
702663690 182
644963026 733
807823672 31
273238301 26
382883759 142
315930139 787
58692341 886
653032437 855
978582452 255
101924420 180
235224982 241
495267261 156
20971849 533
61744903 710
50388957...

output:

Bob

result:

ok "Bob"

Test #37:

score: 0
Accepted
time: 3ms
memory: 1884kb

input:

2783
148731206 501
681269631 930
805636831 420
793319517 445
260525123 276
956292779 698
808768076 64
230607624 577
192546687 497
793026143 559
418698207 368
740135127 295
858886658 408
74089520 219
716682530 464
537525539 109
68152402 52
263296744 303
721434826 667
276655313 600
593901411 265
59895...

output:

Alice

result:

ok "Alice"

Test #38:

score: 0
Accepted
time: 9ms
memory: 1820kb

input:

32839
48200328 561
187739216 321
158980740 13
743242202 760
704413422 781
268286518 721
585775733 268
506813805 139
319653539 731
286168821 974
523446785 712
901817327 623
453103302 54
394958066 689
411924248 8
79378557 852
830395331 740
334379373 166
442465567 488
15077128 866
912892593 267
4908512...

output:

Alice

result:

ok "Alice"

Test #39:

score: 0
Accepted
time: 5ms
memory: 1772kb

input:

9744
113706350 2
404837175 2
238528625 3
826722518 10
307812120 5
4424165 1
39556498 5
98453689 5
175802278 8
366464282 4
570377356 10
149331111 8
218825320 3
934033894 3
349941092 10
758514156 2
426291304 7
292005 4
94963577 8
14250945 5
339251115 6
926173756 5
483740868 6
557749384 5
200979567 4
6...

output:

Bob

result:

ok "Bob"

Test #40:

score: 0
Accepted
time: 13ms
memory: 1708kb

input:

56504
865428069 6
322654079 3
506430941 5
289041608 2
285577619 2
918549745 8
135065507 2
648292311 6
987402380 5
321287204 6
25465159 1
556925299 7
523176308 3
892749750 7
884487112 9
916928947 6
841659103 10
756913604 6
298312411 3
740137128 7
463554921 4
472972676 6
60092914 3
817793241 10
923262...

output:

Alice

result:

ok "Alice"

Test #41:

score: 0
Accepted
time: 0ms
memory: 1776kb

input:

3713
101723621 3
793949948 1
821953737 4
461165663 3
702067735 6
279803954 5
957918944 8
635103251 8
112942224 5
378284969 6
247156956 5
184876814 9
453947584 4
865630553 3
389394704 6
981308360 6
350953661 4
799512458 9
408559783 9
971287591 8
717813529 8
1667725 8
421139174 1
199145144 9
165221917...

output:

Alice

result:

ok "Alice"

Test #42:

score: 0
Accepted
time: 17ms
memory: 1820kb

input:

72115
199641623 1
412998520 7
435120919 2
822052970 9
188795682 7
325512949 8
479343558 9
809747099 10
177444382 7
345139781 4
653372915 1
8121574 7
948576697 4
414138229 8
573104472 6
233911170 4
92591704 10
765105302 5
189963037 6
29902635 10
97935535 8
997802167 10
368454551 9
627776904 4
5441735...

output:

Alice

result:

ok "Alice"

Test #43:

score: 0
Accepted
time: 13ms
memory: 1824kb

input:

71572
696782092 9
140079858 5
225855108 7
766622823 4
395779913 4
842358459 10
291432983 10
487484169 3
55445519 8
893579460 2
277876356 7
6126479 7
202622819 8
623969468 2
434394172 7
973741662 6
516087793 8
452484108 1
804038906 3
18686261 4
80710738 4
181010715 7
90463489 6
665438830 3
756117063 ...

output:

Bob

result:

ok "Bob"

Test #44:

score: 0
Accepted
time: 9ms
memory: 1824kb

input:

37495
329349296 2
720243714 4
656460396 10
269546505 3
213275476 3
527667408 3
426976464 9
187575721 2
622068825 8
258378151 5
547208902 7
836375642 10
543371695 7
560874654 6
138203922 3
481311446 5
277129979 7
82340259 6
237110734 6
996408382 9
153805108 4
233882232 4
45444000 1
11372107 5
6472782...

output:

Bob

result:

ok "Bob"

Test #45:

score: 0
Accepted
time: 3ms
memory: 1708kb

input:

35979
807412706 4
45057291 3
399251794 2
769197495 4
665384724 4
121199223 2
445028892 4
208318861 2
279359925 6
947048095 9
91276006 3
124569578 1
474499057 2
304047254 7
53464053 10
573134884 3
229410483 5
581254251 5
388007981 6
56754781 10
451097229 9
689402007 10
686856000 10
9522329 5
23227328...

output:

Alice

result:

ok "Alice"

Test #46:

score: 0
Accepted
time: 11ms
memory: 1824kb

input:

84202
303280868 5
518597390 6
948736539 3
395981994 4
201031346 8
1757088 1
441756924 2
365360111 6
721653042 4
332114346 8
347678728 5
219405524 4
88364647 3
883881207 3
115243596 5
362446479 4
728657551 7
841219971 7
912014083 4
301837225 10
118457691 5
715140057 8
343920349 10
431222446 1
3241535...

output:

Alice

result:

ok "Alice"

Test #47:

score: 0
Accepted
time: 11ms
memory: 1764kb

input:

42025
268141594 8
124970280 3
59740387 9
86331981 1
416737252 5
445097491 1
649175438 5
33838846 2
742883238 4
32834431 2
134344062 2
504695390 10
635717519 6
323605620 8
380234064 8
763539789 7
13937710 6
620174447 8
631413082 2
671081128 2
354105323 6
472085561 4
18863162 1
823544013 4
431914020 5...

output:

Bob

result:

ok "Bob"

Test #48:

score: 0
Accepted
time: 8ms
memory: 1772kb

input:

24185
83999484 4
524211874 2
127544542 10
728472231 4
609322719 7
869441931 8
339336143 8
211654480 2
84476450 3
933832793 9
47963152 4
959713025 2
975320255 1
176788781 5
934967283 8
940952872 1
879310690 5
332542638 5
958958351 1
493039873 7
273854879 4
889954242 9
907357862 10
464450974 10
902554...

output:

Alice

result:

ok "Alice"