QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#233883#5706. VillageGMBox100 ✓74ms23328kbC++172.7kb2023-11-01 04:47:352023-11-01 04:47:35

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 12
Accepted

Test #1:

score: 12
Accepted
time: 0ms
memory: 3880kb

input:

4
1 2
2 3
3 4

output:

4 8
2 1 4 3
4 3 2 1

result:

points 1.0 correct answer = 4; correct answer = 8;

Test #2:

score: 12
Accepted
time: 0ms
memory: 3648kb

input:

7
4 2
5 7
3 4
6 3
1 3
4 5

output:

8 18
3 4 6 2 7 1 5
7 6 5 1 2 4 3

result:

points 1.0 correct answer = 8; correct answer = 18;

Test #3:

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

input:

2
1 2

output:

2 2
2 1
2 1

result:

points 1.0 correct answer = 2; correct answer = 2;

Test #4:

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

input:

7
4 1
7 6
7 5
1 3
3 2
1 6

output:

8 20
4 3 2 1 7 5 6
4 7 6 5 2 1 3

result:

points 1.0 correct answer = 8; correct answer = 20;

Test #5:

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

input:

7
2 7
5 2
6 1
1 4
4 5
7 3

output:

8 24
6 5 7 2 4 1 3
2 4 6 5 3 7 1

result:

points 1.0 correct answer = 8; correct answer = 24;

Test #6:

score: 12
Accepted
time: 0ms
memory: 3660kb

input:

7
5 3
3 6
3 1
1 7
1 4
5 2

output:

8 18
7 5 6 1 2 3 4
5 1 7 2 3 4 6

result:

points 1.0 correct answer = 8; correct answer = 18;

Test #7:

score: 12
Accepted
time: 0ms
memory: 3656kb

input:

7
7 3
4 7
1 7
7 2
5 7
7 6

output:

12 12
7 1 2 3 4 5 6
4 5 6 7 1 2 3

result:

points 1.0 correct answer = 12; correct answer = 12;

Test #8:

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

input:

8
4 8
5 2
6 2
3 8
4 7
2 8
2 1

output:

10 22
2 6 8 7 1 5 4 3
3 8 1 5 4 7 6 2

result:

points 1.0 correct answer = 10; correct answer = 22;

Test #9:

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

input:

9
8 1
3 5
8 3
6 8
7 8
3 9
8 4
2 3

output:

14 22
8 3 9 1 2 4 6 7 5
9 6 4 1 7 3 2 5 8

result:

points 1.0 correct answer = 14; correct answer = 22;

Test #10:

score: 12
Accepted
time: 0ms
memory: 3884kb

input:

10
9 8
1 3
7 5
8 6
8 10
6 4
1 6
10 2
6 5

output:

10 30
3 10 1 6 7 4 5 9 8 2
8 5 9 10 2 7 6 1 3 4

result:

points 1.0 correct answer = 10; correct answer = 30;

Test #11:

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

input:

10
9 2
10 4
10 5
2 5
8 3
3 6
7 4
9 8
1 6

output:

10 50
6 9 8 7 10 1 4 3 2 5
4 8 5 1 3 10 9 2 7 6

result:

points 1.0 correct answer = 10; correct answer = 50;

Test #12:

score: 12
Accepted
time: 0ms
memory: 3628kb

input:

10
5 7
4 1
10 5
9 3
7 9
8 2
6 1
8 6
2 7

output:

10 42
4 7 9 1 10 8 2 6 3 5
10 3 2 9 6 5 8 7 4 1

result:

points 1.0 correct answer = 10; correct answer = 42;

Test #13:

score: 12
Accepted
time: 0ms
memory: 3688kb

input:

10
6 10
2 7
10 1
10 8
4 2
1 5
1 9
2 3
10 2

output:

14 28
9 7 2 3 1 10 4 6 5 8
4 8 10 1 7 9 5 2 6 3

result:

points 1.0 correct answer = 14; correct answer = 28;

Test #14:

score: 12
Accepted
time: 0ms
memory: 3656kb

input:

10
5 6
3 5
8 5
5 7
5 1
2 5
9 5
5 4
5 10

output:

18 18
5 1 2 3 10 4 6 7 8 9
7 8 9 10 6 5 1 2 3 4

result:

points 1.0 correct answer = 18; correct answer = 18;

Test #15:

score: 12
Accepted
time: 0ms
memory: 3852kb

input:

10
4 1
5 4
5 10
6 1
8 5
9 4
3 1
7 4
1 2

output:

14 28
6 1 2 9 10 3 4 5 7 8
8 10 7 5 4 9 3 1 6 2

result:

points 1.0 correct answer = 14; correct answer = 28;

Test #16:

score: 12
Accepted
time: 0ms
memory: 3816kb

input:

10
10 2
4 10
1 10
5 10
10 7
9 10
3 10
1 6
8 1

output:

16 22
8 10 2 3 4 1 5 6 7 9
4 9 10 1 6 5 8 7 2 3

result:

points 1.0 correct answer = 16; correct answer = 22;

Test #17:

score: 12
Accepted
time: 0ms
memory: 3816kb

input:

10
5 9
8 1
6 2
4 3
6 7
1 5
3 10
6 8
3 1

output:

12 34
8 6 10 3 9 7 2 1 5 4
9 10 8 6 7 4 5 3 1 2

result:

points 1.0 correct answer = 12; correct answer = 34;

Subtask #2:

score: 38
Accepted

Dependency #1:

100%
Accepted

Test #18:

score: 38
Accepted
time: 0ms
memory: 3684kb

input:

256
229 81
255 131
55 23
79 6
37 152
3 58
173 242
17 131
116 72
109 201
92 187
215 83
101 253
224 23
101 157
219 236
214 61
41 78
190 232
184 215
39 145
215 94
21 255
59 178
255 215
25 63
46 41
77 203
164 206
28 147
195 134
204 155
215 256
107 167
202 95
206 69
57 222
87 25
52 63
69 234
73 110
54 34...

output:

316 2186
131 44 58 97 155 130 24 249 230 179 89 214 161 74 182 232 1 208 207 35 255 68 224 7 87 165 70 147 100 126 83 150 223 54 20 112 152 163 145 216 180 154 40 2 125 41 194 79 233 221 222 63 243 34 23 71 51 3 204 149 12 95 52 173 4 251 229 22 168 27 56 116 110 14 26 55 203 46 48 39 66 81 31 69 18...

result:

points 1.0 correct answer = 316; correct answer = 2186;

Test #19:

score: 38
Accepted
time: 1ms
memory: 3852kb

input:

500
223 499
155 198
156 203
423 438
87 11
3 73
394 298
59 42
394 147
499 377
50 44
144 298
131 147
10 38
235 430
463 288
103 165
339 354
467 76
414 450
50 206
129 443
147 409
476 409
445 239
111 398
293 273
349 296
131 149
206 92
454 183
313 209
390 480
155 406
494 75
408 382
10 100
166 102
123 332
...

output:

636 5114
11 331 73 14 410 381 474 409 156 353 215 402 443 415 228 59 339 298 15 87 466 16 262 206 75 294 188 241 376 425 498 329 406 25 472 301 438 51 481 44 134 154 164 40 159 368 264 58 490 279 38 184 424 106 437 492 254 433 482 473 255 273 192 276 23 340 349 468 414 399 28 110 3 369 447 205 267 3...

result:

points 1.0 correct answer = 636; correct answer = 5114;

Test #20:

score: 38
Accepted
time: 1ms
memory: 3740kb

input:

499
239 23
393 140
346 79
261 477
343 157
9 31
466 9
459 488
365 191
38 405
302 340
413 434
227 499
40 318
289 373
290 394
21 479
287 322
52 378
422 283
86 369
39 444
19 321
132 302
31 364
301 142
417 6
25 219
199 223
405 372
133 67
89 449
412 39
382 418
21 379
244 391
477 469
246 484
423 416
6 9
36...

output:

614 4106
23 121 215 242 401 436 386 312 466 120 67 61 51 149 495 357 143 10 321 427 479 296 239 282 482 492 405 417 287 319 431 216 434 35 164 115 409 332 444 318 365 347 173 473 225 270 424 117 159 307 13 378 42 248 430 8 119 375 469 438 324 217 145 453 151 350 356 5 203 249 118 435 44 276 433 292 ...

result:

points 1.0 correct answer = 614; correct answer = 4106;

Test #21:

score: 38
Accepted
time: 1ms
memory: 3708kb

input:

1000
842 343
479 865
720 325
420 693
317 105
694 123
626 422
306 24
186 483
37 830
103 33
328 345
379 819
79 946
835 433
939 455
271 587
980 524
316 643
204 621
573 60
935 924
984 435
880 123
626 3
689 794
110 378
827 351
487 932
201 193
836 706
874 293
889 845
179 815
800 267
43 934
954 916
805 548...

output:

1294 14376
618 599 242 408 811 105 941 792 28 703 490 972 510 547 362 581 392 426 541 731 11 891 884 306 466 608 931 725 818 930 857 605 441 260 142 949 926 981 961 607 979 590 934 263 357 361 494 905 169 745 40 874 982 473 241 718 288 849 910 988 122 591 368 667 9 623 157 433 662 797 61 261 925 409...

result:

points 1.0 correct answer = 1294; correct answer = 14376;

Test #22:

score: 38
Accepted
time: 1ms
memory: 3756kb

input:

999
731 687
673 842
221 812
673 902
239 774
18 251
133 461
396 647
376 819
966 519
30 617
297 574
275 88
926 172
907 465
774 303
10 404
547 728
352 357
549 413
27 309
297 843
573 49
556 523
289 655
769 549
16 581
402 576
411 75
981 413
12 108
850 434
627 353
263 752
165 746
761 856
88 375
312 90
761...

output:

1244 11674
810 616 295 861 337 942 187 491 464 541 308 650 931 681 683 581 49 937 835 212 871 392 898 560 895 47 166 993 94 617 443 860 987 431 326 275 591 112 347 385 28 503 59 465 448 282 723 99 17 549 189 975 87 45 171 598 525 711 530 367 722 490 646 390 397 587 238 246 236 637 160 280 23 792 834...

result:

points 1.0 correct answer = 1244; correct answer = 11674;

Test #23:

score: 38
Accepted
time: 1ms
memory: 3756kb

input:

987
840 63
459 542
449 461
397 392
585 630
322 108
449 806
10 433
529 449
702 617
674 975
417 156
983 5
746 66
208 232
244 402
162 331
695 175
616 42
528 765
437 100
425 26
96 133
37 91
93 690
317 201
189 128
576 566
847 64
65 684
217 445
214 217
151 369
4 527
91 763
978 87
739 6
802 70
417 786
199 ...

output:

1266 11812
918 668 459 527 854 739 133 838 609 433 309 200 518 557 401 11 517 707 427 303 271 933 371 93 372 780 378 457 885 393 48 910 575 110 190 852 646 363 208 511 217 616 636 833 721 789 447 31 100 366 743 469 103 55 334 419 191 864 571 899 619 399 840 957 684 746 698 379 766 802 551 408 369 80...

result:

points 1.0 correct answer = 1266; correct answer = 11812;

Test #24:

score: 38
Accepted
time: 1ms
memory: 3884kb

input:

1000
618 292
281 35
663 995
702 117
25 252
913 959
740 974
985 395
23 397
352 905
932 681
209 542
745 500
346 371
449 506
856 812
664 545
999 23
813 227
554 944
455 541
472 53
224 39
91 484
139 731
620 233
759 253
279 151
857 450
353 400
797 482
63 43
81 516
141 943
382 660
977 45
240 589
267 47
560...

output:

1000 500000
902 350 486 860 69 680 799 576 730 482 842 850 604 615 654 376 721 763 736 64 635 873 999 555 252 195 73 510 464 737 502 272 397 740 281 420 99 798 752 220 196 558 63 198 977 934 267 245 126 832 452 590 472 302 529 720 65 969 505 657 714 864 43 20 57 207 578 153 5 425 219 710 27 375 349 ...

result:

points 1.0 correct answer = 1000; correct answer = 500000;

Test #25:

score: 38
Accepted
time: 1ms
memory: 3776kb

input:

999
871 760
692 751
234 935
861 721
846 760
231 625
667 861
258 596
771 61
876 782
69 799
567 422
927 920
318 235
58 911
26 383
257 606
228 738
476 428
381 292
46 988
144 814
277 532
770 648
217 32
405 941
130 603
146 661
58 503
912 714
377 256
92 637
477 395
88 278
438 294
708 356
906 149
381 140
9...

output:

1140 91036
729 70 453 310 67 12 120 207 454 750 648 6 247 36 355 840 114 618 287 820 613 949 89 351 31 383 53 464 733 153 25 217 880 726 713 14 110 673 662 49 810 709 717 326 255 988 686 455 40 700 922 789 27 309 366 747 934 911 444 676 771 282 579 748 286 78 813 54 799 711 616 425 841 265 154 174 5...

result:

points 1.0 correct answer = 1140; correct answer = 91036;

Test #26:

score: 38
Accepted
time: 1ms
memory: 4004kb

input:

909
140 106
583 520
460 181
523 659
107 351
900 122
135 31
368 867
262 110
128 579
640 445
14 818
378 341
196 117
350 400
62 348
879 597
318 618
283 37
315 523
239 879
207 458
905 574
35 127
479 883
812 550
342 590
410 624
462 782
422 560
858 526
8 125
215 447
182 360
17 369
803 7
372 219
8 455
1 64...

output:

1028 43956
64 732 571 357 39 754 828 474 507 21 237 404 23 818 894 547 562 477 173 113 10 5 13 701 552 298 117 819 111 792 272 391 469 228 127 291 875 242 22 639 155 573 533 871 565 522 864 749 553 78 87 176 799 719 371 904 723 842 109 586 244 348 679 1 42 292 752 70 742 68 897 688 695 245 485 856 5...

result:

points 1.0 correct answer = 1028; correct answer = 43956;

Test #27:

score: 38
Accepted
time: 1ms
memory: 3800kb

input:

1000
322 537
402 605
63 899
250 892
64 985
806 42
40 618
948 945
686 85
348 536
451 664
612 443
474 780
352 690
778 812
308 289
958 516
389 284
672 366
556 944
569 496
43 364
484 570
738 954
766 402
935 933
696 214
925 559
889 858
590 219
1000 473
609 580
418 357
271 466
758 929
682 878
678 778
917 ...

output:

1002 250998
407 494 686 447 924 434 742 709 673 456 414 160 780 488 858 30 790 552 214 972 599 663 508 946 642 351 973 448 585 16 423 564 671 813 699 374 674 574 679 728 812 806 364 958 710 566 388 939 947 967 286 694 138 834 320 724 820 375 201 178 983 166 123 637 963 587 586 862 518 228 669 936 93...

result:

points 1.0 correct answer = 1002; correct answer = 250998;

Test #28:

score: 38
Accepted
time: 1ms
memory: 3828kb

input:

1000
944 65
357 755
504 31
900 759
916 234
547 41
761 831
282 858
855 983
770 797
539 473
492 455
18 323
915 294
690 69
935 463
701 665
259 215
102 55
5 876
375 735
810 578
371 785
687 757
213 649
307 658
988 462
610 810
870 847
521 97
637 589
173 702
492 426
16 872
412 705
667 778
592 943
810 872
1...

output:

1248 127496
521 650 857 129 876 904 507 818 836 147 344 919 832 112 624 872 980 769 756 563 16 612 107 384 609 608 996 676 502 834 965 639 983 518 773 958 720 699 833 790 547 725 992 979 628 206 297 866 84 467 342 812 571 411 800 466 636 10 522 499 691 366 215 590 944 675 124 39 690 525 910 633 780 ...

result:

points 1.0 correct answer = 1248; correct answer = 127496;

Test #29:

score: 38
Accepted
time: 1ms
memory: 4016kb

input:

1000
275 786
275 833
193 275
948 275
409 275
275 988
539 275
275 267
187 275
367 275
556 275
425 275
295 275
275 763
587 275
73 275
40 275
275 709
912 275
64 275
847 275
275 979
275 520
239 275
701 275
477 275
275 454
356 275
906 275
420 275
814 275
739 275
30 275
275 95
502 275
550 275
275 230
275 ...

output:

1998 1998
275 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...

result:

points 1.0 correct answer = 1998; correct answer = 1998;

Test #30:

score: 38
Accepted
time: 1ms
memory: 3756kb

input:

989
740 463
740 19
531 322
740 544
177 531
531 147
937 531
740 365
876 740
750 740
67 531
881 740
740 838
765 740
740 304
344 740
22 531
740 176
491 531
772 740
531 187
833 740
531 933
372 740
740 840
740 295
740 685
740 769
452 531
740 471
740 766
740 846
531 971
740 590
740 212
720 740
721 740
166...

