QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#262329#1968. Science FictiondXqwq#AC ✓1ms4068kbC++231.3kb2023-11-23 18:30:122023-11-23 18:30:13

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2
3 2 10 4

output:

2
0 1
2 3

result:

ok nice! 2 moves

Test #2:

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

input:

1
10 100

output:

0

result:

ok nice! 0 moves

Test #3:

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

input:

1
824838 992401

output:

0

result:

ok nice! 0 moves

Test #4:

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

input:

2
208395 17211 250690 874014

output:

1
0 1

result:

ok nice! 1 moves

Test #5:

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

input:

8
991318 655714 983340 496226 752852 888298 572661 729100 426124 437775 8096 28612 303846 295897 970760 179029 702449 407420 945406 352294 960516 484993 724888 495235 156841 451864 95506 869159 61631 296168 279240 260130 901551 726353 298872 221580 982372 394731 720187 656498 595457 381795 759187 36...

output:

780
1 129
2 130
5 133
6 134
16 144
20 148
22 150
27 155
32 160
39 167
42 170
58 186
66 194
67 195
72 200
75 203
78 206
80 208
86 214
87 215
88 216
97 225
102 230
104 232
105 233
106 234
108 236
111 239
112 240
119 247
120 248
121 249
0 64
64 192
4 12
12 140
7 3
3 131
14 10
10 138
18 50
50 178
33 35
...

result:

ok nice! 780 moves

Test #6:

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

input:

9
888559 111203 65032 290846 22133 226267 707470 14065 736516 622251 346047 555707 482074 680230 613967 497441 449554 967825 651070 678493 472313 583791 720445 224302 300743 198731 973353 657745 445065 428890 915188 532221 601100 975552 252972 265343 797188 997748 751515 244459 880581 499279 192690 ...

output:

1788
8 264
9 265
13 269
14 270
17 273
18 274
19 275
26 282
27 283
30 286
31 287
32 288
36 292
37 293
38 294
49 305
50 306
51 307
56 312
62 318
63 319
67 323
70 326
71 327
73 329
74 330
77 333
78 334
82 338
85 341
90 346
98 354
100 356
102 358
105 361
109 365
110 366
111 367
114 370
115 371
117 373
1...

result:

ok nice! 1788 moves

Test #7:

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

input:

10
46982 476817 496931 560433 461240 750978 947847 814814 659646 506842 759616 931346 752705 449448 557667 164565 805585 139966 935551 743130 400827 826593 316939 597171 566302 42318 283510 548860 557699 464391 241748 310653 488228 677001 434005 590123 338841 574036 303991 216552 454974 914883 31282...

output:

4106
5 517
6 518
11 523
12 524
14 526
16 528
24 536
41 553
45 557
53 565
54 566
55 567
56 568
60 572
62 574
65 577
68 580
74 586
77 589
85 597
86 598
116 628
121 633
129 641
131 643
139 651
141 653
146 658
150 662
152 664
153 665
157 669
164 676
165 677
168 680
170 682
171 683
174 686
176 688
178 69...

result:

ok nice! 4106 moves

Test #8:

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

input:

10
949240 35612 460205 974087 338042 271803 334025 63491 750807 279433 899420 120333 875712 396956 17331 903377 75543 841309 975578 209064 858085 265088 990752 382189 453875 707785 91883 487626 999153 989617 672899 730478 89929 619621 96174 915274 438090 705909 682206 236298 574666 885407 168720 540...

output:

4030
0 512
8 520
10 522
12 524
17 529
25 537
29 541
31 543
40 552
43 555
56 568
59 571
66 578
70 582
72 584
74 586
81 593
84 596
85 597
87 599
89 601
90 602
91 603
93 605
94 606
99 611
103 615
118 630
119 631
120 632
121 633
125 637
129 641
133 645
135 647
136 648
144 656
149 661
152 664
161 673
164...

result:

ok nice! 4030 moves

Test #9:

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

input:

10
746874 671481 787373 91722 286998 843370 287027 699571 566633 92904 121270 84581 172807 118213 566935 494171 96174 128894 912103 167003 563084 240573 445148 595153 430540 871105 407520 875615 374793 147544 58778 979552 146961 97898 511796 530999 496562 478923 730985 885285 94569 490511 331797 927...

output:

4075
1 513
2 514
8 520
18 530
20 532
25 537
34 546
48 560
59 571
60 572
63 575
67 579
69 581
71 583
72 584
83 595
84 596
96 608
98 610
108 620
112 624
113 625
129 641
135 647
136 648
137 649
144 656
146 658
150 662
151 663
165 677
169 681
170 682
171 683
172 684
177 689
184 696
189 701
193 705
205 7...

result:

ok nice! 4075 moves

Test #10:

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

input:

10
546693 308346 853356 12952 842161 797467 832954 207696 730371 27541 94381 419145 35259 663666 987797 42166 362364 136282 161216 934180 391497 780167 195044 636218 940656 362727 31072 839926 412136 570431 834451 594285 517357 298316 891244 707769 86006 662265 452173 697662 420751 904255 665271 730...

output:

3991
0 512
2 514
4 516
8 520
13 525
14 526
24 536
29 541
31 543
32 544
34 546
37 549
52 564
61 573
62 574
63 575
64 576
69 581
72 584
78 590
83 595
96 608
98 610
102 614
114 626
117 629
122 634
124 636
127 639
133 645
145 657
149 661
153 665
162 674
164 676
170 682
182 694
183 695
188 700
199 711
20...

result:

ok nice! 3991 moves

Test #11:

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

input:

1
819419 113088

output:

1
0 1

result:

ok nice! 1 moves

Test #12:

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

input:

2
725964 552203 371378 344109

output:

4
0 2
1 3
0 1
2 3

result:

ok nice! 4 moves

Test #13:

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

input:

10
998030 997163 996957 993557 991195 989284 988223 985000 982700 982212 981058 981023 980199 979436 979287 977471 977098 977062 975229 974818 973741 973028 971101 970597 970328 969913 967931 967747 966649 966556 965497 963873 963808 962577 961661 960874 960527 958588 957708 956548 954238 954169 953...

output:

5120
0 512
1 513
2 514
3 515
4 516
5 517
6 518
7 519
8 520
9 521
10 522
11 523
12 524
13 525
14 526
15 527
16 528
17 529
18 530
19 531
20 532
21 533
22 534
23 535
24 536
25 537
26 538
27 539
28 540
29 541
30 542
31 543
32 544
33 545
34 546
35 547
36 548
37 549
38 550
39 551
40 552
41 553
42 554
43 5...

result:

ok nice! 5120 moves

Test #14:

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

input:

10
998603 998169 997659 997290 997252 997151 996413 996391 996085 994969 990896 989802 987855 987448 986526 985933 984340 984041 983080 982762 982158 981412 980751 979775 979599 979224 976027 972756 972515 971272 971034 970460 969635 968618 968234 965740 964670 963272 958508 958370 956691 955586 955...

output:

5119
0 512
1 513
2 514
3 515
4 516
5 517
6 518
7 519
8 520
9 521
10 522
11 523
12 524
13 525
14 526
15 527
16 528
17 529
18 530
19 531
20 532
21 533
22 534
23 535
24 536
25 537
26 538
27 539
28 540
29 541
30 542
31 543
32 544
33 545
34 546
35 547
36 548
37 549
38 550
39 551
40 552
41 553
42 554
43 5...

result:

ok nice! 5119 moves

Test #15:

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

input:

10
997893 997879 997251 996734 995681 995546 992657 991595 989691 989182 988758 988161 987328 985910 982385 982322 981361 980688 977437 977323 977313 977088 974645 973981 973504 972672 972559 969933 968924 968786 967992 967889 967840 966919 966755 966540 966241 965403 963714 962495 961713 960731 960...

output:

5118
0 512
1 513
2 514
3 515
4 516
5 517
6 518
7 519
8 520
9 521
10 522
11 523
12 524
13 525
14 526
15 527
16 528
17 529
18 530
19 531
20 532
21 533
22 534
23 535
24 536
25 537
26 538
27 539
28 540
29 541
30 542
31 543
32 544
33 545
34 546
35 547
36 548
37 549
38 550
39 551
40 552
41 553
42 554
43 5...

result:

ok nice! 5118 moves

Test #16:

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

input:

10
999765 999540 999524 442723 783220 997869 997780 712090 996433 996257 996040 992566 991883 990874 990859 988633 582417 981709 937314 977988 84342 975260 591353 974330 974158 528281 973722 973625 973185 972643 971744 971507 969795 969647 969612 129152 966057 220244 964045 963969 963162 597812 4185...

output:

4955
0 512
1 513
4 516
6 518
8 520
9 521
10 522
11 523
12 524
13 525
14 526
16 528
17 529
18 530
19 531
21 533
24 536
26 538
27 539
28 540
29 541
30 542
31 543
32 544
33 545
36 548
38 550
39 551
40 552
41 553
43 555
44 556
45 557
47 559
48 560
49 561
51 563
52 564
53 565
55 567
57 569
58 570
59 571
...

result:

ok nice! 4955 moves

Test #17:

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

input:

10
343821 998027 997026 996414 996404 773250 994500 859736 367107 993429 990586 714714 989540 989370 988330 987442 985869 478079 984828 984430 983909 424172 980184 438518 46043 797866 973296 972011 970740 969830 969509 968315 439027 967113 967029 966931 583530 47644 445131 961898 957808 957034 95661...

