QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#69841 | #2124. Ranking sklepów internetowych [C] | mik | 10 ✓ | 109ms | 3552kb | C++14 | 461b | 2023-01-02 05:02:54 | 2023-01-02 05:02:57 |
Judging History
answer
#include <cstdio>
int I[500001];
int main ()
{
int n;
scanf ("%i", &n);
for (int i=0; i<n; i++)
{
int a;
scanf ("%i", &a);
if (a>=n/2) I[n-a] = i;
}
int p = I[0], q = I[0];
long long s = 1;
for (int l=2; l<=n; l++)
{
int r = I[l/2];
p -= (p>r)*(p-r);
q += (r>q)*(r-q);
int k = n-(n>p+l)*(n-p-l) - q-(l-1>q)*(l-1-q);
s += (k>0)*k;
}
printf ("%i %lli\n", n+n+1, s);
return 0;
}
详细
Subtask #1:
score: 1
Accepted
Test #1:
score: 1
Accepted
time: 1ms
memory: 1664kb
input:
5 1 4 3 5 2
output:
11 5
result:
ok single line: '11 5'
Test #2:
score: 0
Accepted
time: 1ms
memory: 1736kb
input:
1 1
output:
3 1
result:
ok single line: '3 1'
Test #3:
score: 0
Accepted
time: 1ms
memory: 1732kb
input:
20 19 10 16 5 15 9 3 13 18 20 6 12 7 8 14 1 11 2 17 4
output:
41 3
result:
ok single line: '41 3'
Test #4:
score: 0
Accepted
time: 1ms
memory: 1612kb
input:
20 7 11 6 19 8 2 20 3 9 10 4 5 13 16 18 17 1 12 14 15
output:
41 4
result:
ok single line: '41 4'
Test #5:
score: 0
Accepted
time: 1ms
memory: 1732kb
input:
20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
output:
41 20
result:
ok single line: '41 20'
Test #6:
score: 0
Accepted
time: 0ms
memory: 1792kb
input:
20 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
output:
41 20
result:
ok single line: '41 20'
Test #7:
score: 0
Accepted
time: 0ms
memory: 1660kb
input:
20 1 3 5 7 9 11 13 15 17 19 20 18 16 14 12 10 8 6 4 2
output:
41 77
result:
ok single line: '41 77'
Test #8:
score: 0
Accepted
time: 1ms
memory: 1700kb
input:
20 6 8 13 16 20 18 19 14 17 15 9 12 5 2 4 11 1 7 3 10
output:
41 53
result:
ok single line: '41 53'
Test #9:
score: 0
Accepted
time: 1ms
memory: 1552kb
input:
20 4 12 14 15 2 9 6 18 20 3 13 16 10 5 19 7 17 1 11 8
output:
41 9
result:
ok single line: '41 9'
Test #10:
score: 0
Accepted
time: 0ms
memory: 1688kb
input:
20 6 8 9 1 10 14 4 16 18 20 19 7 17 15 13 12 11 5 3 2
output:
41 65
result:
ok single line: '41 65'
Subtask #2:
score: 1
Accepted
Test #11:
score: 1
Accepted
time: 1ms
memory: 1600kb
input:
400 370 216 374 361 28 142 324 21 399 191 336 334 306 339 179 36 104 396 58 275 231 263 279 92 30 146 390 135 34 64 255 173 160 17 277 299 167 185 8 114 242 244 84 66 341 385 365 296 178 362 111 73 126 309 37 86 230 372 32 156 378 182 189 25 163 211 292 149 7 77 225 55 264 52 46 76 376 295 61 139 23...
output:
801 3
result:
ok single line: '801 3'
Test #12:
score: 0
Accepted
time: 1ms
memory: 1796kb
input:
400 32 259 275 307 235 131 350 111 88 80 205 164 137 143 61 35 181 140 231 229 68 272 51 130 74 274 343 195 197 230 23 12 297 187 334 115 362 142 329 93 270 321 315 255 63 73 273 250 157 192 170 85 337 182 381 163 77 191 102 339 132 386 336 196 295 395 84 107 189 212 317 369 109 353 20 359 308 125 2...
output:
801 3
result:
ok single line: '801 3'
Test #13:
score: 0
Accepted
time: 1ms
memory: 1588kb
input:
400 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 99 100 101 ...
output:
801 400
result:
ok single line: '801 400'
Test #14:
score: 0
Accepted
time: 0ms
memory: 1588kb
input:
400 400 399 398 397 396 395 394 393 392 391 390 389 388 387 386 385 384 383 382 381 380 379 378 377 376 375 374 373 372 371 370 369 368 367 366 365 364 363 362 361 360 359 358 357 356 355 354 353 352 351 350 349 348 347 346 345 344 343 342 341 340 339 338 337 336 335 334 333 332 331 330 329 328 327 ...
output:
801 400
result:
ok single line: '801 400'
Test #15:
score: 0
Accepted
time: 1ms
memory: 1736kb
input:
400 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 175...
output:
801 26867
result:
ok single line: '801 26867'
Test #16:
score: 0
Accepted
time: 1ms
memory: 1736kb
input:
400 69 143 150 157 161 184 186 196 162 140 123 1 83 137 109 11 37 38 107 166 183 138 22 130 189 105 174 154 8 61 29 110 171 127 113 86 67 16 60 176 44 163 124 104 89 95 19 49 58 68 3 52 71 5 122 85 66 169 108 102 43 82 6 56 99 48 41 160 24 31 111 75 2 28 77 146 79 155 198 202 207 209 42 215 218 219 ...
output:
801 1097
result:
ok single line: '801 1097'
Test #17:
score: 0
Accepted
time: 0ms
memory: 1568kb
input:
400 195 184 198 188 64 159 138 74 134 153 112 204 192 162 163 10 120 22 103 132 150 97 42 48 19 145 111 55 172 116 71 69 63 213 45 54 49 60 168 14 33 46 9 72 98 206 50 166 223 178 197 102 32 186 130 228 219 215 11 232 41 106 4 196 47 157 234 169 89 154 236 231 237 222 17 77 29 144 57 68 240 94 26 12...
output:
801 164
result:
ok single line: '801 164'
Test #18:
score: 0
Accepted
time: 1ms
memory: 1728kb
input:
400 11 8 10 13 20 3 25 23 32 33 35 15 36 38 42 5 44 16 46 60 34 62 17 40 63 61 68 69 73 27 76 78 52 48 79 50 81 2 84 56 85 86 45 87 90 91 47 92 93 26 94 95 97 70 39 98 100 96 101 102 22 103 106 1 107 108 105 109 110 111 55 18 116 6 118 119 121 12 19 123 113 124 75 127 37 130 131 117 133 134 135 77 7...
output:
801 15153
result:
ok single line: '801 15153'
Subtask #3:
score: 1
Accepted
Test #19:
score: 1
Accepted
time: 1ms
memory: 1736kb
input:
750 555 259 676 23 429 656 545 82 414 661 618 691 464 510 337 27 28 519 526 145 119 441 473 706 144 148 577 652 471 255 629 424 330 224 156 358 711 329 478 4 740 262 311 97 176 430 686 183 173 407 189 68 392 588 60 677 461 75 592 359 111 17 198 70 732 107 162 398 123 532 654 425 263 603 52 15 375 72...
output:
1501 2
result:
ok single line: '1501 2'
Test #20:
score: 0
Accepted
time: 1ms
memory: 1732kb
input:
750 550 447 581 428 327 620 664 309 340 118 368 559 540 443 376 499 124 573 295 74 634 345 385 206 276 4 347 16 339 384 186 718 299 531 432 43 30 127 486 257 569 161 184 698 179 41 378 269 334 24 508 283 609 410 493 518 626 742 205 134 35 379 440 721 246 589 33 451 342 211 115 674 380 519 556 545 33...
output:
1501 5
result:
ok single line: '1501 5'
Test #21:
score: 0
Accepted
time: 1ms
memory: 1732kb
input:
750 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 99 100 101 ...
output:
1501 750
result:
ok single line: '1501 750'
Test #22:
score: 0
Accepted
time: 0ms
memory: 1612kb
input:
750 750 749 748 747 746 745 744 743 742 741 740 739 738 737 736 735 734 733 732 731 730 729 728 727 726 725 724 723 722 721 720 719 718 717 716 715 714 713 712 711 710 709 708 707 706 705 704 703 702 701 700 699 698 697 696 695 694 693 692 691 690 689 688 687 686 685 684 683 682 681 680 679 678 677 ...
output:
1501 750
result:
ok single line: '1501 750'
Test #23:
score: 0
Accepted
time: 1ms
memory: 1796kb
input:
750 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 175...
output:
1501 94125
result:
ok single line: '1501 94125'
Test #24:
score: 0
Accepted
time: 1ms
memory: 1600kb
input:
750 321 322 329 211 336 338 339 341 342 347 353 357 17 361 156 365 368 371 210 377 99 381 122 387 391 174 395 400 252 403 405 392 406 408 92 419 424 83 428 97 434 435 437 440 19 441 445 155 454 457 124 463 470 148 471 472 475 476 460 483 485 115 490 494 496 273 499 503 505 510 187 168 355 271 328 43...
output:
1501 16561
result:
ok single line: '1501 16561'
Test #25:
score: 0
Accepted
time: 1ms
memory: 1660kb
input:
750 588 256 568 200 589 591 592 587 294 130 594 340 421 462 597 578 600 602 423 605 606 60 574 286 615 431 617 531 619 330 341 620 410 625 579 627 447 628 629 631 632 99 633 350 634 101 635 586 430 535 637 375 643 567 644 235 647 653 398 510 654 655 270 508 453 622 460 657 660 662 434 664 287 667 38...
output:
1501 309
result:
ok single line: '1501 309'
Test #26:
score: 0
Accepted
time: 0ms
memory: 1660kb
input:
750 24 29 6 30 31 45 4 50 53 16 8 61 14 64 66 38 82 63 84 15 73 85 87 96 97 76 98 32 102 107 99 108 77 109 68 10 123 131 39 75 134 49 25 135 138 139 70 142 126 143 89 112 146 158 100 71 159 161 42 168 86 3 169 90 44 171 79 172 35 173 153 145 174 176 54 177 178 179 147 180 181 182 7 187 129 189 190 1...
output:
1501 9813
result:
ok single line: '1501 9813'
Subtask #4:
score: 1
Accepted
Test #27:
score: 1
Accepted
time: 1ms
memory: 1680kb
input:
2000 786 1968 69 1048 1882 1361 416 1743 313 556 6 728 575 1748 1401 788 1950 790 1569 1806 1537 1700 1271 883 32 1662 871 540 1411 1101 318 1174 1296 930 1857 741 923 1713 954 671 1465 1625 23 1588 765 1446 111 1117 1523 369 1770 1427 126 1654 991 1407 1385 1804 1872 1876 1676 347 1147 664 1188 139...
output:
4001 7
result:
ok single line: '4001 7'
Test #28:
score: 0
Accepted
time: 0ms
memory: 1552kb
input:
2000 1380 726 799 1839 264 430 1802 447 85 1871 471 971 1812 371 220 339 1696 329 1972 963 544 1229 1107 682 1856 632 1517 461 1052 1126 1571 6 1453 1352 239 805 863 1515 114 1505 1685 1160 1705 985 1365 565 1374 1733 1755 266 888 54 704 1538 1077 1071 937 1828 1220 612 917 414 62 226 1448 1222 69 7...
output:
4001 3
result:
ok single line: '4001 3'
Test #29:
score: 0
Accepted
time: 1ms
memory: 1660kb
input:
2000 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 99 100 101...
output:
4001 2000
result:
ok single line: '4001 2000'
Test #30:
score: 0
Accepted
time: 1ms
memory: 1552kb
input:
2000 2000 1999 1998 1997 1996 1995 1994 1993 1992 1991 1990 1989 1988 1987 1986 1985 1984 1983 1982 1981 1980 1979 1978 1977 1976 1975 1974 1973 1972 1971 1970 1969 1968 1967 1966 1965 1964 1963 1962 1961 1960 1959 1958 1957 1956 1955 1954 1953 1952 1951 1950 1949 1948 1947 1946 1945 1944 1943 1942 ...
output:
4001 2000
result:
ok single line: '4001 2000'
Test #31:
score: 0
Accepted
time: 1ms
memory: 1664kb
input:
2000 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...
output:
4001 667667
result:
ok single line: '4001 667667'
Test #32:
score: 0
Accepted
time: 1ms
memory: 1552kb
input:
2000 548 127 55 90 300 30 108 381 555 648 746 910 916 968 1001 790 758 183 887 188 515 241 586 553 591 187 526 255 718 261 792 122 317 950 186 197 436 984 827 740 570 545 5 958 397 215 441 399 962 937 542 583 199 969 391 133 327 1031 913 701 567 680 25 37 318 243 113 393 826 253 72 128 45 780 153 71...
output:
4001 92903
result:
ok single line: '4001 92903'
Test #33:
score: 0
Accepted
time: 1ms
memory: 1728kb
input:
2000 1661 1662 1293 845 1199 176 1667 1110 1671 1672 1673 105 1674 489 1676 282 794 1531 1680 152 1683 1684 574 822 1685 1245 188 83 1687 1688 951 140 1653 1692 1026 1693 1581 1213 1694 47 1047 1374 1696 1698 525 717 1699 1703 1354 1413 923 1707 1597 1024 1716 1717 1632 1561 910 1615 611 1722 1345 1...
output:
4001 808
result:
ok single line: '4001 808'
Test #34:
score: 0
Accepted
time: 1ms
memory: 1644kb
input:
2000 17 7 12 24 26 4 40 41 49 61 64 13 11 76 77 83 53 87 47 25 93 10 94 97 67 98 2 100 54 96 107 111 113 114 16 116 117 44 118 119 120 32 121 123 66 125 74 127 86 128 130 131 133 9 43 135 139 140 141 138 148 152 153 110 154 155 73 157 69 158 159 161 62 38 162 163 82 164 70 1 171 173 36 177 179 181 9...
output:
4001 570645
result:
ok single line: '4001 570645'
Subtask #5:
score: 1
Accepted
Test #35:
score: 1
Accepted
time: 2ms
memory: 1800kb
input:
10000 4398 2755 8555 8596 4222 3128 1827 723 7888 7093 1560 1059 4190 6002 8724 6342 7959 3157 1425 8386 9258 1594 5558 9368 5037 1858 9085 5832 8114 5332 6158 9874 3006 3118 8198 6513 1923 649 4249 1520 2723 3843 8203 3696 5088 9224 3754 6540 7162 5899 3539 2605 8689 2455 3981 208 8020 8225 2824 84...
output:
20001 10
result:
ok single line: '20001 10'
Test #36:
score: 0
Accepted
time: 2ms
memory: 1564kb
input:
10000 7749 1535 8906 2497 402 2045 678 2703 981 800 6628 6383 8753 3081 5179 7355 7817 1681 1249 8857 7539 7336 4301 6666 4439 3109 5724 2947 474 1495 7032 6254 1669 2892 2691 4980 7828 2457 60 3486 3215 646 6035 4952 8492 3450 5244 1621 1475 5908 5890 8197 5592 9255 6028 3382 4087 351 1022 5002 326...
output:
20001 2
result:
ok single line: '20001 2'
Test #37:
score: 0
Accepted
time: 2ms
memory: 1732kb
input:
10000 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 99 100 10...
output:
20001 10000
result:
ok single line: '20001 10000'
Test #38:
score: 0
Accepted
time: 2ms
memory: 1584kb
input:
10000 10000 9999 9998 9997 9996 9995 9994 9993 9992 9991 9990 9989 9988 9987 9986 9985 9984 9983 9982 9981 9980 9979 9978 9977 9976 9975 9974 9973 9972 9971 9970 9969 9968 9967 9966 9965 9964 9963 9962 9961 9960 9959 9958 9957 9956 9955 9954 9953 9952 9951 9950 9949 9948 9947 9946 9945 9944 9943 994...
output:
20001 10000
result:
ok single line: '20001 10000'
Test #39:
score: 0
Accepted
time: 0ms
memory: 1628kb
input:
10000 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 1...
output:
20001 16671667
result:
ok single line: '20001 16671667'
Test #40:
score: 0
Accepted
time: 2ms
memory: 1660kb
input:
10000 4500 1057 1989 2813 3870 1847 2547 2700 3817 3346 3535 1736 447 4379 1034 798 3528 544 2119 3631 64 479 2136 3962 2827 696 899 1404 3970 4207 1784 3003 3047 4286 419 220 4435 3738 2326 3305 4017 3326 1711 1986 1840 2968 4280 1889 4426 3544 477 3596 2810 1980 727 11 1235 3835 1834 1694 2526 186...
output:
20001 1224121
result:
ok single line: '20001 1224121'
Test #41:
score: 0
Accepted
time: 2ms
memory: 1536kb
input:
10000 9523 8255 9525 7013 6863 3536 4545 9527 9529 9530 1746 9539 9540 9541 359 9542 3940 3752 9543 9544 3189 346 9545 9547 4160 1155 9548 2080 9549 8683 9554 6425 8314 9556 9557 9558 6733 1228 6260 9559 9561 1902 4229 9285 9562 9568 800 6976 9570 3715 583 9571 9575 9576 9577 3149 1360 9578 9580 716...
output:
20001 3967
result:
ok single line: '20001 3967'
Test #42:
score: 0
Accepted
time: 2ms
memory: 1656kb
input:
10000 7576 7578 7579 7583 256 7588 7590 7593 7594 7595 2097 7599 6415 7600 7601 7602 7605 7607 7608 7610 4739 7612 7613 7617 7620 7623 6313 7625 7626 7627 7628 7630 7631 3509 7632 7634 2302 7643 7644 7645 7646 7647 7170 7655 7656 7657 453 7661 7662 7673 7674 7676 609 7679 7680 197 7684 2149 7690 769...
output:
20001 1945343
result:
ok single line: '20001 1945343'
Subtask #6:
score: 1
Accepted
Test #43:
score: 1
Accepted
time: 9ms
memory: 1732kb
input:
80000 36172 73545 19766 65515 14483 56254 64732 77136 37651 51500 58836 34325 47066 60031 12016 12863 40606 24 5068 18213 50743 15081 17880 65166 32442 16366 44053 73527 64500 444 14982 45530 60093 70088 5389 29135 51853 69550 25281 32524 75237 25359 53799 65969 69612 17045 32178 13457 62472 17864 7...
output:
160001 5
result:
ok single line: '160001 5'
Test #44:
score: 0
Accepted
time: 3ms
memory: 1680kb
input:
80000 32429 4632 28351 13314 55222 22405 51878 70951 3157 10225 45630 28473 63540 10872 15486 30921 56425 49515 44333 46895 18774 32937 40226 45746 18400 27859 61871 79532 59167 37913 52097 9129 22988 51348 10337 37931 4510 63406 26433 21194 9254 61548 22257 29110 39242 36538 74501 21239 18733 30155...
output:
160001 6
result:
ok single line: '160001 6'
Test #45:
score: 0
Accepted
time: 9ms
memory: 1756kb
input:
80000 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 99 100 10...
output:
160001 80000
result:
ok single line: '160001 80000'
Test #46:
score: 0
Accepted
time: 9ms
memory: 1708kb
input:
80000 80000 79999 79998 79997 79996 79995 79994 79993 79992 79991 79990 79989 79988 79987 79986 79985 79984 79983 79982 79981 79980 79979 79978 79977 79976 79975 79974 79973 79972 79971 79970 79969 79968 79967 79966 79965 79964 79963 79962 79961 79960 79959 79958 79957 79956 79955 79954 79953 79952 ...
output:
160001 80000
result:
ok single line: '160001 80000'
Test #47:
score: 0
Accepted
time: 10ms
memory: 1732kb
input:
80000 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 1...
output:
160001 1066706667
result:
ok single line: '160001 1066706667'
Test #48:
score: 0
Accepted
time: 3ms
memory: 1720kb
input:
80000 65117 65118 65121 31022 65122 65123 65124 65125 58406 65128 65129 65130 65132 65139 65140 1819 65141 65145 65146 65150 54196 65152 65156 26407 65159 65160 65163 33521 65172 65179 39706 65180 65181 65182 65183 65188 65192 65194 64660 65196 65199 65200 65201 65202 65203 28512 65204 65205 65206 4...
output:
160001 8605571
result:
ok single line: '160001 8605571'
Test #49:
score: 0
Accepted
time: 4ms
memory: 1728kb
input:
80000 39930 17647 38151 20177 12855 22055 28439 20232 5449 30180 1615 24429 28532 7528 16247 34100 18830 20127 15410 345 12595 6483 32901 18118 38774 6628 14775 16576 7983 7288 11380 14779 12232 19251 34372 13437 18235 2119 11014 330 20112 39433 36806 3779 28312 30073 21564 13147 36662 39697 39386 1...
output:
160001 32838
result:
ok single line: '160001 32838'
Test #50:
score: 0
Accepted
time: 9ms
memory: 1688kb
input:
80000 3290 3292 3302 3306 3315 3324 1703 3327 1869 3331 3339 3347 3348 3353 3368 3369 3375 3386 3391 3169 3393 2457 3397 1543 3416 3427 3436 3437 3438 3446 3067 3448 3450 783 3456 1935 3458 3468 3470 1329 3476 3477 102 3478 3192 3487 3493 3494 3497 3200 3500 2168 3508 3511 3513 3514 3518 1900 3520 3...
output:
160001 906477445
result:
ok single line: '160001 906477445'
Test #51:
score: 0
Accepted
time: 1ms
memory: 1684kb
input:
32769 16162 16103 4059 3414 7622 7305 13598 309 15702 13964 2314 12788 3477 3391 4856 4482 4633 7899 3961 2296 9150 397 5436 3536 13245 6657 2898 5465 16063 13046 14102 11851 4895 8468 13173 2638 701 5083 13083 6039 6112 9204 11017 13406 11543 14294 6734 15147 2033 6960 11120 3635 4897 4705 6834 957...
output:
65539 10124716
result:
ok single line: '65539 10124716'
Subtask #7:
score: 1
Accepted
Test #52:
score: 1
Accepted
time: 27ms
memory: 2032kb
input:
250000 229906 10667 189803 248963 30281 104558 46531 105276 19856 1665 196505 161172 97280 111940 118689 102175 42867 163881 48786 188 232672 216088 148358 106556 160790 77217 60492 195821 54759 167306 76556 212364 116065 152114 124454 105928 155212 71640 57995 117513 145294 226470 14381 177871 2457...
output:
500001 2
result:
ok single line: '500001 2'
Test #53:
score: 0
Accepted
time: 17ms
memory: 2080kb
input:
250000 34950 174871 187855 144434 56780 204945 168881 58255 211768 177337 4825 231237 67415 86303 196340 78886 157410 63270 227957 9882 93740 194529 48676 10149 104166 164454 113463 244521 140200 184449 5410 50956 140005 59202 77540 61785 19397 41508 31885 10661 125124 198705 25461 208581 164492 247...
output:
500001 3
result:
ok single line: '500001 3'
Test #54:
score: 0
Accepted
time: 18ms
memory: 2064kb
input:
250000 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 99 100 1...
output:
500001 250000
result:
ok single line: '500001 250000'
Test #55:
score: 0
Accepted
time: 28ms
memory: 1976kb
input:
250000 250000 249999 249998 249997 249996 249995 249994 249993 249992 249991 249990 249989 249988 249987 249986 249985 249984 249983 249982 249981 249980 249979 249978 249977 249976 249975 249974 249973 249972 249971 249970 249969 249968 249967 249966 249965 249964 249963 249962 249961 249960 249959...
output:
500001 250000
result:
ok single line: '500001 250000'
Test #56:
score: 0
Accepted
time: 23ms
memory: 2068kb
input:
250000 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 ...
output:
500001 10416791667
result:
ok single line: '500001 10416791667'
Test #57:
score: 0
Accepted
time: 31ms
memory: 1984kb
input:
250000 120169 98856 78326 92568 43335 119921 87676 63296 114173 93696 34794 7417 112206 95169 119456 55742 31285 118225 95934 44758 54400 6590 96914 52607 101606 8597 115583 5534 102229 58608 99014 41146 70622 32117 89208 94598 68553 80816 115760 109428 104035 28001 36283 77406 21136 32841 1466 1760...
output:
500001 197966064
result:
ok single line: '500001 197966064'
Test #58:
score: 0
Accepted
time: 22ms
memory: 2004kb
input:
250000 124629 33031 11262 3983 110107 9357 103668 78914 111202 66625 53794 57067 21804 68139 92710 99344 119625 70849 7839 69866 119009 63926 95526 105584 23359 5424 39972 79331 50119 47254 52048 32566 3703 14257 19548 99676 85682 16161 102336 31634 88251 18501 99186 64650 67795 64493 106543 42109 7...
output:
500001 97280
result:
ok single line: '500001 97280'
Test #59:
score: 0
Accepted
time: 15ms
memory: 2004kb
input:
250000 185 198 261 69 89 271 283 154 287 294 220 338 192 211 342 445 350 452 463 140 519 81 569 245 582 461 383 607 621 246 124 705 723 743 682 631 746 596 757 759 725 774 331 824 59 752 837 861 863 764 868 875 51 924 977 998 1057 520 1099 437 1171 1172 526 1028 1195 1197 794 1200 781 1209 1212 1229...
output:
500001 8627167871
result:
ok single line: '500001 8627167871'
Subtask #8:
score: 1
Accepted
Test #60:
score: 1
Accepted
time: 43ms
memory: 2476kb
input:
500000 468640 325594 311529 431574 28760 43319 299579 161278 106053 144512 430696 471955 274769 122422 307705 11942 271930 317749 70244 261578 320713 411093 378672 439519 186793 61609 197595 3055 309989 233651 371089 481552 84604 456063 385639 282856 325685 142553 252534 430161 336825 432035 496602 ...
output:
1000001 2
result:
ok single line: '1000001 2'
Test #61:
score: 0
Accepted
time: 55ms
memory: 2524kb
input:
500000 340941 187583 39843 171460 179198 134227 444102 422922 219833 164045 293400 321995 431911 122651 339856 251480 76793 47875 282066 158443 116389 115497 127869 496615 266685 417320 135771 60937 218233 467941 388233 276054 494734 26422 252365 79339 139077 482426 454969 146388 452850 427063 49587...
output:
1000001 2
result:
ok single line: '1000001 2'
Test #62:
score: 0
Accepted
time: 42ms
memory: 2500kb
input:
500000 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 99 100 1...
output:
1000001 500000
result:
ok single line: '1000001 500000'
Test #63:
score: 0
Accepted
time: 41ms
memory: 2524kb
input:
500000 500000 499999 499998 499997 499996 499995 499994 499993 499992 499991 499990 499989 499988 499987 499986 499985 499984 499983 499982 499981 499980 499979 499978 499977 499976 499975 499974 499973 499972 499971 499970 499969 499968 499967 499966 499965 499964 499963 499962 499961 499960 499959...
output:
1000001 500000
result:
ok single line: '1000001 500000'
Test #64:
score: 0
Accepted
time: 54ms
memory: 2516kb
input:
500000 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 ...
output:
1000001 41666916667
result:
ok single line: '1000001 41666916667'
Test #65:
score: 0
Accepted
time: 36ms
memory: 2580kb
input:
500000 290886 10300 182761 160189 99994 161218 190528 201355 8847 285989 140819 279921 205793 73710 56809 289317 149537 5047 155870 108180 267368 21373 145242 238091 250369 177868 228128 177524 175123 93620 223447 284291 7578 82987 57702 116418 31185 172066 207528 275448 113043 76712 147184 24808 20...
output:
1000001 572426765
result:
ok single line: '1000001 572426765'
Test #66:
score: 0
Accepted
time: 55ms
memory: 2464kb
input:
500000 249954 31993 85158 209895 175820 68619 216508 115435 144021 167029 113811 76875 109844 197100 62151 106124 60669 40156 192584 161411 223077 62879 119175 125449 217217 225626 215295 89303 114016 228565 4411 177764 228772 185217 56494 242648 31142 237060 239300 70704 103258 125350 23145 131133 ...
output:
1000001 281967
result:
ok single line: '1000001 281967'
Test #67:
score: 0
Accepted
time: 23ms
memory: 2040kb
input:
262143 214742 2306 25720 214744 143565 214745 182507 214748 214755 214759 214761 207075 24405 64557 214762 79366 103180 58480 63119 214765 109959 214770 122543 60154 202933 52989 214772 67380 22926 214774 104869 214776 130401 214777 58148 51202 214781 214782 192425 214785 64054 214789 75161 107294 1...
output:
524287 106754
result:
ok single line: '524287 106754'
Test #68:
score: 0
Accepted
time: 45ms
memory: 2564kb
input:
500000 75839 75840 75842 75846 75852 75853 75854 75858 53864 75859 54191 75860 75871 581 75872 75874 75881 62615 75882 75883 75884 75887 54244 75890 75892 75893 28800 75894 75897 75898 63527 75904 75911 75913 75914 75915 75920 75927 75934 71395 75937 75944 44578 75949 75955 18506 75961 75963 73411 7...
output:
1000001 34579601698
result:
ok single line: '1000001 34579601698'
Subtask #9:
score: 1
Accepted
Test #69:
score: 1
Accepted
time: 93ms
memory: 2952kb
input:
750000 137371 96682 435528 198321 600451 427572 393571 617648 285984 646554 289300 549228 297791 628399 749 669914 415053 597242 265309 332728 484988 443326 72445 585338 190759 436611 333335 61826 68530 286796 203225 332400 570616 738182 179397 675102 477292 582720 525445 439625 2981 676055 419102 2...
output:
1500001 28
result:
ok single line: '1500001 28'
Test #70:
score: 0
Accepted
time: 81ms
memory: 3032kb
input:
750000 726126 295119 43122 35450 383232 731272 103079 116062 318641 435743 238127 538448 22341 16089 385969 601843 226833 736239 155619 386888 247873 93986 669857 369755 270442 647287 452419 4602 53284 669281 79597 149875 190977 287437 565276 473672 469955 440562 519427 551986 399511 159177 579052 3...
output:
1500001 2
result:
ok single line: '1500001 2'
Test #71:
score: 0
Accepted
time: 42ms
memory: 2608kb
input:
524288 256754 256755 256757 256758 256761 256762 256763 256764 216651 256768 256770 57778 256771 110293 256780 256781 256785 256790 256791 256794 256795 256796 4888 256798 256799 256801 256806 63292 256808 189626 256810 256812 151055 256816 256819 256821 256822 256823 186297 256824 256826 256829 125...
output:
1048577 23002361431
result:
ok single line: '1048577 23002361431'
Test #72:
score: 0
Accepted
time: 73ms
memory: 3028kb
input:
750000 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 99 100 1...
output:
1500001 750000
result:
ok single line: '1500001 750000'
Test #73:
score: 0
Accepted
time: 71ms
memory: 2956kb
input:
750000 750000 749999 749998 749997 749996 749995 749994 749993 749992 749991 749990 749989 749988 749987 749986 749985 749984 749983 749982 749981 749980 749979 749978 749977 749976 749975 749974 749973 749972 749971 749970 749969 749968 749967 749966 749965 749964 749963 749962 749961 749960 749959...
output:
1500001 750000
result:
ok single line: '1500001 750000'
Test #74:
score: 0
Accepted
time: 68ms
memory: 3064kb
input:
750000 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 ...
output:
1500001 93750375000
result:
ok single line: '1500001 93750375000'
Test #75:
score: 0
Accepted
time: 70ms
memory: 2956kb
input:
750000 520818 520822 520823 520830 504393 520832 520833 343050 520836 520839 520840 520842 41259 520855 520860 520861 150689 520870 520871 520873 475716 520875 520877 520881 59309 520882 520887 520889 520891 520896 520904 520908 520909 520910 520911 22021 520915 520918 520923 520925 209682 520928 52...
output:
1500001 668773589
result:
ok single line: '1500001 668773589'
Test #76:
score: 0
Accepted
time: 81ms
memory: 3064kb
input:
750000 374787 96837 219393 296522 87649 125635 265997 247845 111656 200816 144382 368001 361793 43630 349 165461 127638 12973 211171 253930 238800 79638 13100 214298 144812 201167 32098 73292 264931 373182 155311 93718 114065 18831 22926 30363 199613 362572 91927 219859 123211 151355 296739 202727 7...
output:
1500001 285082
result:
ok single line: '1500001 285082'
Test #77:
score: 0
Accepted
time: 58ms
memory: 3040kb
input:
750000 122 148 249 532 201 705 757 812 428 120 907 779 1130 659 1202 556 1214 601 700 1301 1354 727 1209 1413 1430 1539 1546 807 1704 1706 1709 1784 1814 1445 1587 1836 1841 1852 1872 1875 1931 1340 1935 1943 365 1982 1099 2016 181 2021 2180 2201 736 1534 2232 2245 2305 1342 2307 23 2146 2398 1435 1...
output:
1500001 21046193949
result:
ok single line: '1500001 21046193949'
Subtask #10:
score: 1
Accepted
Test #78:
score: 1
Accepted
time: 109ms
memory: 3536kb
input:
1000000 960690 685968 27764 807938 824826 935290 811382 378559 450516 215973 516771 481142 44787 58175 598060 81815 622217 272208 176735 987536 869145 70724 173452 996704 172219 247612 802105 143054 731360 667350 160673 198343 89570 409847 414148 314484 510450 278980 538643 599369 396798 457599 5329...
output:
2000001 7
result:
ok single line: '2000001 7'
Test #79:
score: 0
Accepted
time: 89ms
memory: 3444kb
input:
1000000 159418 129763 499573 817425 46832 569681 606495 72316 362518 47872 815235 630281 590093 50843 474315 624477 879996 422227 857810 855761 370372 912542 913413 189900 238245 175572 507244 832823 999 153597 304031 693320 859013 182023 84314 140783 848559 307021 217816 550392 236337 266263 433237...
output:
2000001 17
result:
ok single line: '2000001 17'
Test #80:
score: 0
Accepted
time: 75ms
memory: 3536kb
input:
1000000 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 99 100 ...
output:
2000001 1000000
result:
ok single line: '2000001 1000000'
Test #81:
score: 0
Accepted
time: 92ms
memory: 3436kb
input:
1000000 1000000 999999 999998 999997 999996 999995 999994 999993 999992 999991 999990 999989 999988 999987 999986 999985 999984 999983 999982 999981 999980 999979 999978 999977 999976 999975 999974 999973 999972 999971 999970 999969 999968 999967 999966 999965 999964 999963 999962 999961 999960 9999...
output:
2000001 1000000
result:
ok single line: '2000001 1000000'
Test #82:
score: 0
Accepted
time: 89ms
memory: 3508kb
input:
1000000 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173...
output:
2000001 166667166667
result:
ok single line: '2000001 166667166667'
Test #83:
score: 0
Accepted
time: 74ms
memory: 3496kb
input:
1000000 966985 312567 745935 906274 681735 37740 130514 852449 724845 48808 880932 177565 169742 495132 650998 18912 844234 334560 786044 462009 518378 579068 368131 150199 644043 220303 262138 713512 455267 11951 814202 725596 194962 558990 712005 832856 92079 219349 562851 836463 395578 6689 65736...
output:
2000001 54822188
result:
ok single line: '2000001 54822188'
Test #84:
score: 0
Accepted
time: 98ms
memory: 3516kb
input:
1000000 499895 116066 65641 117845 419039 321564 429398 191901 284216 296936 109787 84793 150617 133985 107959 129099 267755 396396 450534 37627 107447 350016 325078 374562 37461 8963 108198 461489 10225 232831 165753 160137 389848 400925 427410 327822 147376 395425 57353 32629 245553 407874 335631 ...
output:
2000001 431700
result:
ok single line: '2000001 431700'
Test #85:
score: 0
Accepted
time: 91ms
memory: 3552kb
input:
1000000 322 334 816 840 403 1008 1161 1204 667 1233 609 1307 1379 430 1469 1485 700 1489 156 1600 678 1618 444 1652 1476 284 1691 343 377 1766 513 294 1791 1657 1932 415 1964 251 1985 586 2025 301 2064 1009 2071 1185 151 2117 2140 2164 2166 1695 1478 2233 2259 2280 766 1225 2295 2361 1572 204 2405 2...
output:
2000001 124502310902
result:
ok single line: '2000001 124502310902'