QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#83818#2883. 方格游戏Naitoah #AC ✓72ms6888kbC++141.6kb2023-03-03 16:25:002023-03-03 16:25:02

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 3624kb

input:

1 1 0

output:

0

result:

ok single line: '0'

Test #2:

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

input:

1002 1002 20
637 649 717 726
191 198 99 115
522 528 289 308
22 39 994 995
567 570 875 877
685 688 928 940
836 847 805 814
128 142 117 125
735 750 144 150
431 447 347 352
392 406 196 215
289 302 831 832
187 187 921 921
110 116 135 136
462 478 738 747
235 241 452 452
610 626 900 919
259 276 945 947
90...

output:

109876135

result:

ok single line: '109876135'

Test #3:

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

input:

1002 1002 20
637 649 717 726
191 198 99 115
522 528 289 308
22 39 994 995
567 570 875 877
685 688 928 940
836 847 805 814
128 142 117 125
735 750 144 150
431 447 347 352
392 406 196 215
289 302 831 832
187 187 921 921
110 116 135 136
462 478 738 747
235 241 452 452
610 626 900 919
259 276 945 947
90...

output:

109876135

result:

ok single line: '109876135'

Test #4:

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

input:

1002 1002 20
637 649 717 726
191 198 99 115
522 528 289 308
22 39 994 995
567 570 875 877
685 688 928 940
836 847 805 814
128 142 117 125
735 750 144 150
431 447 347 352
392 406 196 215
289 302 831 832
187 187 921 921
110 116 135 136
462 478 738 747
235 241 452 452
610 626 900 919
259 276 945 947
90...

output:

109876135

result:

ok single line: '109876135'

Test #5:

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

input:

1002 1002 20
637 649 717 726
191 198 99 115
522 528 289 308
22 39 994 995
567 570 875 877
685 688 928 940
836 847 805 814
128 142 117 125
735 750 144 150
431 447 347 352
392 406 196 215
289 302 831 832
187 187 921 921
110 116 135 136
462 478 738 747
235 241 452 452
610 626 900 919
259 276 945 947
90...

output:

109876135

result:

ok single line: '109876135'

Test #6:

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

input:

1002 1002 20
637 649 717 726
191 198 99 115
522 528 289 308
22 39 994 995
567 570 875 877
685 688 928 940
836 847 805 814
128 142 117 125
735 750 144 150
431 447 347 352
392 406 196 215
289 302 831 832
187 187 921 921
110 116 135 136
462 478 738 747
235 241 452 452
610 626 900 919
259 276 945 947
90...

output:

109876135

result:

ok single line: '109876135'

Test #7:

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

input:

1002 1002 20
637 649 717 726
191 198 99 115
522 528 289 308
22 39 994 995
567 570 875 877
685 688 928 940
836 847 805 814
128 142 117 125
735 750 144 150
431 447 347 352
392 406 196 215
289 302 831 832
187 187 921 921
110 116 135 136
462 478 738 747
235 241 452 452
610 626 900 919
259 276 945 947
90...

output:

109876135

result:

ok single line: '109876135'

Test #8:

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

input:

100002 100002 1000
97499 97504 44086 44087
79707 79712 68614 68616
42399 42403 12598 12603
79409 79410 51077 51078
13252 13256 96759 96764
57068 57071 4881 4883
706 707 77982 77982
92545 92550 14414 14417
48907 48910 71474 71475
5508 5512 4481 4486
19126 19131 20982 20987
17420 17424 18191 18191
296...

output:

46710111

result:

ok single line: '46710111'

Test #9:

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

input:

100002 100002 1000
97499 97504 44086 44087
79707 79712 68614 68616
42399 42403 12598 12603
79409 79410 51077 51078
13252 13256 96759 96764
57068 57071 4881 4883
706 707 77982 77982
92545 92550 14414 14417
48907 48910 71474 71475
5508 5512 4481 4486
19126 19131 20982 20987
17420 17424 18191 18191
296...