output:

1974 2962
531 1 2 3 4 5 6 7 740 8 10 11 12 13 14 15 9 16 17 19 18 21 22 20 23 25 26 27 28 24 29 31 32 30 33 35 36 37 38 39 40 41 42 43 44 45 46 34 47 49 50 51 52 53 54 55 56 57 48 59 58 61 62 63 64 65 66 67 68 69 70 71 60 72 74 75 76 77 78 73 79 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 80 97 ...

result:

points 1.0 correct answer = 1974; correct answer = 2962;

Test #31:

score: 38
Accepted
time: 1ms
memory: 4048kb

input:

1000
215 913
18 659
755 775
60 282
156 687
282 591
797 850
448 282
577 484
637 282
345 913
85 289
634 695
775 746
475 362
489 190
894 269
913 696
831 21
92 547
913 795
267 579
982 839
547 571
21 219
547 759
770 298
258 364
85 878
298 279
85 81
643 504
775 643
18 524
775 952
263 770
775 611
587 775
2...

output:

1940 7958
770 1000 81 425 282 4 3 7 755 5 803 1 298 396 891 579 14 942 15 13 991 12 9 19 22 16 10 85 364 695 489 29 8 23 11 95 547 643 34 32 982 27 26 40 38 41 39 31 475 47 43 51 48 50 53 35 45 25 49 42 36 55 839 6 999 24 33 30 67 52 17 58 69 73 20 913 37 54 78 70 973 72 60 65 992 64 71 74 80 44 82 ...

result:

points 1.0 correct answer = 1940; correct answer = 7958;

Test #32:

score: 38
Accepted
time: 1ms
memory: 3744kb

input:

888
310 287
55 464
55 160
2 713
73 237
427 193
2 61
679 55
45 73
117 73
73 432
55 785
797 861
704 55
312 861
397 73
474 317
73 43
434 474
213 861
566 801
861 301
230 73
737 2
134 566
427 337
480 55
11 73
577 861
427 114
674 474
887 185
429 427
861 723
316 474
861 819
206 732
73 346
568 55
887 20
2 8...

output:

1756 4288
861 881 55 206 1 427 5 474 310 7 73 4 10 12 11 14 9 13 18 887 15 8 20 23 566 21 19 25 6 2 30 29 22 26 31 27 17 35 36 34 24 32 40 42 43 37 41 45 48 47 44 50 28 51 875 49 56 53 52 3 38 39 61 33 59 60 57 58 46 64 63 54 885 72 70 65 74 66 62 68 71 75 79 69 80 85 77 16 81 67 84 78 90 88 91 93 8...

result:

points 1.0 correct answer = 1756; correct answer = 4288;

Test #33:

score: 38
Accepted
time: 1ms
memory: 3816kb

input:

1000
60 327
715 322
13 49
48 263
3 523
770 46
551 160
751 160
580 859
392 466
560 282
461 86
339 127
644 539
530 202
605 852
511 550
563 309
425 92
22 17
708 583
134 156
449 225
274 300
578 569
579 335
729 539
464 579
510 79
77 497
593 497
614 636
555 942
8 13
920 67
957 412
613 632
906 649
579 399
...

output:

1392 9628
746 701 990 630 900 669 975 988 996 210 416 985 913 767 451 943 22 433 494 272 743 670 994 823 106 945 881 853 941 695 319 972 54 928 778 998 816 825 134 343 67 385 713 209 963 770 837 997 13 789 726 293 309 918 909 802 89 716 16 327 438 981 977 613 339 874 920 537 948 310 19 300 351 818 6...

result:

points 1.0 correct answer = 1392; correct answer = 9628;

Test #34:

score: 38
Accepted
time: 1ms
memory: 3816kb

input:

987
543 539
482 744
58 699
322 99
741 808
107 99
248 230
247 917
934 869
438 424
248 258
393 578
632 704
786 418
683 882
679 730
849 46
203 968
33 972
155 223
799 154
154 291
527 867
424 739
731 323
424 484
158 86
452 679
799 686
138 818
672 600
424 853
424 247
331 261
734 772
754 780
15 103
482 552...

output:

1782 6554
138 754 474 99 129 4 769 41 6 217 5 58 849 8 103 10 466 183 141 9 845 19 867 13 323 70 20 16 886 11 935 572 972 17 30 28 315 36 29 664 861 893 1 43 27 24 750 21 48 14 49 59 331 51 966 946 216 981 753 54 702 482 38 22 45 65 34 39 68 881 223 56 291 190 35 158 69 626 12 50 77 64 81 271 18 76 ...

result:

points 1.0 correct answer = 1782; correct answer = 6554;

Test #35:

score: 38
Accepted
time: 1ms
memory: 4052kb

input:

975
645 307
416 645
377 175
639 842
527 377
591 444
134 7
42 569
305 194
598 758
7 209
850 175
598 975
471 393
303 444
614 320
126 598
671 194
444 564
728 444
338 598
324 947
733 891
906 515
124 752
175 470
752 243
727 645
547 455
670 499
687 444
590 444
662 552
7 175
444 39
349 444
597 444
473 639
...

output:

1874 5278
377 24 662 471 547 175 970 444 8 645 891 10 12 644 1 7 9 2 6 752 20 13 17 962 19 791 21 18 28 285 433 282 795 324 22 14 23 37 38 29 39 913 27 40 15 35 30 5 36 43 639 34 52 320 42 48 44 56 16 316 45 483 26 46 61 50 55 41 58 65 25 598 68 66 51 773 194 515 69 64 62 81 74 83 79 77 596 84 73 52...

result:

points 1.0 correct answer = 1874; correct answer = 5278;

Test #36:

score: 38
Accepted
time: 1ms
memory: 3816kb

input:

1000
538 932
941 662
61 662
90 217
276 538
721 260
75 979
217 53
235 684
769 662
538 497
662 355
414 662
147 217
235 309
44 235
217 689
156 217
498 235
52 217
217 617
709 662
662 510
306 662
583 752
578 662
721 258
662 603
217 249
286 235
734 75
662 165
291 721
721 482
917 110
340 235
538 800
217 42...

output:

1980 3906
902 1 662 217 3 110 5 235 538 9 4 11 12 7 14 15 10 16 13 18 75 6 20 19 22 23 17 583 26 29 21 2 30 24 34 8 36 35 33 32 38 41 27 37 953 42 39 46 48 43 47 49 52 53 54 55 51 56 57 31 59 58 61 44 63 50 62 66 65 67 40 28 69 64 995 73 76 77 78 74 60 79 82 70 68 84 83 87 86 89 85 71 721 90 88 95 9...

result:

points 1.0 correct answer = 1980; correct answer = 3906;

Test #37:

score: 38
Accepted
time: 1ms
memory: 4020kb

input:

1000
620 802
417 303
67 87
300 180
67 880
7 453
826 481
720 505
67 754
841 823
67 35
592 402
940 481
599 438
5 67
681 353
890 399
438 732
542 667
258 399
502 667
583 530
399 391
479 949
210 742
337 681
232 512
417 996
417 170
417 97
870 567
470 620
4 849
186 870
559 348
702 288
374 417
681 362
67 99...

output:

1890 6546
399 390 180 964 67 949 961 827 438 870 823 7 838 351 978 11 720 417 567 17 5 667 2 23 592 24 368 18 26 4 22 1 29 16 21 28 32 15 20 27 12 35 681 33 37 39 36 45 19 40 47 34 44 31 53 944 48 8 9 59 52 55 30 559 57 51 994 66 42 13 65 60 46 69 72 62 74 71 56 742 77 509 81 25 791 78 83 61 68 43 4...

result:

points 1.0 correct answer = 1890; correct answer = 6546;

Test #38:

score: 38
Accepted
time: 0ms
memory: 3712kb

input:

1000
520 185
785 97
15 774
521 437
421 163
906 123
869 429
520 538
459 70
97 943
178 39
475 97
742 637
705 417
502 520
57 705
487 123
627 97
469 59
403 123
165 437
123 264
369 538
231 57
786 715
96 15
762 794
437 744
692 893
794 437
135 437
794 74
765 9
305 57
924 15
57 965
469 559
520 163
690 449
1...

output:

1938 4626
470 97 926 520 437 794 5 57 997 9 10 469 893 12 981 538 4 791 18 315 16 123 7 119 2 15 163 26 8 25 6 29 305 17 22 3 20 637 178 839 13 40 36 28 744 21 878 691 14 42 30 50 51 705 35 55 991 52 49 32 690 43 54 34 39 23 63 19 62 856 56 27 65 31 70 60 71 61 68 64 11 76 67 73 78 81 53 87 58 47 79...

result:

points 1.0 correct answer = 1938; correct answer = 4626;

Test #39:

score: 38
Accepted
time: 1ms
memory: 3816kb

input:

999
683 443
89 76
60 664
625 39
3 811
337 527
687 154
956 443
695 664
702 100
290 957
20 445
154 397
260 823
347 154
620 299
339 664
154 851
170 620
397 781
68 154
155 264
823 555
281 445
620 697
397 213
815 75
811 896
953 397
290 997
154 13
677 664
9 823
527 166
544 154
989 445
11 39
75 570
535 39
...

output:

1938 4914
9 290 811 443 984 664 154 75 990 555 39 6 7 953 2 34 397 13 527 445 16 17 620 702 11 12 22 351 823 18 490 29 30 838 3 32 31 36 988 155 5 24 27 38 25 45 89 35 839 44 42 43 19 49 53 51 52 48 15 26 23 861 1 55 40 870 50 33 56 28 57 37 58 61 968 47 67 46 66 10 60 64 59 79 20 74 85 71 985 21 87...

result:

points 1.0 correct answer = 1938; correct answer = 4914;

Test #40:

score: 38
Accepted
time: 1ms
memory: 3964kb

input:

900
825 630
478 117
271 20
293 597
588 280
290 348
412 433
387 597
269 638
841 101
395 379
30 742
836 550
447 438
714 478
535 872
816 386
124 378
358 519
407 843
628 82
875 108
282 500
690 811
465 475
490 629
786 654
287 238
381 686
821 193
299 425
252 626
164 471
195 293
159 408
315 443
166 843
293...

output:

1066 7882
737 171 847 353 587 509 218 409 153 765 344 103 648 503 305 376 891 649 858 271 704 405 538 463 349 493 415 740 346 520 30 529 849 65 677 635 819 666 53 697 887 745 235 359 591 872 293 545 809 875 896 263 39 539 160 734 95 825 818 167 675 610 669 495 34 592 253 200 483 427 442 850 374 873 ...

result:

points 1.0 correct answer = 1066; correct answer = 7882;

Test #41:

score: 38
Accepted
time: 1ms
memory: 3736kb

input:

888
235 292
649 771
880 641
57 46
480 401
401 762
587 856
432 475
428 95
698 807
294 713
179 818
166 730
118 714
722 764
745 484
258 474
597 394
822 301
306 202
774 847
643 886
663 772
235 78
734 243
171 718
173 357
539 681
816 186
225 335
702 427
662 626
810 886
258 865
95 722
258 38
764 307
880 60...

output:

1144 10654
46 711 366 272 782 547 664 473 424 142 532 633 677 67 868 70 630 292 1 764 597 164 786 629 242 430 10 332 78 232 620 130 180 747 257 888 793 806 382 337 803 320 40 466 521 331 869 636 43 870 104 4 808 19 856 737 54 263 834 742 734 510 34 62 420 634 14 714 585 800 733 885 739 42 316 762 58...

result:

points 1.0 correct answer = 1144; correct answer = 10654;

Test #42:

score: 38
Accepted
time: 1ms
memory: 3628kb

input:

512
89 508
46 478
502 121
413 67
372 22
146 217
337 450
456 321
511 445
275 248
475 32
1 357
59 130
149 372
289 407
47 351
23 102
7 271
486 415
197 243
270 107
68 176
344 429
222 341
200 294
324 291
451 379
331 491
458 30
307 70
326 179
118 400
348 133
121 188
396 310
135 39
43 69
371 113
202 494
46...

output:

682 7190
392 488 460 491 386 8 271 308 194 438 226 310 495 78 307 131 443 53 372 437 496 471 407 237 110 205 492 435 247 458 211 479 448 106 504 441 444 118 436 83 362 13 69 25 480 478 9 382 43 173 320 393 353 50 434 470 87 336 348 442 245 224 422 418 326 333 476 265 484 31 445 324 97 147 259 99 230...

result:

points 1.0 correct answer = 682; correct answer = 7190;

Test #43:

score: 38
Accepted
time: 1ms
memory: 3764kb

input:

1000
749 604
537 255
155 171
608 433
9 347
189 482
269 714
955 137
134 903
730 26
18 478
563 64
722 990
270 587
237 29
67 419
792 574
587 59
797 48
581 91
826 262
87 589
417 649
10 59
693 668
400 678
639 826
541 590
925 96
319 537
348 675
615 429
73 335
987 150
362 243
49 125
169 507
207 266
318 702...

output:

1330 15930
183 467 569 242 53 901 290 293 347 929 941 917 983 129 73 254 761 478 902 351 72 595 664 714 340 730 326 525 237 114 331 125 743 324 128 62 456 27 830 856 60 350 637 623 918 329 1 797 590 307 746 66 465 109 674 339 923 57 587 122 935 561 163 563 741 991 630 755 411 633 74 409 198 179 988 ...

result:

points 1.0 correct answer = 1330; correct answer = 15930;

Test #44:

score: 38
Accepted
time: 1ms
memory: 3680kb

input:

513
505 334
136 410
403 254
205 286
43 133
274 127
257 389
355 335
182 30
494 221
134 365
354 468
293 204
482 326
418 489
221 458
471 22
173 176
71 461
348 194
190 81
434 459
432 123
420 260
207 483
83 494
506 379
302 184
340 510
465 466
159 57
418 392
77 110
164 436
246 353
462 363
64 72
298 58
177...

output:

684 7206
228 59 189 313 322 95 511 121 178 289 486 164 397 165 449 21 345 134 502 450 161 471 401 201 29 315 475 10 247 365 239 166 236 127 465 227 34 294 503 19 129 117 417 147 237 504 114 425 52 499 153 361 282 381 379 495 206 251 159 213 391 32 144 343 118 287 86 67 221 97 461 64 155 224 193 74 2...

result:

points 1.0 correct answer = 684; correct answer = 7206;

Test #45:

score: 38
Accepted
time: 1ms
memory: 3704kb

input:

1000
814 905
347 904
611 989
779 507
175 845
663 597
327 707
175 847
972 737
685 985
895 758
55 557
402 565
323 109
921 497
426 100
567 602
102 807
542 988
123 597
558 980
275 818
437 639
426 326
90 91
715 139
697 369
942 392
958 92
923 991
9 820
93 748
797 589
403 681
821 561
908 344
1 730
18 389
1...

output:

1596 9094
730 366 507 989 690 11 927 694 820 599 407 742 603 914 44 890 176 389 994 670 7 279 755 70 785 1 2 137 231 990 255 829 681 975 539 871 428 979 567 134 29 96 721 931 909 583 782 161 182 45 737 93 49 985 991 55 198 8 172 999 959 24 68 515 802 38 540 628 862 257 550 708 190 30 54 804 436 379 ...

result:

points 1.0 correct answer = 1596; correct answer = 9094;

Test #46:

score: 38
Accepted
time: 1ms
memory: 3760kb

input:

999
41 215
96 23
802 926
318 19
569 7
271 362
91 295
486 920
491 471
882 754
357 784
106 794
986 763
846 697
361 297
309 295
12 291
726 989
463 707
301 712
569 44
295 379
680 724
17 482
398 562
620 709
473 616
616 521
468 885
491 350
486 781
646 169
680 500
762 602
302 806
271 982
965 51
587 814
455...

output:

1814 5748
318 941 245 878 1 34 569 706 602 806 87 291 169 369 23 190 875 943 295 346 265 298 916 589 857 51 207 743 309 29 17 16 723 954 810 763 855 30 616 271 19 883 468 7 366 620 33 2 819 345 965 173 3 726 858 825 44 215 40 896 894 53 15 976 22 75 581 67 625 24 241 607 61 926 755 38 46 27 43 60 56...

result:

points 1.0 correct answer = 1814; correct answer = 5748;

Test #47:

score: 38
Accepted
time: 1ms
memory: 3704kb

input:

1000
553 877
155 71
446 981
20 558
254 673
558 1
322 83
553 933
597 810
155 569
585 246
836 254
728 203
55 558
1 847
23 1
775 246
739 246
615 246
558 446
997 810
619 558
810 574
560 203
83 740
446 887
246 364
885 558
203 850
1 445
203 269
830 558
254 255
707 155
925 1
246 72
900 254
1 164
232 203
55...

output:

1980 3794
977 810 553 1 4 446 558 3 8 83 5 6 7 155 14 15 16 13 254 18 246 9 11 10 20 21 12 26 17 2 30 25 19 22 23 27 31 29 32 36 35 39 42 203 40 43 34 47 37 41 33 28 52 38 46 48 45 49 44 59 24 56 60 62 53 57 63 64 54 55 69 65 61 73 72 71 68 50 58 67 80 77 993 81 74 82 76 87 88 78 86 91 51 93 85 70 9...

result:

points 1.0 correct answer = 1980; correct answer = 3794;

Subtask #3:

score: 50
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Test #48:

score: 50
Accepted
time: 48ms
memory: 17732kb

input:

90909
17758 575
3979 26221
88569 9552
14110 25350
82691 8857
4392 3854
29926 34058
58734 57918
79463 1578
72922 88952
29022 15060
7400 82837
22366 32557
40522 1551
11803 21395
67987 61163
61666 33213
76732 71510
12690 4331
45264 45547
33241 3589
42298 60029
175 16809
87099 33650
36724 90662
17339 82...

output:

111632 1514350
78262 67353 64675 18097 1061 84193 8355 77755 18757 81500 41894 30827 57733 41064 23891 542 44897 19955 31471 84394 9913 49756 64465 32369 68845 50665 32642 83020 13379 76143 211 80549 59751 65818 26185 38232 86524 90770 80396 46851 31029 14846 57727 88248 53951 68728 6306 42451 63099...

result:

points 1.0 correct answer = 111632; correct answer = 1514350;

Test #49:

score: 50
Accepted
time: 56ms
memory: 18896kb

input:

99999
54092 13956
13184 61256
33359 49486
66333 35721
18952 38623
44461 32240
7677 43577
10072 69601
51823 90760
3409 2346
35171 14267
11756 4958
1279 98439
6663 79391
41211 680
60131 26805
35555 6553
11752 25265
78423 9479
35573 84992
7615 93132
27092 45858
58284 43654
82163 19951
44496 80808
30235...

output:

128320 2159862
26795 19776 79437 9042 87240 53356 20611 75685 85148 19609 50280 74859 26911 28055 98100 19726 84050 12278 97404 83063 92119 90722 99619 51527 66526 89445 87445 2651 1116 21389 28065 73598 32246 30733 40514 10933 56434 93338 618 56089 44136 20373 70209 81802 30550 49647 31005 76358 22...

result:

points 1.0 correct answer = 128320; correct answer = 2159862;

Test #50:

score: 50
Accepted
time: 67ms
memory: 18892kb

input:

100000
8397 23570
15100 5651
49763 76387
86170 31489
73912 4373
40057 1373
44267 59312
8016 9571
69847 58672
6937 26585
59707 54569
11150 71161
79711 85747
50827 77535
53619 30774
40442 87404
174 11719
28697 64997
99081 58676
97130 34559
36772 82010
93606 4909
50756 30487
45617 4455
73129 58420
7307...

output:

123860 1952940
36635 93427 57549 54058 74168 95014 8038 47683 71860 60179 45907 78354 12977 14246 18660 93876 68573 74198 38263 65212 66237 79664 29395 98711 41109 48096 76221 1433 76381 10231 55422 97108 97381 81932 53765 8820 10128 49258 69434 58993 49612 11805 41661 41108 44045 20513 19286 76015 ...

result:

points 1.0 correct answer = 123860; correct answer = 1952940;

Test #51:

score: 50
Accepted
time: 41ms
memory: 15412kb

input:

77777
49943 35215
22761 10315
63949 60762
4297 59709
45833 48233
24906 70063
1043 24637
48007 35750
52453 36493
22069 3606
16535 2881
42152 50952
62168 47796
55820 54249
31137 17726
71771 10232
23669 19313
25535 61808
43055 75073
27628 61062
3909 15503
5234 8030
43698 40315
47559 43005
42986 14117
3...

output:

99504 1605682
34226 75028 43711 19310 6760 56789 42822 66005 31395 22604 48292 71164 16959 64388 37035 22051 47958 317 22066 39036 30299 10393 59411 1065 58836 34420 24133 69714 12989 61185 51232 72861 7498 29998 54329 1849 15141 64945 41692 61392 40612 40268 72277 66097 32280 46391 69791 16853 5305...

result:

points 1.0 correct answer = 99504; correct answer = 1605682;

Test #52:

score: 50
Accepted
time: 59ms
memory: 18720kb

input:

98765
26164 11043
13421 94996
26702 23597
51201 48250
67973 352
95881 8874
26458 74693
39046 88648
56736 47954
12216 65746
47531 21188
53614 90889
75649 88093
12503 85226
13085 17574
3182 88290
7886 11181
74066 20694
68687 85540
2669 95364
26971 65560
21145 71952
645 80289
96522 98194
6246 27803
294...

output:

121438 1740764
40273 18262 86267 22607 19920 63219 24926 92411 41753 1091 56496 84203 91790 26481 39379 57009 77559 18516 94297 41547 96328 95863 92295 73817 8851 98322 60553 67335 83392 10452 51207 85371 72318 93694 90691 91357 67052 12976 85549 96698 72589 22585 28615 33979 93970 42983 45777 39199...

result:

points 1.0 correct answer = 121438; correct answer = 1740764;

Test #53:

score: 50
Accepted
time: 59ms
memory: 17064kb

input:

88888
18007 20138
8462 60324
76528 52591
4898 80575
65204 88644
39569 56354
74132 32611
76206 80221
30915 52745
6143 32530
37410 31142
59677 25661
76412 76063
6660 37530
45897 15591
71856 63855
1803 81486
33589 37579
38044 36868
51718 27393
56500 62186
50198 1745
24687 49671
56093 47676
2749 5510
41...

output:

113806 1835832
35618 84550 77746 46565 27949 44060 72116 4262 48147 68390 8965 67051 76522 25061 34313 56086 36162 73512 41640 7588 15554 24687 34110 51276 13051 14840 60578 42782 42758 33243 35400 47002 67786 74075 31811 2900 75756 80930 81991 64779 35671 74714 27774 41262 56406 76940 88097 32449 7...

result:

points 1.0 correct answer = 113806; correct answer = 1835832;

Test #54:

score: 50
Accepted
time: 22ms
memory: 13152kb

input:

50000
14916 47169
33646 11209
38695 46961
47666 40483
17572 38925
37411 36620
4463 17026
40132 10341
17528 19481
4578 35441
46407 23708
41583 49270
1195 24736
44669 15788
3517 5379
3133 19387
32077 35038
28532 44617
35666 10962
43195 29214
27865 27035
110 63
43623 37912
49803 3591
32881 6416
13331 6...

output:

50000 1250000000
17058 6776 22005 23828 45874 39303 4476 14335 28363 17962 6383 14168 43413 43700 10945 12093 27445 35138 36634 29055 36476 44004 38418 37079 36303 22322 20233 38966 16768 25054 19677 231 19517 10469 34913 47267 40033 5554 3908 8808 19679 39204 4293 14118 24876 35880 17358 32695 7872...

result:

points 1.0 correct answer = 50000; correct answer = 1250000000;

Test #55:

score: 50
Accepted
time: 62ms
memory: 23328kb

input:

100000
34635 44783
29898 23005
11921 93048
26316 97267
76312 78003
44678 65267
92998 33803
18207 56360
97228 34583
51479 61204
15154 52716
55424 6281
26461 50794
52385 57566
45012 286
61533 53131
70762 40867
44304 47410
8330 48137
471 45034
86876 4416
8219 69916
90129 69737
91513 22330
28128 77098
9...

output:

100000 5000000000
16429 71778 52159 64739 78956 71205 90635 51220 84989 35155 65772 28847 35720 49758 81397 65734 91368 54768 98851 66373 103 30647 70581 65203 70270 69907 72714 79091 77499 70250 46984 55913 75404 44636 94542 71876 76988 49377 52894 80912 61976 15699 67811 27186 81576 87503 92977 56...

result:

points 1.0 correct answer = 100000; correct answer = 5000000000;

Test #56:

score: 50
Accepted
time: 63ms
memory: 20960kb

