QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#876496#9685. nim 游戏Milmon28 1487ms37864kbC++173.2kb2025-01-30 22:10:412025-01-30 22:10:43

詳細信息

Subtask #1:

score: 2
Acceptable Answer

Test #1:

score: 2
Acceptable Answer
time: 14ms
memory: 3840kb

input:

1 10000
2 1
324097321 555675086
2 1
304655177 991244276
2 1
9980291 383616352
2 1
1071036550 795625380
2 1
682098056 68370721
2 1
969101726 685975156
2 1
973896269 354857775
2 1
196188000 606494155
2 1
754416123 467588829
2 1
495704303 558090120
2 1
618002000 491488050
2 1
741575237 9937018
2 1
1002...

output:

231577765
0
686589099
0
373636061
0
275411170
0
613727335
0
283126570
0
619038494
0
410306155
0
286827294
0
62385817
0
126513950
0
731638219
0
130065995
0
295114692
0
301034148
0
338094653
0
290055064
0
616102407
0
683296497
0
58868131
0
408003947
0
892535230
0
212031631
0
386722635
0
655774471
0
55...

result:

points 0.5 right answer but not right solutions at 1th solution

Subtask #2:

score: 6
Acceptable Answer

Test #2:

score: 6
Acceptable Answer
time: 0ms
memory: 3840kb

input:

2 5
5 2000
0 13 3 4 10
5 2000
0 3 9 1 11
5 2000
0 13 7 3 5
5 2000
0 1 13 9 2
5 2000
0 8 14 7 13

output:

0
0
0
0
2
0
3
0
2
0

result:

points 0.5 right answer but not right solutions at 1th solution

Test #3:

score: 6
Acceptable Answer
time: 0ms
memory: 3840kb

input:

2 5
5 2000
0 4 14 5 7
5 2000
0 2 15 0 12
5 2000
0 1 14 0 5
5 2000
0 13 4 12 3
5 2000
0 10 10 1 11

output:

6
0
1
0
8
0
2
0
10
0

result:

points 0.5 right answer but not right solutions at 1th solution

Test #4:

score: 6
Acceptable Answer
time: 0ms
memory: 3840kb

input:

2 5
5 2000
0 6 15 10 1
5 2000
0 15 0 13 10
5 2000
0 5 7 5 1
5 2000
0 13 3 2 15
5 2000
0 2 4 7 0

output:

2
0
8
0
4
0
1
0
1
0

result:

points 0.5 right answer but not right solutions at 1th solution

Subtask #3:

score: 6
Acceptable Answer

Dependency #2:

50%
Acceptable Answer

Test #5:

score: 6
Acceptable Answer
time: 0ms
memory: 4096kb

input:

3 5
6 2000
0 45 517 811 107 132
6 2000
0 382 576 805 419 579
6 2000
0 379 809 441 331 67
6 2000
0 565 776 959 852 383
6 2000
0 613 383 829 47 441

output:

146
0
179
0
267
0
27
0
197
0

result:

points 0.5 right answer but not right solutions at 1th solution

Test #6:

score: 6
Acceptable Answer
time: 1ms
memory: 3968kb

input:

3 5
6 2000
0 75 173 555 637 905
6 2000
0 934 118 906 367 728
6 2000
0 244 321 598 625 469
6 2000
0 573 489 24 480 459
6 2000
0 424 356 750 623 871

output:

557
0
195
0
69
0
33
0
204
0

result:

points 0.5 right answer but not right solutions at 1th solution

Test #7:

score: 6
Acceptable Answer
time: 0ms
memory: 4096kb

input:

3 5
6 2000
0 886 972 226 813 407
6 2000
0 219 190 742 101 572
6 2000
0 590 423 516 1017 46
6 2000
0 388 807 207 205 647
6 2000
0 408 180 238 300 694

output:

176
0
36
0
466
0
24
0
156
0

result:

points 0.5 right answer but not right solutions at 1th solution

Subtask #4:

score: 0
Time Limit Exceeded

Test #8:

score: 6
Acceptable Answer
time: 267ms
memory: 33700kb

input:

4 257
100000 100
32768 65536 262144 32768 8388608 1048576 4 67108864 16384 32768 262144 8192 512 134217728 65536 4194304 262144 67108864 1024 262144 64 32 65536 2097152 268435456 1 2048 4194304 16777216 8 16384 2 2048 16777216 268435456 262144 1048576 8388608 16 268435456 2 128 4194304 262144 32768 ...

output:

303389274
0
1
0
188156
0
5
0
7388192
0
1044482
0
483
0
37979676
0
2897896
0
12592895
0
96
0
124
0
10447
0
4
0
6321
0
35
0
12582912
0
112
0
1163266
0
0
0
4730
0
276
0
80
0
66558
0
1957856
0
9310311
0
2893824
0
14
0
332222
0
3334016
0
3731840
0
1002
0
40994
0
58
0
6291456
0
1187069
0
124
0
2
0
260192
...

result:

points 0.5 right answer but not right solutions at 1th solution

Test #9:

score: 6
Acceptable Answer
time: 1487ms
memory: 37864kb

input:

4 266
100000 100
134217728 524288 8388608 4 8 8388608 33554432 4 536870912 4 16 8 33554432 33554432 256 65536 8 16 64 8 256 2048 268435456 256 8192 2 1024 65536 32 2048 134217728 8 1048576 8 16777216 33554432 1024 33554432 131072 16 2 33554432 8192 512 4194304 2048 268435456 256 536870912 16777216 1...

output:

269988539
0
128
0
2111
0
24648843
0
38738
0
771
0
522240
0
75467712
0
0
0
252
0
54475779
0
624
0
4812
0
534832868
0
774
0
5676058
0
100337
0
1026
0
328145
0
276328320
0
18973684
0
171452
0
520232944
0
1354336
0
2017
0
65416
0
0
0
1040527
0
33244
0
13
0
2
0
2064
0
8
0
89573
0
388
0
0
0
7306494
0
395
...

result:

points 0.5 right answer but not right solutions at 1th solution

Test #10:

score: 6
Acceptable Answer
time: 283ms
memory: 37856kb

input:

4 269
100000 100
1048576 2 64 67108864 1024 67108864 268435456 32768 8388608 32 256 2 268435456 262144 524288 262144 2 524288 64 8192 262144 536870912 2097152 64 1024 2 1048576 128 2 8388608 512 32768 1 8388608 4 2 268435456 128 67108864 65536 2 8388608 2048 16 2048 4096 32768 1048576 32768 32 83886...

output:

471323918
0
522240
0
408220
0
15334
0
0
0
130666
0
28795
0
0
0
5046776
0
137216
0
17
0
10491514
0
106627
0
0
0
398
0
30
0
96585148
0
19
0
50405259
0
7208
0
112091185
0
2801
0
1041610
0
3005
0
66520960
0
32
0
5636927
0
2494360
0
14911
0
12288
0
11648
0
242
0
1536
0
63740
0
20
0
31029479
0
2312432
0
1...

result:

points 0.5 right answer but not right solutions at 1th solution

Test #11:

score: 0
Time Limit Exceeded

input:

4 2
100000 5000
32768 2 1024 1 65536 32768 4194304 4 2 33554432 1048576 268435456 4194304 268435456 268435456 4194304 32768 2097152 131072 16777216 1024 262144 2048 65536 512 1024 8388608 128 512 33554432 1 32 134217728 8388608 2097152 4 2097152 1048576 1024 33554432 536870912 536870912 33554432 327...

output:


result:


Subtask #5:

score: 6
Acceptable Answer

Test #18:

score: 6
Acceptable Answer
time: 24ms
memory: 3840kb

input:

5 10000
10 1
0 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823
10 1
0 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823
10 1
0 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741...

output:

1073741823
0
1073741823
0
1073741823
0
1073741823
0
1073741823
0
1073741823
0
1073741823
0
1073741823
0
1073741823
0
1073741823
0
1073741823
0
1073741823
0
1073741823
0
1073741823
0
1073741823
0
1073741823
0
1073741823
0
1073741823
0
1073741823
0
1073741823
0
1073741823
0
1073741823
0
1073741823
0
1...