output:

46710111

result:

ok single line: '46710111'

Test #10:

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

input:

100002 100002 1000
6552 6553 42573 42577
96951 96956 61320 61324
91224 91227 74799 74799
59748 59753 80262 80262
97211 97211 48680 48684
76561 76563 69153 69155
94316 94321 74610 74612
935 936 42449 42451
56881 56884 76838 76838
26510 26510 11119 11124
90805 90810 51868 51871
1201 1201 52116 52119
9...

output:

440963985

result:

ok single line: '440963985'

Test #11:

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

input:

100002 100002 1000
6552 6553 42573 42577
96951 96956 61320 61324
91224 91227 74799 74799
59748 59753 80262 80262
97211 97211 48680 48684
76561 76563 69153 69155
94316 94321 74610 74612
935 936 42449 42451
56881 56884 76838 76838
26510 26510 11119 11124
90805 90810 51868 51871
1201 1201 52116 52119
9...

output:

440963985

result:

ok single line: '440963985'

Test #12:

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

input:

1 4 0

output:

10

result:

ok single line: '10'

Test #13:

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

input:

100002 100002 1000
6552 6553 42573 42577
96951 96956 61320 61324
91224 91227 74799 74799
59748 59753 80262 80262
97211 97211 48680 48684
76561 76563 69153 69155
94316 94321 74610 74612
935 936 42449 42451
56881 56884 76838 76838
26510 26510 11119 11124
90805 90810 51868 51871
1201 1201 52116 52119
9...

output:

440963985

result:

ok single line: '440963985'

Test #14:

score: 0
Accepted
time: 71ms
memory: 6672kb

input:

900000002 900000002 100000
51820383 51820680 219305012 219305288
774529390 774529437 365397993 365398958
622751423 622751865 413569643 413569853
129537839 129538296 608508595 608508860
78694638 78695037 567031881 567032631
317772034 317772683 842482639 842483290
852808645 852809278 328365943 3283662...

output:

388915640

result:

ok single line: '388915640'

Test #15:

score: 0
Accepted
time: 54ms
memory: 6888kb

input:

900000002 900000002 100000
58777717 58777930 713668922 713669901
509429862 509430220 274821408 274822069
834614535 834614617 31649056 31649094
94179091 94179292 417878680 417879481
759647020 759647468 650660360 650661075
698850387 698850491 177306007 177306191
864171634 864171896 793481102 793482012...

output:

800804676

result:

ok single line: '800804676'

Test #16:

score: 0
Accepted
time: 65ms
memory: 6740kb

input:

900000002 900000002 100000
66792808 66793129 292960163 292960516
286113589 286113826 96237487 96238177
170511114 170511250 169059471 169060316
548976372 548976977 280536776 280537729
636828177 636828246 334164531 334165018
808189203 808190031 318292349 318292586
133925571 133926518 421631911 4216324...

output:

553945868

result:

ok single line: '553945868'

Test #17:

score: 0
Accepted
time: 71ms
memory: 6752kb

input:

900000002 900000002 100000
74295404 74295765 329836890 329837870
578760216 578760257 237866258 237866838
481294640 481294775 583708064 583708227
758679255 758679638 653421778 653422487
379007650 379008410 754585383 754585738
153365020 153365410 593051731 593052645
311371330 311371578 105135807 10513...

output:

731697077

result:

ok single line: '731697077'

Test #18:

score: 0
Accepted
time: 64ms
memory: 6616kb

input:

900000002 900000002 100000
81798001 81798170 366648081 366648920
871439611 871439863 553269620 553270267
792012630 792012996 98323890 98324371
68414905 68415890 126274013 126274886
121187123 121187807 101264412 101264459
224831780 224831964 867811114 867811882
488817090 488817639 514897879 514898057...

output:

722196257

result:

ok single line: '722196257'

