QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#530828#5706. Villageisirazeev50 121ms32376kbC++201.5kb2024-08-24 17:22:002024-08-24 17:22:00

Judging History

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

  • [2024-08-24 17:22:00]
  • 评测
  • 测评结果:50
  • 用时:121ms
  • 内存:32376kb
  • [2024-08-24 17:22:00]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;
#define int long long

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr), cout.tie(nullptr);
    int n;
    cin >> n;
    set<int> g[n];
    vector<int> start[n];
    for (int i = 0; i < n - 1; i++) {
        int u, v;
        cin >> u >> v;
        start[u - 1].emplace_back(v - 1);
        start[v - 1].emplace_back(u - 1);
        g[u - 1].insert(v - 1);
        g[v - 1].insert(u - 1);
    }
    int res = 0, p[n], from[n];
    for (int i = 0; i < n; i++) p[i] = i, from[i] = i;
    set<pair<int, int>> st;
    for (int i = 0; i < n; i++) st.insert({(int) g[i].size(), i});
    while ((int) st.size() >= 2) {
        int v = st.begin()->second;
        st.erase(st.begin());
        int u = *g[v].begin();
        if (p[v] == v) {
            p[v] = u, p[from[u]] = v;
            from[v] = from[u];
            from[u] = v;
            res += 2;
        }
        st.erase({(int) g[u].size(), u});
        g[u].erase(v);
        g[v].erase(u);
        if (!g[u].empty())
            st.insert({(int) g[u].size(), u});
    }
    int v;
    for (v = 0; v < n; v++) {
        if (p[v] == v) break;
    }
    if (v < n) {
        int u = start[v][0];
        res += 2;
        p[v] = u;
        p[from[u]] = v;
    }
    cout << res << " " << res << "\n";
    for (int i = 0; i < n; i++) cout << p[i] + 1 << " ";
    cout << "\n";
    for (int i = 0; i < n; i++) cout << p[i] + 1 << " ";
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 6
Acceptable Answer

Test #1:

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

input:

4
1 2
2 3
3 4

output:

4 4
2 1 4 3 
2 1 4 3 

result:

points 0.50 correct answer = 4; jury has the better answer;

Test #2:

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

input:

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

output:

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

result:

points 0.50 correct answer = 8; jury has the better answer;

Test #3:

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

input:

2
1 2

output:

2 2
2 1 
2 1 

result:

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

Test #4:

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

input:

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

output:

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

result:

points 0.50 correct answer = 8; jury has the better answer;

Test #5:

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

input:

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

output:

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

result:

points 0.50 correct answer = 8; jury has the better answer;

Test #6:

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

input:

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

output:

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

result:

points 0.50 correct answer = 8; jury has the better answer;

Test #7:

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

input:

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

output:

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

result:

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

Test #8:

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

input:

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

output:

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

result:

points 0.50 correct answer = 10; jury has the better answer;

Test #9:

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

input:

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

output:

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

result:

points 0.50 correct answer = 14; jury has the better answer;

Test #10:

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

input:

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

output:

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

result:

points 0.50 correct answer = 10; jury has the better answer;

Test #11:

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

input:

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

output:

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

result:

points 0.50 correct answer = 10; jury has the better answer;

Test #12:

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

input:

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

output:

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

result:

points 0.50 correct answer = 10; jury has the better answer;

Test #13:

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

input:

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

output:

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

result:

points 0.50 correct answer = 14; jury has the better answer;

Test #14:

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

input:

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

output:

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

result:

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

Test #15:

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

input:

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

output:

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

result:

points 0.50 correct answer = 14; jury has the better answer;

Test #16:

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

input:

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

output:

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

result:

points 0.50 correct answer = 16; jury has the better answer;

Test #17:

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

input:

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

output:

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

result:

points 0.50 correct answer = 12; jury has the better answer;

Subtask #2:

score: 19
Acceptable Answer

Dependency #1:

50%
Acceptable Answer

Test #18:

score: 19
Acceptable Answer
time: 1ms
memory: 3708kb

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 316
17 44 58 65 189 130 24 249 230 179 89 61 106 74 122 255 237 63 207 35 175 68 55 7 87 75 70 147 100 159 83 212 98 54 20 102 152 79 80 43 46 154 136 2 125 78 123 38 137 221 57 18 213 34 76 71 222 3 178 169 129 95 52 173 97 82 229 22 84 27 56 116 200 14 228 224 203 172 48 104 251 96 31 168 181 ...

result:

points 0.50 correct answer = 316; jury has the better answer;

Test #19:

score: 19
Acceptable Answer
time: 0ms
memory: 3784kb

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 636
186 331 73 415 410 395 474 446 203 38 1 491 117 4 19 22 170 107 228 87 466 83 253 211 447 486 188 276 385 425 292 145 115 25 487 465 153 51 481 44 229 154 164 40 159 236 264 127 490 279 10 184 378 12 437 422 303 48 16 473 226 293 192 163 262 340 349 428 414 6 150 277 3 394 34 99 267 391 443 ...

result:

points 0.50 correct answer = 636; jury has the better answer;

Test #20:

score: 19
Acceptable Answer
time: 1ms
memory: 3732kb

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 614
95 121 215 242 68 385 386 56 290 18 133 324 51 149 495 357 143 120 321 427 379 296 1 282 482 492 481 417 165 319 364 216 202 35 164 115 128 332 284 318 185 53 287 73 225 270 424 161 159 307 13 378 236 248 192 312 119 212 469 438 12 180 145 453 175 350 11 308 277 299 118 291 473 276 90 240 17...

result:

points 0.50 correct answer = 614; jury has the better answer;

Test #21:

score: 19
Acceptable Answer
time: 1ms
memory: 3932kb

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 1294
255 640 626 408 78 286 98 792 65 703 21 972 391 547 940 114 83 218 541 622 151 891 662 306 121 608 381 9 90 558 313 605 103 274 621 251 830 441 961 51 979 337 310 263 380 687 494 117 169 745 234 293 546 84 75 718 288 716 748 988 71 76 368 667 725 623 157 539 299 119 122 197 584 409 93 591 ...

result:

points 0.50 correct answer = 1294; jury has the better answer;

Test #22:

score: 19
Acceptable Answer
time: 1ms
memory: 3872kb

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 1244
717 224 295 861 505 475 187 491 378 404 308 650 931 681 652 581 49 937 835 212 839 392 73 560 895 993 166 41 105 617 156 860 893 167 326 81 214 180 347 385 129 503 530 391 12 282 692 99 17 342 103 335 568 448 447 528 267 748 43 920 708 490 646 343 894 215 277 418 236 137 348 145 898 516 19...

result:

points 0.50 correct answer = 1244; jury has the better answer;

Test #23:

score: 19
Acceptable Answer
time: 1ms
memory: 3860kb

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 1266
918 668 723 527 277 440 865 785 609 330 16 284 518 920 401 186 782 586 427 777 261 933 371 93 986 270 378 457 241 393 48 490 575 205 190 852 646 363 101 764 214 387 636 695 724 675 447 31 365 366 743 420 540 55 334 264 191 864 467 312 305 370 840 907 684 746 698 502 210 314 551 408 613 801...

result:

points 0.50 correct answer = 1266; jury has the better answer;

Test #24:

score: 19
Acceptable Answer
time: 0ms
memory: 3812kb

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 1000
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 42...

result:

points 0.50 correct answer = 1000; jury has the better answer;

Test #25:

score: 19
Acceptable Answer
time: 0ms
memory: 3928kb

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 1140
729 314 111 310 147 12 120 207 115 750 648 6 247 36 355 840 114 924 287 650 419 949 475 122 31 836 53 464 733 153 25 217 880 712 713 14 110 673 528 49 628 709 717 293 255 119 686 455 40 700 937 789 27 68 366 849 866 911 285 676 771 282 304 748 286 636 702 309 753 2 559 414 801 265 154 174 ...

result:

points 0.50 correct answer = 1140; jury has the better answer;

Test #26:

score: 19
Acceptable Answer
time: 1ms
memory: 3792kb

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 1028
64 732 571 357 22 754 828 474 507 21 713 404 23 222 894 547 369 477 99 133 10 39 13 213 552 899 117 819 544 792 847 391 865 558 716 291 875 242 5 639 155 65 533 708 565 255 118 254 172 78 87 176 90 719 371 904 723 842 109 586 180 348 102 1 42 292 752 817 742 68 897 688 695 245 793 856 542 ...

result:

points 0.50 correct answer = 1028; jury has the better answer;

Test #27:

score: 19
Acceptable Answer
time: 0ms
memory: 3948kb

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 1002
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 930 ...

result:

points 0.50 correct answer = 1002; jury has the better answer;

Test #28:

score: 19
Acceptable Answer
time: 1ms
memory: 3936kb

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 1248
97 88 219 129 600 128 507 427 99 58 851 719 511 112 624 21 248 323 178 563 872 612 107 145 609 343 171 967 182 834 965 377 855 333 163 958 450 699 68 383 221 896 236 979 619 813 341 273 84 848 74 230 227 411 134 223 345 147 176 358 776 366 259 590 299 170 937 833 340 220 454 893 245 342 31...

result:

points 0.50 correct answer = 1248; jury has the better answer;

Test #29:

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

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
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 99 100 ...

result:

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

Test #30:

score: 19
Acceptable Answer
time: 0ms
memory: 3820kb

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