input:

100000
57874 74848
75513 33053
8252 73504
54317 83788
60111 13340
31363 50361
18099 58345
84161 14657
44767 33004
7985 30623
55979 10992
6046 17013
68042 57124
66489 22815
81861 10841
20185 88719
72124 59308
43981 25485
93741 19371
67292 25574
39133 49194
55685 66197
97964 53704
64571 75054
40228 42...

output:

110618 2504160170
84815 1128 43161 26134 41409 65941 13688 36412 25101 831 26535 37396 68895 84914 75911 84885 95744 89159 66197 17892 86419 13776 35692 48193 7963 13598 67754 6049 88218 22948 43632 58253 29513 55157 40524 6589 69523 22969 10051 72349 5190 33216 44062 5388 66307 70820 30067 34390 72...

result:

points 1.0 correct answer = 110618; correct answer = 2504160170;

Test #57:

score: 50
Accepted
time: 61ms
memory: 20084kb

input:

98765
81026 87591
95939 42505
22772 71253
58032 39973
83905 46725
9616 51346
90127 71702
16798 22229
74466 35601
53002 94854
14026 29206
36395 41515
19908 51464
55451 80213
41927 56419
17761 68704
57675 88162
39109 27245
78393 53771
73516 97673
10058 27149
60582 32042
63577 2879
11137 97742
19593 62...

output:

110634 1634005140
69272 39075 21524 34064 84436 52213 88637 54212 93355 26197 34169 45718 62650 89756 95811 15715 79365 82938 52585 36939 97235 80198 10125 90675 96177 40941 39635 95902 48155 59598 5037 59956 82476 14287 36041 80772 45699 26571 58050 44889 49853 63561 84249 70831 14789 31288 76352 2...

result:

points 1.0 correct answer = 110634; correct answer = 1634005140;

Test #58:

score: 50
Accepted
time: 64ms
memory: 19624kb

input:

100000
21659 3974
12194 694
75940 8912
96273 38672
95780 34408
14755 83593
74731 36134
456 71307
65344 26234
48183 38993
5303 37248
4527 14460
84382 77887
36991 47193
64329 27470
2326 58685
26601 13997
9625 46107
10647 16094
25195 95211
85068 49658
17059 9840
38230 15203
35339 51305
43188 31525
8652...

output:

112768 830383780
12719 90340 93533 65886 23745 32853 53812 31292 16139 82349 5555 6238 22816 37451 88934 14468 67703 5794 95978 31649 10143 58521 41073 21268 13255 61336 96542 71917 12622 21483 33069 81334 4461 86666 76954 82827 92857 78335 1657 67379 4907 6235 13451 19235 94472 68894 42671 54357 50...

result:

points 1.0 correct answer = 112768; correct answer = 830383780;

Test #59:

score: 50
Accepted
time: 52ms
memory: 18936kb

input:

100000
76978 82392
95351 80699
72534 98914
55636 92340
51114 53079
87369 16897
13382 68476
91961 67058
30326 38260
92346 69124
13572 17998
26610 62603
19103 76290
63391 82287
10466 86694
74552 96544
81984 81396
17931 31839
75637 24199
42173 60079
98253 95511
88390 76077
78642 92871
54168 53240
66642...

output:

132516 81728820
56946 23337 52724 55695 83550 64646 49391 26294 49014 87261 62216 77213 5908 78778 84303 78003 50417 90462 89461 58443 53787 60517 71830 15035 14546 9260 69476 30228 72286 7314 27920 68815 70962 95314 14678 51263 94137 12212 92541 65546 44641 56965 7536 1086 16360 70336 85256 42881 8...

result:

points 1.0 correct answer = 132516; correct answer = 81728820;

Test #60:

score: 50
Accepted
time: 74ms
memory: 18880kb

input:

100000
6298 68124
6298 92167
43605 6298
20237 6298
63882 6298
17208 6298
6298 8987
35761 6298
6298 37845
6298 12511
6298 84393
6298 4322
6298 70916
77435 6298
6298 13009
3497 6298
6298 32572
6298 97863
3877 6298
6298 3043
6298 89660
6298 61248
77168 6298
6298 74790
39750 6298
6298 3914
6298 73268
44...

output:

199998 199998
6298 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97...

result:

points 1.0 correct answer = 199998; correct answer = 199998;

Test #61:

score: 50
Accepted
time: 60ms
memory: 18880kb

input:

100000
42523 18318
78023 33382
42523 74647
51119 93379
42523 74276
35982 31079
86097 73375
73375 37592
88260 78023
51119 16060
51119 41589
31079 76077
78023 895
31079 80768
33854 73375
81020 31079
73375 23846
73375 32020
72275 51119
78023 20372
91098 78023
76149 73375
31079 10682
65827 51119
31079 6...

output:

199990 359886
78023 73375 2 42523 1 31079 5 6 8 51119 10 3 7 11 13 12 15 17 18 19 16 21 4 20 23 9 24 14 28 25 30 29 31 27 33 34 26 36 37 38 22 40 35 32 43 39 46 47 45 41 50 48 42 52 54 53 44 49 57 51 56 58 59 61 55 64 60 63 67 66 69 71 72 73 65 62 74 77 78 68 80 79 76 70 75 82 86 87 85 81 90 91 83 8...

result:

points 1.0 correct answer = 199990; correct answer = 359886;

Test #62:

score: 50
Accepted
time: 72ms
memory: 18884kb

input:

100000
61154 13087
5895 20067
53687 86061
65229 2888
82566 2913
77544 1083
64861 21491
60935 82827
94490 81164
2751 80045
36174 20082
23301 28396
4507 38899
3671 75923
97876 10985
1083 8128
94690 61154
83849 67805
14978 44250
53687 13493
82995 30707
79102 65229
80669 5895
60831 14829
64861 31115
326...

output:

199800 932808
12021 1689 11626 4905 69081 13627 28955 73071 1 3671 60935 44823 53687 60565 21351 56260 78349 32611 1017 60793 8814 5 93750 87272 32893 14 25 53516 12149 31174 16412 36858 21 65229 99649 44250 23591 76501 31 4959 8 34 77881 49933 23301 10 11431 97876 36174 11334 37 35 9795 68716 38271...

result:

points 1.0 correct answer = 199800; correct answer = 932808;

Test #63:

score: 50
Accepted
time: 72ms
memory: 17992kb

input:

93829
47115 19407
23207 63386
17281 25733
40288 38302
337 2745
91558 51272
22370 40783
13789 52003
37083 8059
27675 38898
16630 62411
5446 7537
48460 75134
75503 42782
39428 2789
53303 44469
17049 13789
33819 78840
93481 56041
45430 54823
47115 47902
59366 26785
68439 80701
88748 31652
25730 88748
8...

output:

187472 837534
10598 35631 75243 25733 22370 42426 80701 84812 3 49481 5097 3383 61909 70842 71428 51802 29033 38898 18143 5 13 79695 59034 11273 4338 75134 19731 54823 1 2259 20484 84255 123 1395 1022 47115 20 32 43305 337 7 12017 62221 4 19 2 37124 14 8373 39 10 11 68418 69043 91545 21289 49 6859 4...

result:

points 1.0 correct answer = 187472; correct answer = 837534;

Test #64:

score: 50
Accepted
time: 62ms
memory: 18920kb

input:

100000
6074 30016
92873 16202
89382 94763
84451 61695
55410 77311
70734 1348
84717 93254
322 16517
36660 36555
19763 29256
45432 79846
56371 47603
1293 45667
80748 61938
60378 65283
7214 68770
33315 41354
19205 30453
85874 7272
6461 92941
21152 40823
31531 70537
88385 43025
62239 37094
76000 64945
3...

output:

181934 1209576
92980 95205 23846 82330 21868 56371 26508 75820 25914 38500 74404 10411 34422 19384 85523 90884 62924 6742 46699 88823 87328 65590 63557 2857 71282 75862 94838 30832 85690 18699 89045 67836 71094 90927 14092 52764 87258 77060 93673 99242 78822 92452 73722 73394 7433 77623 91965 91648 ...

result:

points 1.0 correct answer = 181934; correct answer = 1209576;

Test #65:

score: 50
Accepted
time: 58ms
memory: 18948kb

input:

100000
62417 92075
9076 90574
1978 20625
80303 97502
99109 81465
6723 90574
85715 28319
10212 82521
67762 54591
7926 61407
34194 58080
94103 50110
95676 49819
66386 38478
95660 19111
66186 81032
97417 34022
66146 26540
57859 22135
31461 26768
14198 72129
36051 71315
68973 73771
8786 72861
17058 5867...

output:

197998 1179808
73039 50110 17058 11048 3 60610 21269 82308 81465 54964 44309 65911 9 9121 24634 55942 74881 40474 5414 8369 46755 80482 77090 60969 34061 63912 70156 67557 17438 15420 26 14758 99763 12 13221 1829 87050 20625 81950 13 76753 29 20734 8 69285 27042 279 5901 83299 8184 43319 20 1731 36 ...

result:

points 1.0 correct answer = 197998; correct answer = 1179808;

Test #66:

score: 50
Accepted
time: 63ms
memory: 17984kb

input:

93737
25805 12771
58579 81355
40517 64871
32105 61687
7811 38363
39 60019
92788 69703
80392 8638
69458 60914
28508 74958
44040 33277
76080 88615
32105 2051
31640 56251
12235 44072
7811 33026
28297 3146
74710 32807
37813 57534
16768 61620
48071 91372
12742 56251
61620 3372
22308 39
80509 53749
34275 ...

output:

187266 676668
39 81355 12235 56251 17336 93249 1 23969 78500 91372 56139 10 4 7 82294 7961 34275 38971 80509 91741 28972 40517 57213 16 72048 22 74958 24 13 14 33533 28 34386 30 67963 77935 32 34 93706 3 38 19 23 36 18 41 45 46 26 48 49 37 9793 50 52 33277 54 57 83275 58 55 35 51 21 63 36831 7811 40...

result:

points 1.0 correct answer = 187266; correct answer = 676668;

Test #67:

score: 50
Accepted
time: 48ms
memory: 15012kb

input:

73820
68064 38747
62935 55677
38747 58570
22710 4111
65275 38747
35710 48769
38747 23670
72818 38747
34638 11917
38747 33628
38747 66577
56980 38923
38747 71252
11366 67900
60971 38923
38747 36433
38747 56366
22710 7426
5505 38747
60963 34638
50309 38923
22710 40719
18272 11366
5124 22710
66588 3874...

output:

147618 308338
34638 1 56014 38747 38923 4 6 22710 2 9 7 11 10 13 11366 12 14 16 18 19 8 21 70763 20 22 17 5 26 24 27 30 28 32 33 25 34 29 36 38 37 40 35 41 39 43 44 45 46 47 49 42 50 31 52 51 55 54 56 57 48 59 15 60 58 61 65 63 67 68 64 69 35710 71 66 70 3 74 23 77 75 79 80 73 81 82 83 85 76 84 86 3...

result:

points 1.0 correct answer = 147618; correct answer = 308338;

Test #68:

score: 50
Accepted
time: 55ms
memory: 16584kb

input:

84739
27645 6266
38069 44689
82910 62243
64459 18141
3766 67772
79199 63315
6984 83607
33618 26140
3281 34449
77905 74209
39039 13877
27099 50860
78270 68531
17315 13537
9539 48165
71932 81912
3093 55744
50723 28194
56519 2659
41178 15309
66588 12487
76725 69893
39845 82843
82370 15791
12054 72466
4...

output:

164500 943500
16626 57940 65305 4123 5623 25673 6307 36087 29084 83377 4977 78270 7002 5084 7931 30361 5603 59087 82370 2593 12499 79249 38387 33906 8575 56066 58505 64613 13189 10063 19889 22 75899 11225 6 77035 5929 44361 5 6185 68084 24621 83133 24609 29477 83004 79983 26143 935 3281 9727 3886 62...

result:

points 1.0 correct answer = 164500; correct answer = 943500;

Test #69:

score: 50
Accepted
time: 68ms
memory: 18936kb

input:

100000
36497 69443
57547 46832
48779 2175
24154 77660
49565 41399
52180 80166
2105 56691
37345 33567
2041 26971
41967 16118
78293 78726
91173 29725
93733 45461
90296 62428
34733 83769
76626 20346
47219 15731
81322 75681
65022 219
11203 47989
3993 42788
31517 44794
65357 48584
23855 6477
46900 79318
...

output:

199368 633508
24154 70740 64853 3 47989 52815 99872 83523 77307 76836 43714 21251 77773 55257 1405 49565 7 50248 12 91126 67637 36497 53702 11139 77175 34958 44443 91887 10 5699 62572 99306 27 90097 65692 66388 38886 58344 34 21 79876 90340 34320 37 16 29 34365 42788 99989 18971 80700 33481 14 23601...

result:

points 1.0 correct answer = 199368; correct answer = 633508;

Test #70:

score: 50
Accepted
time: 60ms
memory: 18028kb

input:

93830
5353 89021
42613 10223
62115 81879
34643 18962
76473 5353
4056 4
63378 3164
32851 91689
2518 26936
1309 45627
86974 62153
12093 80379
1172 17485
18649 33293
39255 42562
16938 24457
3653 15693
1541 15201
48606 20698
17492 91689
79239 53179
8731 14575
72896 32618
57110 11569
68213 12567
281 2508...

output:

187052 572628
72397 38677 4519 93798 3 69167 143 40332 84816 76281 281 87 50079 37141 36111 277 87578 58071 34150 17339 38221 18942 2153 226 90800 89873 1525 9181 12093 27 3343 70490 58029 17485 50239 4 30 1541 52657 35 78182 835 62155 40787 15 36 62153 79239 25 16415 14677 51870 50 12221 88663 3963...

result:

points 1.0 correct answer = 187052; correct answer = 572628;

Test #71:

score: 50
Accepted
time: 42ms
memory: 14276kb

input:

69696
66494 391
17982 64558
13321 10790
28456 6163
59410 33383
18936 15319
5133 18630
54526 61701
48508 4262
32037 62911
66399 23511
2981 65113
31417 58821
37834 39033
39250 43655
32689 4362
28364 58039
4813 11992
61478 60973
25333 15194
3850 729
12679 60601
50842 19341
3929 42447
45909 17885
16630 ...

output:

138866 431180
25641 26583 45359 65113 12282 46484 23426 31741 65022 46793 10097 59410 24546 63080 22595 60249 67470 4262 5042 58821 53949 5105 7438 40792 34151 46114 69430 27617 15 32907 7 4 23 5133 52979 69231 35 33 42447 58039 42975 16 36106 37 13453 14950 52586 19341 58163 63356 40 31802 24 21 2 ...

result:

points 1.0 correct answer = 138866; correct answer = 431180;

Test #72:

score: 50
Accepted
time: 49ms
memory: 15640kb

input:

78987
50446 31217
10794 66216
18480 62852
70322 27242
6686 12303
19970 58804
55986 2835
35829 66681
70335 58144
30611 31562
59624 51532
57846 42319
151 497
27730 1734
74029 34949
70160 65556
18487 56667
38834 11982
32742 69375
31417 28044
33529 21420
68415 51617
5177 2699
65556 72700
27377 78961
600...

output:

157414 480886
78694 78045 78609 51617 39633 44333 78862 78335 77615 96 74048 14980 639 5177 26087 4185 7777 66239 13753 7 13729 31562 20 10886 74764 18867 19051 46775 2 1 16613 41053 21193 78803 5 75106 68845 84 54232 69228 34561 10 53757 1117 12 35 25057 62567 64385 58144 53469 4 3379 34 182 51377 ...

result:

points 1.0 correct answer = 157414; correct answer = 480886;

Test #73:

score: 50
Accepted
time: 62ms
memory: 18924kb

input:

99909
67987 37873
59438 18344
69248 60837
80284 72449
82067 44182
7347 66943
204 99576
20051 93553
16699 42974
50963 131
30206 18503
84146 81416
40002 20626
20959 74043
96265 49617
50869 65018
22501 6623
88439 74277
66330 61579
15157 85873
52321 60174
72666 32099
96871 33612
32525 8346
72291 13831
8...

output:

199190 621708
92195 44182 51753 99 31940 26701 89981 18815 75593 20051 66943 1529 59438 15881 49617 29196 2111 99906 51189 12238 17589 81742 19 3703 87662 27188 7263 369 28531 3 28577 33612 64965 97359 76846 81473 47685 91620 22 11463 77045 54284 89113 15 54216 33 95052 71981 2295 66330 22501 49933 ...

result:

points 1.0 correct answer = 199190; correct answer = 621708;