Test #19:

score: 0
Accepted
time: 69ms
memory: 6664kb

input:

900000002 900000002 100000
89376882 89376883 741497887 741498033
631436250 631436861 520398458 520398965
7812213 7812774 713292861 713293602
582898127 582898909 652888200 652888502
319883323 319884190 589069954 589070800
442827089 442827138 686358481 686358766
269956459 269956517 692589346 692589581...

output:

185739993

result:

ok single line: '185739993'

Test #20:

score: 0
Accepted
time: 72ms
memory: 6656kb

input:

900000002 900000002 100000
96661373 96661543 102362920 102363748
15706566 15707452 458641816 458642217
534756264 534757127 379751516 379751866
9364044 9364157 370863953 370864145
222836702 222837509 874754196 874754281
742396688 742397573 799898376 799898658
166207638 166208293 114009043 114009583
8...

output:

955169454

result:

ok single line: '955169454'

Test #21:

score: 0
Accepted
time: 64ms
memory: 6620kb

input:

900000002 900000002 100000
103727760 103728693 34732676 34733063
117924281 117924858 19757937 19758236
551668201 551668260 371893130 371894075
278785635 278785975 507705047 507705912
286531219 286531335 125734596 125735345
22552710 22552762 752186015 752186078
855071597 855072376 173344541 173345279...

output:

443964834

result:

ok single line: '443964834'

Test #22:

score: 0
Accepted
time: 60ms
memory: 6704kb

input:

900000002 900000002 100000
111339409 111339997 235775122 235775225
51629977 51630146 160595830 160595990
667435016 667435271 86862101 86862307
67010681 67010763 134253699 134254457
485227420 485227950 439765545 439766093
240613555 240613647 570667845 570668426
636210966 636211254 177261416 177261442...

output:

373758002

result:

ok single line: '373758002'

Test #23:

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

input:

5 1 0

output:

20

result:

ok single line: '20'

Test #24:

score: 0
Accepted
time: 60ms
memory: 6616kb

input:

900000002 900000002 100000
118918290 118918709 610624928 610625746
711561080 711561608 127691900 127691920
783234598 783234816 875507360 875507418
581493902 581494781 834576942 834577537
683923620 683924157 27571087 27571434
458608864 458609821 389215212 389215486
417350336 417351133 354952884 35495...

output:

385310593

result:

ok single line: '385310593'

Test #25:

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

input:

14 25 0

output:

793975

result:

ok single line: '793975'

Test #26:

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

input:

14 25 3
9 12 14 14
4 7 6 6
2 2 23 24

output:

761266

result:

ok single line: '761266'

Test #27:

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

input:

42 32 5
11 12 28 29
5 7 17 20
35 38 15 15
16 18 31 31
27 31 23 24

output:

21260614

result:

ok single line: '21260614'

Test #28:

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

input:

12 12 3
4 4 4 6
9 11 9 11
6 6 2 2

output:

69260

result:

ok single line: '69260'

Test #29:

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

input:

1002 1002 20
423 423 459 472
600 618 414 428
69 70 991 998
398 400 833 844
857 874 888 901
940 941 968 971
949 963 647 660
985 985 789 803
553 572 764 776
802 813 106 121
703 714 489 506
431 431 546 550
660 662 260 262
690 691 587 589
751 751 704 714
362 366 151 169
497 497 512 518
583 589 192 205
3...

output:

255052746

result:

ok single line: '255052746'

Test #30:

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

input:

1002 1002 20
637 649 717 726
191 198 99 115
522 528 289 308
22 39 994 995
567 570 875 877
685 688 928 940
836 847 805 814
128 142 117 125
735 750 144 150
431 447 347 352
392 406 196 215
289 302 831 832
187 187 921 921
110 116 135 136
462 478 738 747
235 241 452 452
610 626 900 919
259 276 945 947
90...

output:

109876135

result:

ok single line: '109876135'