result:

points 0.50 correct answer = 1974; jury has the better answer;

Test #31:

score: 19
Acceptable Answer
time: 0ms
memory: 3876kb

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 1940
12 165 7 6 10 64 8 33 23 27 35 22 20 17 19 26 71 119 24 75 131 25 34 66 58 43 42 116 32 68 48 40 67 39 56 61 77 45 47 44 46 60 51 90 57 133 50 53 59 54 52 70 55 78 62 111 97 72 129 83 177 96 110 86 84 108 69 199 73 80 87 82 74 88 135 158 92 79 104 89 3 91 103 118 28 93 105 99 117 149 100 1...

result:

points 0.50 correct answer = 1940; jury has the better answer;

Test #32:

score: 19
Acceptable Answer
time: 1ms
memory: 4108kb

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 1756
5 30 60 12 7 29 10 22 17 13 15 14 18 16 21 88 37 19 27 23 26 33 24 41 28 34 36 53 32 31 35 42 64 40 38 39 46 61 62 43 47 44 45 51 48 69 50 49 56 52 54 59 58 72 3 57 67 68 65 66 63 79 71 70 76 78 90 80 84 75 81 74 11 77 82 98 87 92 83 85 89 123 99 91 86 97 101 94 104 93 95 118 96 100 108 10...

result:

points 0.50 correct answer = 1756; jury has the better answer;

Test #33:

score: 19
Acceptable Answer
time: 0ms
memory: 4168kb

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 1392
166 701 95 630 856 220 760 242 749 664 416 985 49 767 451 59 670 433 71 272 208 17 307 823 88 945 712 615 500 959 671 415 918 870 256 234 816 498 534 340 920 385 713 244 109 206 837 432 894 789 726 293 445 33 118 802 70 130 155 243 205 532 247 358 127 874 41 338 131 310 494 274 351 818 601...

result:

points 0.50 correct answer = 1392; jury has the better answer;

Test #34:

score: 19
Acceptable Answer
time: 1ms
memory: 3936kb

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 1782
43 758 549 6 11 9 169 14 20 16 30 79 24 50 765 28 34 85 22 27 48 64 120 46 431 108 45 36 39 35 151 265 505 67 75 38 92 63 68 289 8 282 44 121 65 219 406 49 51 80 54 374 179 60 181 72 985 12 52 94 202 214 128 82 66 88 100 69 77 26 155 174 196 276 90 86 81 332 105 98 83 123 110 330 159 188 1...

result:

points 0.50 correct answer = 1782; jury has the better answer;

Test #35:

score: 19
Acceptable Answer
time: 1ms
memory: 3932kb

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 1874
15 18 188 122 48 19 16 9 17 12 186 13 22 36 45 59 23 28 25 21 27 35 37 2 71 63 43 29 40 47 192 219 331 52 46 49 38 39 41 44 68 55 50 57 61 64 113 56 102 66 75 53 161 172 67 58 110 69 93 195 65 81 262 80 70 74 112 73 79 135 114 126 89 83 137 94 86 178 85 104 82 96 84 88 92 105 119 95 91 154...

result:

points 0.50 correct answer = 1874; jury has the better answer;

Test #36:

score: 19
Acceptable Answer
time: 1ms
memory: 3876kb

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 1980
2 32 5 11 7 22 14 36 10 17 12 13 19 15 16 18 27 20 24 23 31 25 26 34 107 29 43 72 30 33 60 40 39 35 38 37 44 41 47 71 42 46 50 64 559 48 51 49 52 66 57 53 54 55 56 58 59 62 61 81 63 67 65 74 69 68 70 85 73 84 92 245 76 80 21 77 78 79 82 101 112 83 87 86 91 89 88 95 90 94 98 102 104 97 96 1...

result:

points 0.50 correct answer = 1980; jury has the better answer;

Test #37:

score: 19
Acceptable Answer
time: 1ms
memory: 3868kb

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 1890
32 23 240 30 21 143 12 58 59 140 16 41 70 99 38 34 20 28 49 39 35 31 24 26 84 29 40 36 33 63 54 37 44 52 42 47 45 276 46 50 118 69 90 53 48 73 51 57 100 92 66 61 55 94 62 79 65 108 60 72 88 76 160 123 71 68 5 89 74 255 78 75 109 77 102 151 81 86 416 113 83 110 87 162 165 98 103 112 97 115 ...

result:

points 0.50 correct answer = 1890; jury has the better answer;

Test #38:

score: 19
Acceptable Answer
time: 1ms
memory: 3872kb

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 1938
92 25 36 17 7 31 23 29 10 11 81 14 41 49 26 21 34 19 68 37 46 35 66 119 30 28 72 44 32 51 74 60 116 64 55 43 124 166 65 42 98 50 62 95 280 112 90 213 59 52 53 58 87 63 56 71 8 89 93 76 78 69 67 80 73 130 83 79 94 75 77 114 84 181 191 82 120 85 91 113 86 102 108 152 175 115 88 103 104 290 1...