result:

points 0.5 right answer but not right solutions at 1th solution

Test #19:

score: 6
Acceptable Answer
time: 116ms
memory: 17584kb

input:

5 2323
100000 1
0 3170633 888529329 347839787 101667249 273239696 1028446182 411994109 710973319 298677951 299452068 519308796 361451040 488605068 74238166 997794448 478367019 532094220 747266199 217905213 682359917 774814810 234838947 456387659 38459020 434013070 633290806 173828476 94076883 568288...

output:

11962
0
1607036
0
106
0
3
0
126
0
727
0
64001
0
147
0
18
0
2820
0
6234491
0
163
0
316
0
1
0
6831
0
2
0
58512441
0
1095
0
190
0
14
0
14
0
25337127
0
3135892
0
9443
0
7
0
174
0
1
0
175
0
23492762
0
24504133
0
8
0
1
0
503446969
0
1
0
4
0
16777215
0
1673
0
15021249
0
394
0
866019
0
21182202
0
2701101
0
...

result:

points 0.5 right answer but not right solutions at 1th solution

Test #20:

score: 6
Acceptable Answer
time: 125ms
memory: 19932kb

input:

5 2205
100000 1
0 684191025 220215685 982495864 602362406 687396179 439432236 81065680 398068897 269754402 306183653 309939439 664994998 1011962742 338161922 629593565 926305057 1026259775 711874360 69406110 426672919 208267066 551253027 9384823 26156203 778817402 654214308 527029151 1065024353 2870...

output:

22539
0
5296170
0
2997548
0
10
0
73171
0
63846191
0
160
0
54472
0
80
0
30
0
8647672
0
48079473
0
534
0
388781939
0
33000512
0
27487079
0
2
0
535
0
18402845
0
500239140
0
20596370
0
538
0
70
0
1315
0
1308627
0
1172423
0
1296
0
10
0
4
0
83
0
0
0
597875
0
31
0
138
0
0
0
16
0
217
0
174066623
0
131999576...

result:

points 0.5 right answer but not right solutions at 1th solution

Test #21:

score: 6
Acceptable Answer
time: 116ms
memory: 18252kb

input:

5 2166
100000 1
0 58930516 543560994 783997157 728082180 789115629 549794748 81818067 214839912 203394814 711969322 908524000 570262778 992867922 359455295 88035653 412186516 937931728 331800409 545354553 535440658 894562512 657466952 555070606 469471475 1055263866 874958292 76960239 478302168 68009...

output:

8241
0
2846999
0
1605
0
21150
0
13
0
0
0
1667525
0
89607968
0
146855
0
30
0
232032
0
3116
0
2
0
43907922
0
6789
0
262673
0
1
0
6250528
0
593516
0
196
0
4
0
272629760
0
9338564
0
15019723
0
131806
0
3019
0
110370613
0
7
0
368886820
0
12
0
5
0
117
0
1
0
110
0
5187
0
16737
0
44904
0
1124
0
25
0
18
0
17...

result:

points 0.5 right answer but not right solutions at 1th solution

Subtask #6:

score: 8
Acceptable Answer

Test #22:

score: 8
Acceptable Answer
time: 1ms
memory: 3968kb

input:

6 23
1000 10
0 357293452 452461848 986047039 546588280 762710079 767831017 39741545 416114273 515599366 1018969624 603342125 928112286 1053016142 240953466 533088067 1028134429 504727014 371307863 834428873 968387878 478550336 1047217797 1046651542 777749850 866989319 92995163 251915198 363285573 10...

output:

264227
0
5
0
7
0
4
0
91693223
0
2097370
0
31
0
49
0
15
0
307991771
0
140516
0
6
0
4103
0
179
0
1
0
13
0
468910091
0
468961
0
5
0
510
0
50097157
0
4346
0
32699
0

result:

points 0.5 right answer but not right solutions at 1th solution

Test #23:

score: 8
Acceptable Answer
time: 0ms
memory: 4096kb

input:

6 23
1000 10
0 978686021 287986921 276311856 889616598 739968417 1060147652 463275477 172393699 591333230 983197307 235514434 330494755 449056272 882229818 781111474 275587745 980041928 334198691 305313012 415758352 947298893 950211162 909723054 961622596 917454340 161928901 404346316 369133631 1038...

output:

709905
0
1148
0
199214
0
920
0
3412
0
51
0
0
0
12155683
0
524287
0
27
0
7669
0
2
0
1163
0
1399949
0
26291797
0
669663
0
18
0
121
0
492112602
0
3990400
0
2
0
65535
0
7178
0

result:

points 0.5 right answer but not right solutions at 1th solution

Test #24:

score: 8
Acceptable Answer
time: 0ms
memory: 4084kb

input:

6 15
1000 10
0 631723071 149784582 965844254 515554472 887253148 467825521 981769969 1054193550 627909969 590277818 159342752 658063143 667914173 169490051 25536270 337269419 1056885019 980490575 750858271 553446484 347553447 376197986 1053224035 473470890 123586 97769047 761755924 510998818 2560945...

output:

737485
0
264867077
0
65535
0
2097160
0
34
0
11648
0
144
0
1
0
13
0
666046
0
4
0
8
0
108104785
0
24
0
82
0

result:

points 0.5 right answer but not right solutions at 1th solution

Test #25:

score: 8
Acceptable Answer
time: 0ms
memory: 3968kb

input:

6 25
1000 10
0 751950140 901599329 987895071 306253500 278530668 539473653 911723672 948474628 722632384 369217860 428703545 999113214 567923990 53499297 1013528916 263060554 669297221 349021033 832596533 893306880 892438572 345611286 331257977 488113061 578929864 881846255 320356815 76057168 704694...

output:

1119212
0
65316
0
1073741823
0
3
0
3610519
0
525
0
3
0
995
0
6
0
507
0
1
0
94
0
14709283
0
1307943
0
209426
0
197310664
0
3433909
0
221226
0
33541088
0
1
0
5
0
91
0
8
0
270150
0
24270
0

result:

points 0.5 right answer but not right solutions at 1th solution

Test #26:

score: 8
Acceptable Answer
time: 1ms
memory: 3840kb

input:

6 2
1000 1
0 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1...

output:

1073741823
0
1073741823
0

result:

points 0.5 right answer but not right solutions at 1th solution

Subtask #7:

score: 0
Time Limit Exceeded

Dependency #3:

50%
Acceptable Answer

Dependency #5:

50%
Acceptable Answer

Dependency #6:

50%
Acceptable Answer

Test #27:

score: 8
Acceptable Answer
time: 308ms
memory: 19140kb

input:

7 195
100000 1000
0 828483622 617711013 242092397 1034026464 456205583 731635466 382894773 533786631 582730039 74863848 661821965 368857719 541353387 662605236 580923280 798012506 54823622 333416217 39292129 995195996 477140985 1014499425 362164396 970752859 879997855 96768859 1005365898 576674982 4...

output:

23456
0
190129
0
4762892
0
127
0
3
0
652019
0
225944
0
45
0
13555
0
399951772
0
140030
0
2
0
12251168
0
3
0
209969103
0
247
0
879
0
2969
0
16776833
0
2
0
544
0
159680962
0
3
0
1
0
946
0
62914
0
2085
0
126211826
0
2654
0
3
0
59826
0
13597109
0
0
0
144039661
0
151
0
1630644
0
296374
0
742
0
1341901
0
...

result:

points 0.5 right answer but not right solutions at 1th solution

Test #28:

score: 0
Time Limit Exceeded

input:

7 228
100000 1000
0 230727359 951312015 741711018 367230626 775024687 130794976 435788836 781961691 736694220 427610697 1016199868 798240399 340962994 1006804448 708169239 976753368 364431996 495851435 246658001 190094424 1054346726 639713727 218794912 229693460 313349630 85091951 418997497 27345904...

output:


result:


Subtask #8:

score: 0
Skipped

Dependency #7:

0%

Subtask #9:

score: 0
Skipped

Dependency #8:

0%