output:

4986
2 514
3 515
4 516
5 517
7 519
9 521
10 522
12 524
13 525
15 527
16 528
18 530
20 532
22 534
26 538
27 539
28 540
30 542
31 543
34 546
35 547
39 551
40 552
42 554
49 561
50 562
51 563
53 565
54 566
55 567
58 570
61 573
62 574
63 575
65 577
66 578
67 579
68 580
69 581
72 584
73 585
74 586
76 588
...

result:

ok nice! 4986 moves

Test #18:

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

input:

10
999796 853861 338685 673431 997360 508676 986083 623206 985281 261993 455281 984165 806278 365801 983086 329846 836224 107339 978674 500414 976971 553047 53972 897597 287497 368894 966051 965944 25111 965071 162596 862808 962587 907148 336588 664453 959641 958947 958555 958124 954763 951778 95161...

output:

4885
0 512
1 513
3 515
4 516
5 517
6 518
7 519
8 520
11 523
14 526
16 528
18 530
19 531
20 532
21 533
27 539
29 541
31 543
36 548
38 550
39 551
40 552
41 553
42 554
44 556
46 558
48 560
49 561
51 563
52 564
55 567
56 568
58 570
59 571
61 573
62 574
64 576
65 577
68 580
69 581
70 582
72 584
73 585
74...

result:

ok nice! 4885 moves

Test #19:

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

input:

10
695647 998457 256203 909670 982894 995992 995387 777482 994669 263854 989569 320493 252841 985455 530388 684573 983066 975593 891430 487880 349963 472375 372708 423420 974655 974388 974301 973152 950030 969447 679648 246707 966536 966376 965740 866666 30143 963819 961332 960251 209174 640492 2202...

output:

4734
0 512
1 513
3 515
4 516
6 518
7 519
8 520
10 522
13 525
15 527
16 528
17 529
18 530
25 537
26 538
27 539
28 540
29 541
32 544
33 545
34 546
35 547
37 549
38 550
41 553
43 555
47 559
48 560
49 561
50 562
53 565
54 566
56 568
58 570
59 571
61 573
64 576
68 580
69 581
70 582
71 583
72 584
75 587
7...

result:

ok nice! 4734 moves

Test #20:

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

input:

10
258936 410937 283884 393387 982697 510737 680897 212979 153426 621625 795061 757773 244663 213121 74281 949123 983068 965482 433099 992440 514506 239699 440821 724409 311327 313198 852076 262928 788330 678441 506087 34286 809495 599525 970320 301833 969669 307223 871328 525355 797019 515257 10861...

output:

4277
6 518
9 521
10 522
16 528
17 529
19 531
20 532
26 538
32 544
33 545
34 546
38 550
39 551
40 552
41 553
45 557
47 559
57 569
60 572
61 573
65 577
69 581
72 584
74 586
76 588
77 589
78 590
80 592
86 598
87 599
88 600
90 602
100 612
101 613
104 616
108 620
111 623
113 625
114 626
117 629
120 632
1...

result:

ok nice! 4277 moves

Test #21:

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

input:

10
989539 264003 89801 336845 872805 363863 409608 722546 676281 871400 20414 972543 452474 858575 480750 639385 877845 432002 283043 932719 857101 146837 773058 438046 755472 383841 330153 180919 419122 281693 289297 988547 934831 667163 418404 844342 707371 773251 452058 951076 674998 598366 23071...

output:

4120
4 516
7 519
8 520
11 523
19 531
20 532
36 548
39 551
40 552
46 558
47 559
54 566
62 574
69 581
70 582
76 588
80 592
81 593
86 598
90 602
94 606
95 607
102 614
103 615
112 624
117 629
119 631
124 636
126 638
134 646
135 647
137 649
138 650
139 651
141 653
144 656
145 657
150 662
151 663
155 667
...

result:

ok nice! 4120 moves

Test #22:

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

input:

10
268981 729295 424417 366156 357055 175507 417152 240251 411056 912165 423865 278160 907860 413812 133438 626599 165355 660278 473775 6476 512331 250836 713169 750412 856144 665133 815985 636387 389359 22218 327844 551545 921825 35601 877698 671416 589514 192363 822860 403486 197385 617060 909896 ...

output:

4008
9 521
12 524
15 527
17 529
20 532
22 534
23 535
24 536
26 538
27 539
31 543
32 544
34 546
35 547
36 548
45 557
47 559
48 560
50 562
54 566
55 567
62 574
67 579
68 580
72 584
75 587
76 588
77 589
80 592
90 602
91 603
97 609
101 613
110 622
116 628
117 629
126 638
127 639
130 642
131 643
132 644
...

result:

ok nice! 4008 moves