result:

points 0.50 correct answer = 1938; jury has the better answer;

Test #39:

score: 19
Acceptable Answer
time: 1ms
memory: 3876kb

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 1938
63 15 35 130 41 12 13 94 1 80 25 26 18 219 59 21 22 30 53 85 90 27 61 42 45 60 43 70 32 33 37 36 68 16 48 38 72 44 11 65 363 51 52 50 46 78 76 58 54 67 56 57 55 169 64 69 71 73 83 81 74 103 146 82 106 79 77 116 93 244 88 191 95 86 8 128 111 132 84 107 112 129 102 92 87 97 91 101 47 99 120 ...

result:

points 0.50 correct answer = 1938; jury has the better answer;

Test #40:

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

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 1066
737 171 235 353 516 509 218 409 624 237 344 210 648 401 305 376 341 649 858 123 704 670 87 590 349 373 418 740 346 31 70 199 849 65 677 211 549 666 53 697 887 745 788 359 591 184 195 545 809 875 896 263 39 539 339 331 714 327 205 167 496 610 669 495 34 892 253 200 483 512 507 484 374 873 4...

result:

points 0.50 correct answer = 1066; jury has the better answer;

Test #41:

score: 19
Acceptable Answer
time: 1ms
memory: 3836kb

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 1144
19 637 101 272 219 547 388 473 424 27 227 723 648 67 345 119 86 320 54 764 597 250 282 142 242 224 298 359 654 156 620 130 117 141 601 888 678 806 223 43 649 74 49 466 184 1 680 636 94 665 2 373 808 57 856 310 331 176 834 686 879 64 34 346 350 166 14 559 585 16 453 264 195 42 81 149 567 29...

result:

points 0.50 correct answer = 1144; jury has the better answer;

Test #42:

score: 19
Acceptable Answer
time: 1ms
memory: 4024kb

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 682
392 212 321 487 386 308 280 6 194 438 232 396 42 247 318 378 210 353 149 185 472 132 225 255 44 82 358 104 512 455 70 475 143 446 215 170 261 400 135 424 301 495 327 110 385 139 9 328 69 54 142 340 18 173 101 272 180 94 133 236 245 119 198 252 326 192 413 176 484 211 511 324 296 147 402 134 ...

result:

points 0.50 correct answer = 682; jury has the better answer;

Test #43:

score: 19
Acceptable Answer
time: 1ms
memory: 3828kb

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 1330
47 274 481 740 465 901 203 293 712 929 143 857 818 807 198 523 260 302 185 897 409 392 140 733 510 201 38 223 687 738 364 310 107 324 787 62 456 326 617 639 122 782 252 848 794 934 183 869 590 493 291 991 5 463 832 158 58 923 587 41 935 561 163 563 117 52 630 564 411 633 179 21 15 71 884 1...

result:

points 0.50 correct answer = 1330; jury has the better answer;

Test #44:

score: 19
Acceptable Answer
time: 0ms
memory: 3684kb

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 684
512 59 100 182 485 198 146 121 264 28 409 436 303 92 256 21 262 172 40 259 161 442 366 201 247 78 185 289 25 365 186 62 428 127 465 222 34 283 393 502 112 357 133 147 94 456 473 89 361 499 91 49 220 413 506 312 79 251 159 234 416 166 390 72 126 80 68 86 221 139 333 343 490 76 188 224 269 315...

result:

points 0.50 correct answer = 684; jury has the better answer;

Test #45:

score: 19
Acceptable Answer
time: 1ms
memory: 3820kb

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 1596
26 27 383 311 260 144 21 58 578 127 6 282 267 517 414 529 270 389 809 365 349 266 530 62 292 362 171 336 41 74 201 118 95 339 214 151 598 66 469 460 135 146 721 15 50 627 318 179 53 308 635 129 592 75 437 812 198 250 640 152 258 197 408 162 208 620 160 63 570 24 525 157 375 396 391 330 290...

result:

points 0.50 correct answer = 1596; jury has the better answer;

Test #46:

score: 19
Acceptable Answer
time: 0ms
memory: 3944kb

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 1814
5 48 53 157 178 135 44 98 112 95 149 101 114 188 63 32 31 110 295 86 143 65 15 70 172 313 78 102 30 38 104 151 47 6 296 109 193 76 92 59 709 154 79 57 136 77 501 176 158 82 26 129 62 117 256 81 107 152 226 80 73 122 93 976 133 119 68 150 209 142 97 113 217 328 66 237 85 155 214 333 397 235...

result:

points 0.50 correct answer = 1814; jury has the better answer;

Test #47:

score: 19
Acceptable Answer
time: 1ms
memory: 3876kb

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 1980
4 30 8 5 11 12 13 9 22 24 23 27 18 15 16 17 29 20 33 25 26 34 35 61 32 28 36 52 38 31 37 39 51 47 41 40 49 54 42 45 50 43 46 59 57 55 48 56 58 78 93 53 65 69 70 62 66 79 60 63 73 64 67 68 72 138 80 77 71 96 76 75 74 85 98 87 82 90 105 81 84 86 10 107 95 91 88 89 103 101 92 120 94 106 100 9...

result:

points 0.50 correct answer = 1980; jury has the better answer;

Subtask #3:

score: 25
Acceptable Answer

Dependency #1:

50%
Acceptable Answer

Dependency #2:

50%
Acceptable Answer

Test #48:

score: 25
Acceptable Answer
time: 103ms
memory: 29104kb

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 111632
55451 74527 64675 17581 68660 4922 5761 32783 18757 81500 22369 6427 42484 41064 23891 80102 17497 88356 31471 84394 28795 9193 64465 32369 38029 35974 32642 32283 13379 27040 27916 33934 59751 65818 26185 18902 86524 3813 33289 2928 31029 85263 7995 88248 53951 52464 31363 42451 52795...

result:

points 0.50 correct answer = 111632; jury has the better answer;

Test #49:

score: 25
Acceptable Answer
time: 107ms
memory: 31588kb

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 128320
52903 19776 68055 13145 87240 41873 62741 22526 79227 19609 50280 7447 5168 28055 98100 19726 84050 6642 97404 65093 92119 39134 58628 47895 66526 89445 9956 3514 1116 21389 28065 73598 83206 30733 89066 6216 56434 93338 618 23635 44136 20373 28457 41311 40077 57444 31005 154 40960 105...

result:

points 0.50 correct answer = 128320; jury has the better answer;

Test #50:

score: 25
Acceptable Answer
time: 121ms
memory: 31584kb

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 123860
29419 52295 57549 48964 62464 41269 8038 83230 4656 60179 57222 41095 12977 14246 18660 65558 38823 80413 38263 65212 21192 69455 29395 98711 41109 48096 68414 1433 76381 10231 55422 97108 88062 81932 7996 8820 11398 49258 55200 54480 49612 41806 12356 41108 87423 80257 19286 61962 356...

result:

points 0.50 correct answer = 123860; jury has the better answer;

Test #51:

score: 25
Acceptable Answer
time: 80ms
memory: 25368kb

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 99504
34226 75028 62505 19310 6760 46046 15714 12837 31395 22604 22504 33846 36782 64388 1417 22051 4481 9984 22075 39036 15068 10393 59411 1065 36474 34420 1874 2107 15434 25228 51232 26418 14981 29998 4092 1849 15141 64945 46650 61392 42888 40268 31576 66097 1303 41279 10023 13431 53057 2465...

result:

points 0.50 correct answer = 99504; jury has the better answer;

Test #52:

score: 25
Acceptable Answer
time: 110ms
memory: 31196kb

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 121438
40273 76663 7593 22607 49576 60288 24926 92411 41753 1091 56496 76445 91790 6805 40763 57009 5027 18516 94297 38031 35478 46301 91421 53009 8851 98322 60553 46017 32408 480 51207 40883 72318 90438 1564 1525 59222 12976 31816 63085 72589 22585 16998 33979 93970 19448 45777 37554 96294 7...

result:

points 0.50 correct answer = 121438; jury has the better answer;

Test #53:

score: 25
Acceptable Answer
time: 99ms
memory: 28540kb

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 113806
35618 46462 77746 5408 21120 44060 10789 62847 21813 31794 8965 11499 88118 27853 29721 204 54717 64674 41640 7588 7336 18028 50967 51276 249 21641 58466 42782 43669 1234 35400 1803 27939 49972 31811 2900 20177 20940 9743 64779 29134 71669 47859 11999 67497 7349 33846 19734 72996 66401...

result:

points 0.50 correct answer = 113806; jury has the better answer;

Test #54:

score: 25
Acceptable Answer
time: 41ms
memory: 17492kb

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 50000
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 3595...

result:

points 0.50 correct answer = 50000; jury has the better answer;

Test #55:

score: 25
Acceptable Answer
time: 94ms
memory: 30928kb

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 100000
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 56041 ...

result:

points 0.50 correct answer = 100000; jury has the better answer;

Test #56:

score: 25
Acceptable Answer
time: 103ms
memory: 31488kb

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 110618
84815 48396 43949 26134 41409 65941 65666 36412 25101 96577 26535 37396 68895 26628 75911 84885 95744 89159 55685 17892 86419 13776 85336 48193 7963 13598 67754 6049 88218 22948 43632 58253 83016 55157 9311 6589 69523 894 56639 72349 5190 33216 44062 5388 55974 70820 48953 34390 39369 ...

result:

points 0.50 correct answer = 110618; jury has the better answer;

Test #57:

score: 25
Acceptable Answer
time: 110ms
memory: 31320kb

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 110634
69272 30504 21524 68497 13344 52213 88637 33512 93355 26197 85399 45718 62650 89756 10499 15715 79365 82938 44664 36939 97235 80198 10125 90675 47600 40941 91600 95902 8831 59598 68884 59956 82476 14287 36041 80772 45699 26571 58050 44889 40805 12734 84249 57556 14789 31288 45618 21199...

result:

points 0.50 correct answer = 110634; jury has the better answer;

Test #58:

score: 25
Acceptable Answer
time: 111ms
memory: 31500kb

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 112768
12719 90340 6638 49171 23745 32853 53812 31292 16139 82349 20382 6238 22816 37451 88934 25125 67703 5794 95978 31649 10143 58521 37858 21268 68892 61336 3470 71917 12622 21483 33069 81334 4461 48580 76954 82827 75776 78335 1657 18656 4907 6235 6790 19235 81613 68894 42671 54357 9428 13...

result:

points 0.50 correct answer = 112768; jury has the better answer;

Test #59:

score: 25
Acceptable Answer
time: 117ms
memory: 31572kb

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 132516
56946 18960 33481 75741 79924 31247 5514 1222 35195 43663 8949 10294 30667 78778 12487 78003 48085 11671 54383 9779 1361 14731 71830 12107 3252 26521 41533 51435 3695 8077 27109 14401 41397 7011 2863 9892 974 6089 2031 1762 44641 99431 3167 27063 16360 200 19760 3871 8378 2541 21447 12...

result:

points 0.50 correct answer = 132516; jury has the better answer;

Test #60:

score: 50
Accepted
time: 98ms
memory: 31336kb

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
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 99 ...

result:

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

Test #61:

score: 25
Acceptable Answer
time: 109ms
memory: 31320kb

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

result:

points 0.50 correct answer = 199990; jury has the better answer;

Test #62:

score: 25
Acceptable Answer
time: 95ms
memory: 31856kb

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 199800
9 122 102 190 22 83 85 41 130 46 99 290 140 26 109 171 81 79 145 168 33 315 799 78 27 249 104 226 456 119 39 483 319 42 52 220 51 223 92 180 746 93 581 74 94 207 98 198 299 66 129 114 82 156 80 97 61 222 86 68 186 73 141 165 75 166 90 339 484 240 136 187 157 134 444 333 120 183 89 101 ...

result:

points 0.50 correct answer = 199800; jury has the better answer;

Test #63:

score: 25
Acceptable Answer
time: 102ms
memory: 30176kb

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 187472
29 46 9 44 20 135 41 60 76 51 52 175 21 48 63 284 80 64 45 37 233 208 117 533 91 83 77 65 82 111 332 38 81 166 322 157 181 90 50 86 148 159 102 106 170 215 112 132 57 147 108 71 303 79 223 110 67 70 99 268 384 210 115 97 66 161 235 116 151 72 107 474 354 238 198 134 92 357 155 93 158 3...

result:

points 0.50 correct answer = 187472; jury has the better answer;

Test #64:

score: 25
Acceptable Answer
time: 112ms
memory: 31960kb

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 181934
4255 95205 933 2829 4829 6925 51303 1054 62 16997 564 46123 1811 278 1332 1971 14003 5997 4796 1215 7071 15778 737 89 625 2049 1493 33369 7878 9528 936 25003 77 1754 11923 10985 5399 11456 1014 539 392 3664 2533 1934 3190 5229 98 10345 2592 461 4871 21150 7282 805 4126 175 13627 1285 3...

result:

points 0.50 correct answer = 181934; jury has the better answer;

Test #65:

score: 25
Acceptable Answer
time: 104ms
memory: 32284kb

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 197998
528 105 5 2417 344 694 367 44 13 1587 971 34 40 2294 74 65 1715 130 1206 52 186 132 281 345 182 31 2739 437 42 791 935 238 953 263 167 54 195 103 232 58 714 708 131 243 578 272 104 1900 127 566 7802 143 269 156 801 612 136 73 728 155 4157 129 569 532 69 1382 1324 2765 79 703 415 753 11...

result:

points 0.50 correct answer = 197998; jury has the better answer;

Test #66:

score: 25
Acceptable Answer
time: 98ms
memory: 30220kb

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 187266
7 159 40 13 107 139 14 122 85 12 75 165 29 30 93 24 252 45 42 1939 64 26 43 28 463 49 84 32 83 34 198 37 216 38 62 44 52 41 1 68 46 80 97 133 47 48 87 50 51 54 63 55 374 57 61 183 58 60 882 71 70 140 65 82 111 135 126 143 181 79 74 88 730 77 112 164 86 244 81 96 95 154 275 123 167 91 8...

result:

points 0.50 correct answer = 187266; jury has the better answer;

Test #67:

score: 25
Acceptable Answer
time: 84ms
memory: 24120kb

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 147618
2 9 76 6 27 7 11 21 10 13 12 16 14 17 62 18 26 19 20 24 22 25 78 29 35 28 30 32 37 31 53 33 34 36 42 38 40 39 44 41 43 51 45 46 47 48 49 60 50 52 55 54 100 57 56 58 59 64 61 63 65 166 67 70 66 74 68 69 71 75 73 141 83 77 80 88 79 97 81 82 84 85 86 89 87 90 94 110 93 92 115 98 96 95 113...

result:

points 0.50 correct answer = 147618; jury has the better answer;

Test #68:

score: 25
Acceptable Answer
time: 88ms
memory: 27760kb

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 164500
12806 2032 337 685 39 35 158 3346 3403 2488 819 164 176 1627 414 161 2665 33572 129 109 97 32 143 3736 198 353 616 261 141 452 181 588 125 555 67 243 83 400 340 76 252 393 5093 704 638 2527 7171 676 166 518 234 3527 998 1704 202 4078 1053 10700 570 736 135 3383 789 605 3249 496 366 528...

result:

points 0.50 correct answer = 164500; jury has the better answer;

Test #69:

score: 25
Acceptable Answer
time: 107ms
memory: 32376kb

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 199368
116 68 4 100 1043 782 17 312 1490 29 107 19 1587 53 590 45 284 142 292 90 40 127 375 415 145 181 33 93 46 481 288 389 102 39 194 504 44 508 187 164 204 940 105 62 444 125 780 133 156 173 182 78 73 2741 160 65 269 877 3507 150 75 162 178 641 335 295 224 74 115 319 461 138 114 211 97 251...

result:

points 0.50 correct answer = 199368; jury has the better answer;

Test #70:

score: 25
Acceptable Answer
time: 104ms
memory: 30368kb

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 187052
152 199 5 36 159 1812 465 78 120 196 94 173 158 72 45 225 424 369 149 114 482 151 472 348 49 358 30 92 80 37 162 1085 99 354 40 46 147 83 58 178 59 300 1405 313 420 109 3798 70 61 53 374 136 75 110 210 64 107 141 259 93 464 145 603 427 182 130 725 171 773 222 359 154 583 315 242 905 73...

result:

points 0.50 correct answer = 187052; jury has the better answer;

Test #71:

score: 25
Acceptable Answer
time: 69ms
memory: 23416kb

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 138866
1114 55 62 32 157 354 31 1215 66 83 1146 74 288 493 29 42 147 70 271 135 54 1922 33 53 184 240 1480 188 67 727 107 156 38 63 37 303 44 192 134 51 261 189 94 123 223 345 1021 166 64 1212 158 57 89 170 65 544 60 1094 472 121 2391 191 77 1560 73 108 75 177 203 80 1377 193 110 175 146 90 3...

result:

points 0.50 correct answer = 138866; jury has the better answer;

Test #72:

score: 25
Acceptable Answer
time: 80ms
memory: 26380kb

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 157414
30 29 119 52 35 196 20 163 1418 42 526 45 105 336 99 489 291 301 2129 23 621 398 169 80 2106 423 165 720 86 66 446 75 128 54 46 82 173 654 635 168 138 114 1315 92 219 273 117 223 464 486 118 100 679 666 1227 132 135 127 65 142 126 110 145 67 77 104 101 175 180 153 415 304 188 1467 133 ...

result:

points 0.50 correct answer = 157414; jury has the better answer;

Test #73:

score: 25
Acceptable Answer
time: 101ms
memory: 32164kb

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 199190
270 114 30 61 127 1132 203 244 256 466 492 732 501 422 44 1653 486 167 23 134 133 39 73 67 69 126 547 241 553 151 178 183 46 168 1133 251 80 120 91 1126 140 900 115 155 139 104 130 53 523 188 250 389 381 639 108 177 888 137 77 720 917 337 273 246 399 378 441 110 135 304 83 113 384 227 ...

result:

points 0.50 correct answer = 199190; jury has the better answer;

Test #74:

score: 25
Acceptable Answer
time: 82ms
memory: 29668kb

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 182222
215 468 82 5 91 663 62 426 308 33 337 329 26 24 52 216 28 294 84 113 98 190 93 187 636 29 32 40 61 51 48 54 85 70 90 127 276 189 174 76 266 207 1571 60 68 406 299 86 520 552 339 278 353 639 194 1723 157 167 138 79 104 71 10438 111 565 778 293 652 186 74 191 386 160 110 1183 302 360 105...