Test #74:

score: 50
Accepted
time: 47ms
memory: 17684kb

input:

91413
18433 23117
39518 88780
73634 8375
51086 79039
29685 34503
89810 38630
81368 88746
82927 57444
82104 85400
5906 40542
75577 71148
48623 64005
51512 27586
17173 16511
88746 26255
53758 63629
40899 62791
83800 33391
16089 40303
36362 63446
79889 47281
46465 12939
31493 28594
81159 73849
31493 19...

output:

182222 564658
65997 30635 50995 3301 4 18546 2385 1957 82087 29155 36431 33725 39865 12248 15299 8375 463 57911 16089 24887 17341 31493 1039 14 17173 13 72405 17 26 10559 16423 27 10 5079 40899 14537 91385 35841 12459 28 21065 76353 81870 39893 38685 91043 13375 31 3493 87422 30 15 15495 32 11601 75...

result:

points 1.0 correct answer = 182222; correct answer = 564658;

Test #75:

score: 50
Accepted
time: 53ms
memory: 18884kb

input:

100000
19102 79795
15934 47159
11990 20192
16296 51154
97096 27289
4939 91163
2673 42185
1806 13975
48842 10897
26719 19468
26399 9106
1560 63915
52883 66592
18838 46497
39164 1171
67607 11022
96214 28225
96535 32935
4887 10753
27029 87166
96412 97892
2527 4868
35044 4617
1126 96434
65672 48049
2398...

output:

133328 2875752
73315 96421 90669 82582 59186 8395 95070 42079 84599 82106 45725 23856 89392 17977 93748 23758 85218 9705 8373 8899 98711 92198 161 77293 75075 73719 55701 51994 21992 20800 86502 35322 47681 78603 5743 71211 14613 61929 74006 61721 47309 80571 19600 30925 55545 56972 85255 38788 2149...

result:

points 1.0 correct answer = 133328; correct answer = 2875752;

Test #76:

score: 50
Accepted
time: 65ms
memory: 19036kb

input:

100000
75186 63877
30682 67959
59008 68830
13637 63860
94404 70388
88997 2416
90186 89995
6381 74173
39644 1479
8990 93543
34924 80311
21555 38157
83335 82822
47379 66027
58545 93415
83098 55197
79276 12395
57124 68551
98957 87628
44742 96005
81802 68017
57385 97315
26358 93734
75229 72243
42347 838...

output:

149996 1934292
26039 99185 72332 94984 9493 31074 35634 3176 62537 52203 76850 13547 82176 98932 99247 91395 67099 81820 28641 13574 70287 50070 52303 93729 89914 58177 60530 27747 80675 68226 27803 15425 98956 37555 80934 89926 69199 77464 33525 99062 92490 33806 96713 60753 88484 77871 7493 13682 ...

result:

points 1.0 correct answer = 149996; correct answer = 1934292;

Test #77:

score: 50
Accepted
time: 45ms
memory: 18036kb

input:

93930
41507 82962
74769 3770
72031 54394
13069 62632
45450 83050
13961 63651
15741 74408
23828 24545
49293 25901
74902 68758
34601 8724
91009 12415
25226 79318
21677 57210
35979 45086
14102 12495
72158 47754
51907 35373
90680 67546
53596 88867
42317 11762
9873 67021
866 50185
40981 90832
30093 85377...

output:

169070 977694
72093 29177 49331 89412 46510 8151 7782 10633 90951 66259 83111 68430 61091 90795 90600 93231 4723 11559 39149 91555 89027 86112 73352 92066 5573 23685 53288 57122 93254 85770 63032 22986 65697 70203 90249 91736 27422 6855 91420 23700 5469 8058 8724 78285 70886 83218 66293 59908 2589 3...

result:

points 1.0 correct answer = 169070; correct answer = 977694;

Test #78:

score: 50
Accepted
time: 36ms
memory: 13856kb

input:

66666
2708 28938
18111 55593
46507 60492
28211 60354
62177 42106
32334 46682
54891 60720
12631 32446
33964 14077
33843 53751
10493 48939
48573 15925
47187 42344
42818 14380
28170 62539
63144 21807
46841 4470
27694 45562
3165 43146
3215 65473
7421 63611
32774 63019
61958 43387
40532 31463
21685 53001...

output:

114280 798958
27643 1239 48563 55070 54488 334 15579 58864 10665 61404 24275 2143 3966 46691 61759 12 52843 60898 39091 42134 52947 9251 4578 59404 65880 64573 22371 45858 52011 27531 60944 42963 49261 42886 51791 56956 55805 62597 44887 12615 4503 24404 457 32178 2835 15289 269 34782 58385 41091 65...

result:

points 1.0 correct answer = 114280; correct answer = 798958;

Test #79:

score: 50
Accepted
time: 42ms
memory: 15400kb

input:

77777
49369 24449
54325 6946
35965 66783
76466 71203
2951 49141
58917 10371
2247 50627
17325 45488
64322 10832
54119 16739
71942 22004
5669 59682
30435 46823
75426 8464
49716 45345
11249 63092
53811 30685
50209 59714
981 22555
24635 3770
12609 18627
59905 51515
5014 30189
54811 7392
69500 39567
6452...

output:

136106 887574
72441 35809 52283 57383 46588 23078 37893 72809 30631 69578 60718 8084 77628 55254 66294 10071 57558 3407 33695 59240 1379 43584 66568 17705 37906 45996 77607 43013 66957 77557 16959 101 71394 11773 28687 5029 63224 21107 25123 44637 13985 23773 74069 2038 7835 4468 48996 20990 58258 6...

result:

points 1.0 correct answer = 136106; correct answer = 887574;

Test #80:

score: 50
Accepted
time: 55ms
memory: 18968kb

input:

99999
34134 31512
55415 48626
9899 98702
24742 36230
68336 49341
47014 26483
8014 23654
80819 6762
4106 2043
53126 95878
40268 15773
38569 82908
17144 593
61589 33340
21595 14286
2307 46262
13520 33753
97081 21121
64483 80578
37007 75704
27327 32104
79431 38166
75683 39406
13333 86195
52529 60493
45...

output:

133328 2875718
15929 21115 32419 80377 17633 46114 6575 83399 99038 82070 6461 78811 90969 85085 21290 74897 31851 90962 65999 90163 12722 47451 98118 7993 21979 42619 20258 47830 75772 90220 59129 70332 99737 87931 11962 83081 72342 98753 99932 57506 70449 19509 41523 10056 89885 86107 37161 28937 ...

result:

points 1.0 correct answer = 133328; correct answer = 2875718;

Test #81:

score: 50
Accepted
time: 52ms
memory: 18056kb

input:

93792
74714 28726
23910 20740
3508 41621
37903 76011
72483 64428
16621 2707
26752 16310
4099 66364
69520 23944
68543 26259
70570 38828
3615 51139
42643 6953
44734 75053
17579 54545
47875 81814
78574 49423
20229 3741
70837 3534
59233 83851
92737 92812
1120 57640
15001 8970
35263 51813
86949 62582
143...

output:

177160 749346
39759 67623 88964 88219 91901 87622 16230 23956 79391 83730 49639 3162 91039 18362 26966 68032 24403 81492 68571 38716 13809 46859 80050 90502 20247 82857 3401 81057 65887 10691 10149 35377 8429 91565 92894 11446 87264 3012 78977 14211 40467 12578 29407 69353 30574 528 84215 40201 7226...

result:

points 1.0 correct answer = 177160; correct answer = 749346;

Test #82:

score: 50
Accepted
time: 63ms
memory: 18792kb

input:

99123
2797 6945
30658 68802
61712 84113
62236 90495
7451 10575
503 52469
18199 28556
34303 50085
3793 18450
79309 37327
76471 2366
60651 15777
86221 75493
93198 91391
76798 43771
12482 60504
31236 53949
87601 70233
287 95910
96819 3931
17535 8267
55279 45400
43114 41790
79370 12949
39345 23475
47591...

output:

196644 563982
71164 2771 81375 70490 18100 10501 95713 2623 65635 20709 97853 849 73985 1387 42673 81446 84113 6 35383 98881 78605 22758 80878 415 27191 45803 44435 53789 48003 87726 9855 75743 95799 44630 78 17943 15777 57150 68664 503 50007 81991 57444 697 38811 253 70897 1973 19641 91391 3365 985...

result:

points 1.0 correct answer = 196644; correct answer = 563982;