result:

points 0.50 correct answer = 182222; jury has the better answer;

Test #75:

score: 25
Acceptable Answer
time: 99ms
memory: 32372kb

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 133328
40498 51344 86351 80760 80811 39691 12021 42079 31658 60416 45725 34612 15152 24117 39296 44995 5154 9705 85484 8899 81930 75062 30152 25285 64250 73719 73071 30130 67162 20943 6226 20074 52306 34686 60888 58654 38857 9516 64533 6740 78427 3234 76222 89765 68091 37834 3359 60982 47627 ...

result:

points 0.50 correct answer = 133328; jury has the better answer;

Test #76:

score: 25
Acceptable Answer
time: 120ms
memory: 31504kb

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 149996
36732 83736 41760 43230 40418 43275 27640 45969 63712 52203 24407 13591 55434 78598 43329 48261 8900 24864 5811 33788 35246 22714 44453 1181 74841 23049 72861 27747 10086 64981 31279 8844 23930 1109 29204 89926 26828 32356 56584 23383 57852 422 60957 53328 70002 61301 37082 41896 96442...

result:

points 0.50 correct answer = 149996; jury has the better answer;

Test #77:

score: 25
Acceptable Answer
time: 108ms
memory: 30448kb

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 169070
8289 42775 5302 1082 17971 1630 11864 23417 1487 10153 12026 17171 1926 10278 15394 4716 5867 5705 5728 14875 7178 10589 1034 2272 7467 38680 3873 14428 27854 4520 3013 11150 23677 364 8374 2607 26744 34940 10236 17259 6209 26854 8508 3953 8326 3769 4005 2481 14695 10502 2363 15973 113...

result:

points 0.50 correct answer = 169070; jury has the better answer;

Test #78:

score: 25
Acceptable Answer
time: 67ms
memory: 22440kb

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 114280
12789 1239 17531 1983 7095 9486 5902 12882 113 3770 42791 2143 7971 13300 11157 12 21382 19022 15190 10564 18355 33797 12804 26510 760 5688 3154 13653 829 3591 42406 11626 19509 11050 10569 8398 46345 16378 337 65340 1710 20977 2809 1357 33727 18021 721 16526 15291 8264 2512 30222 4524...

result:

points 0.50 correct answer = 114280; jury has the better answer;

Test #79:

score: 25
Acceptable Answer
time: 87ms
memory: 25440kb

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 136106
3443 8161 23907 9820 33708 3793 16306 49023 4026 31190 60718 7956 2108 2588 1307 20527 18928 14371 33695 59240 49669 12455 4592 6342 11598 3090 20786 12318 52186 9817 25022 27451 20475 4153 2994 23053 5799 51860 3149 1647 13698 14037 8044 9115 4987 7431 25487 10401 10885 61063 36852 51...

result:

points 0.50 correct answer = 136106; jury has the better answer;

Test #80:

score: 25
Acceptable Answer
time: 112ms
memory: 32104kb

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 133328
73431 67996 26032 10157 54128 46114 6575 36270 32505 22952 6461 60822 90969 63598 82285 568 7407 90962 83279 80617 12722 78099 13184 45504 14801 42619 85084 14632 75772 21923 41093 94010 56736 87931 11962 83081 84233 56103 99932 60437 14259 19509 11297 92758 73804 57566 86658 28937 780...

result:

points 0.50 correct answer = 133328; jury has the better answer;

Test #81:

score: 25
Acceptable Answer
time: 100ms
memory: 30556kb

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 177160
4210 28643 841 3925 3284 1566 664 849 6078 9089 9258 4462 4642 267 6484 11862 2750 11253 2932 3985 7674 14199 8732 3971 1327 2078 5031 8680 4521 2789 18416 3793 3944 3026 180 9656 7733 3695 7526 4242 3395 1734 12331 6855 20826 7571 18431 2316 7244 1518 2509 8347 2744 1010 5367 495 1153...

result:

points 0.50 correct answer = 177160; jury has the better answer;

Test #82:

score: 25
Acceptable Answer
time: 106ms
memory: 31820kb

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 196644
491 1233 129 1783 311 18 1041 2095 639 1027 103 259 858 2187 267 1086 277 133 537 510 562 295 5124 140 346 1898 210 241 1640 173 631 309 823 1017 177 115 130 255 53 144 458 817 905 1566 1177 1012 910 378 114 807 683 736 405 2337 937 980 903 215 1775 278 151 675 156 82 165 1525 272 252 ...

result:

points 0.50 correct answer = 196644; jury has the better answer;