Due to the installation of a new fire alarm in ITMO server room, the system may be occasionally unavailable on the 27-th of May between 06:00 and 15:00 (UTC). ×

|

General

# Author Problem Lang Verdict Time Memory Sent Judged
52647089 Practice:
Naman_Bhalla
166C - 28 GNU C++17 Accepted 62 ms 4 KB 2019-04-12 18:01:30 2019-04-12 18:01:30

→ Source
//
// Created by Naman Bhalla on 2019-04-12.
//

#include <cstdio>
#include <algorithm>
#include <cstring>
#include <iostream>
#include <vector>
#include <utility>

using namespace std;

int main(){
int n, x;
cin >> n >> x;
int now;
int e_c{}, g_c{}, l_c{};
for(int i{1}; i <= n; ++i){
cin >> now;
if(now < x){
++l_c;
} else if(now > x){
++g_c;
} else {
++e_c;
}
}

if(e_c == 0){
e_c = 1;
}

if(l_c < g_c){
answer += max(0, g_c - l_c - (e_c - 1) - 1);
} else if(l_c > g_c){
answer += max(0, l_c - g_c - (e_c - 1));
} else {
}
return 0;
}

1
Time: 30 ms, memory: 0 KB
Verdict: OK
Input
3 10
10 20 30

Participant's output
1

1

Checker comment
ok answer is 1


2
Time: 30 ms, memory: 4 KB
Verdict: OK
Input
3 4
1 2 3

Participant's output
4

4

Checker comment
ok answer is 4


3
Time: 30 ms, memory: 0 KB
Verdict: OK
Input
2 2
3 2

Participant's output
0

0

Checker comment
ok answer is 0


4
Time: 0 ms, memory: 0 KB
Verdict: OK
Input
5 1
1 1 2 1 2

Participant's output
0

0

Checker comment
ok answer is 0


5
Time: 30 ms, memory: 0 KB
Verdict: OK
Input
5 4
5 5 4 3 5

Participant's output
1

1

Checker comment
ok answer is 1


6
Time: 30 ms, memory: 4 KB
Verdict: OK
Input
10 2
2 2 1 3 2 1 2 1 1 3

Participant's output
0

0

Checker comment
ok answer is 0


7
Time: 0 ms, memory: 4 KB
Verdict: OK
Input
10 55749
46380 58202 54935 26290 18295 83040 6933 89652 75187 93963

Participant's output
1

1

Checker comment
ok answer is 1


8
Time: 30 ms, memory: 0 KB
Verdict: OK
Input
10 809
949 31 175 118 640 588 809 398 792 743

Participant's output
7

7

Checker comment
ok answer is 7


9
Time: 30 ms, memory: 4 KB
Verdict: OK
Input
50 1
1 2 1 2 1 1 1 2 2 2 2 2 1 1 2 2 2 2 1 2 2 2 1 2 1 1 2 1 1 1 2 2 2 2 2 2 2 2 1 2 2 1 1 1 2 2 1 2 2 2

Participant's output
12

12

Checker comment
ok answer is 12


10
Time: 30 ms, memory: 0 KB
Verdict: OK
Input
100 6
7 5 2 8 4 9 4 8 6 1 7 8 7 8 1 5 4 10 9 10 7 5 6 2 1 6 9 10 6 5 10 9 9 5 1 4 4 5 4 4 1 1 6 7 4 9 3 5 6 5 6 3 7 6 9 4 4 8 7 10 6 10 4 6 6 5 1 9 6 7 10 1 9 4 5 3 7 7 4 4 7 4 7 3 3 7 2 5 5 3 8 9 6 9 4 5 5 9 1 7

Participant's output
0

0

Checker comment
ok answer is 0


11
Time: 62 ms, memory: 0 KB
Verdict: OK
Input
100 813
285 143 378 188 972 950 222 557 170 755 470 164 800 553 146 820 842 62 496 980 746 944 677 828 465 577 791 277 303 515 561 653 925 692 871 424 626 795 813 343 418 280 123 364 496 447 435 404 645 141 169 315 830 289 450 675 81 212 509 661 7 217 468 877 172 141 475 409 178 71 936 843 761 889 417 282 530 612 328 572 310 632 498 271 19 753 3 787 31 266 251 897 450 206 731 678 64 417 664 224

Participant's output
69

69

Checker comment
ok answer is 69


12
Time: 0 ms, memory: 0 KB
Verdict: OK
Input
100 37
20 20 3 35 36 14 30 9 33 36 32 46 43 22 43 50 34 6 13 25 1 34 10 6 21 30 19 17 1 23 9 23 38 21 7 43 49 28 33 42 4 19 39 23 12 42 31 13 26 23 1 26 24 48 10 6 12 48 40 18 10 26 9 5 22 45 46 23 46 34 34 45 3 7 16 39 14 29 48 1 12 37 4 20 29 26 35 38 20 47 39 29 12 35 4 32 26 1 50 33

Participant's output
53

53

Checker comment
ok answer is 53


13
Time: 30 ms, memory: 0 KB
Verdict: OK
Input
100 20
40 44 41 81 59 96 91 49 57 41 44 42 65 31 74 70 54 47 51 7 71 7 75 79 13 20 2 78 66 34 81 84 18 37 85 42 5 40 17 15 66 10 95 93 20 43 63 83 60 61 9 33 68 81 97 25 39 37 22 90 63 45 33 89 1 68 37 66 89 86 6 29 40 33 44 11 83 21 11 32 92 41 45 79 29 86 89 87 14 1 32 22 25 90 56 6 1 49 15 89

Participant's output
58

58

Checker comment
ok answer is 58


14
Time: 0 ms, memory: 0 KB
Verdict: OK
Input
200 86
50 80 52 90 82 18 70 7 7 79 69 92 50 7 68 32 61 34 3 77 68 70 33 82 99 60 39 77 5 57 28 60 40 94 96 1 100 1 60 75 83 15 26 55 95 6 31 30 89 71 42 87 66 19 51 40 14 86 91 92 46 68 84 63 67 13 3 62 38 54 72 46 84 45 34 30 81 99 36 91 18 37 32 13 93 29 76 97 45 87 50 82 32 30 51 90 55 74 65 60 10 81 66 16 61 48 8 12 28 37 44 31 16 96 97 62 12 72 100 29 93 93 95 68 11 37 68 28 39 8 5 73 9 82 7 15 60 97 80 70 19 9 83 48 74 30 36 91 73 1 3 41 45 97 55 58 82 33 21 38 15 36 48 22 70 16 59 17 94 83 100 48 7...
Participant's output
137

137

Checker comment
ok answer is 137


15
Time: 0 ms, memory: 0 KB
Verdict: OK
Input
300 387
417 15 469 439 309 237 460 34 427 346 410 480 67 340 166 318 49 463 59 455 372 119 64 284 289 133 201 55 437 401 379 28 498 301 71 123 446 192 343 231 139 364 260 463 312 176 290 61 205 7 326 353 366 394 466 486 185 337 103 81 163 406 21 456 219 387 478 256 458 260 28 210 87 94 322 417 139 17 494 269 78 371 333 118 176 270 329 154 352 493 89 202 356 211 337 470 206 465 359 147 444 476 253 463 345 84 473 69 466 6 396 180 417 355 254 372 384 270 265 9 166 61 77 297 64 347 313 358 337 23 444 89 66 17...
Participant's output
139

139

Checker comment
ok answer is 139


16
Time: 30 ms, memory: 0 KB
Verdict: OK
Input
300 3
7 1 2 1 4 3 3 8 7 8 4 3 10 3 4 5 10 1 8 6 3 4 6 5 6 1 4 5 4 8 2 5 10 6 9 9 1 2 1 6 1 8 5 4 7 5 4 4 8 5 3 5 8 3 6 10 7 2 8 3 10 2 5 8 3 8 3 4 2 10 9 6 9 1 7 8 9 7 5 9 6 3 5 8 8 10 9 4 8 7 7 9 1 7 9 8 6 1 2 6 10 5 6 6 8 9 9 9 1 4 9 10 4 5 1 3 1 9 1 5 10 10 7 9 7 10 4 1 7 9 6 2 9 10 4 4 5 5 1 2 1 10 10 8 2 1 9 7 1 7 2 9 8 3 9 10 10 10 10 6 6 7 4 6 9 9 5 8 7 8 9 5 10 4 10 7 10 2 9 3 6 8 1 5 2 4 5 9 9 8 2 5 3 9 2 3 1 2 10 6 2 7 9 4 6 4 8 7 9 2 7 5 7 6 5 5 4 5 9 4 1 4 8 6 3 7 4 8 5 1 5 9 9 5 5 6 7 9 10 10...
Participant's output
154

154

Checker comment
ok answer is 154


17
Time: 30 ms, memory: 0 KB
Verdict: OK
Input
300 6
3 1 3 7 7 5 7 2 3 7 8 9 6 6 9 9 5 8 9 6 9 1 7 2 1 3 6 3 9 2 3 2 10 8 7 9 4 4 10 1 1 7 3 4 1 6 6 10 1 8 1 3 5 4 10 1 10 6 8 3 1 5 4 3 3 3 8 2 5 9 7 8 2 5 1 7 3 10 5 9 5 1 6 4 5 4 1 7 2 9 4 9 6 3 4 7 8 9 5 6 1 10 1 1 1 8 1 6 5 1 3 4 6 2 7 8 6 5 7 3 9 3 8 1 6 5 4 6 4 8 2 9 7 4 3 5 5 5 9 7 8 4 5 9 7 4 3 9 9 8 3 2 3 2 10 8 5 10 2 3 7 10 5 8 3 4 1 1 7 1 2 8 3 2 10 8 3 1 8 4 1 2 8 6 8 3 3 5 1 1 7 3 3 7 1 5 8 1 8 1 5 2 3 4 2 1 3 2 1 2 9 4 3 2 5 4 4 3 4 2 6 1 2 7 6 10 6 4 3 7 3 3 2 7 2 10 2 10 8 1 1 8 1 7 5 ...
Participant's output
37

37

Checker comment
ok answer is 37


18
Time: 0 ms, memory: 0 KB
Verdict: OK
Input
300 690
982 856 403 150 267 343 116 944 142 198 219 581 98 934 770 137 827 850 585 544 82 256 207 584 943 48 558 971 60 138 314 634 496 500 426 706 41 514 861 811 720 347 278 851 633 770 128 46 327 394 243 305 572 713 396 682 798 293 232 626 155 465 913 250 854 80 998 817 158 1 215 515 990 929 999 931 551 555 592 537 463 251 721 44 68 709 803 154 97 427 791 210 800 332 633 328 206 53 656 41 331 123 523 698 830 7 940 788 364 656 169 435 865 132 373 522 412 350 387 128 127 729 867 317 221 691 82 789 762 282...
Participant's output
115

115

Checker comment
ok answer is 115


19
Time: 0 ms, memory: 0 KB
Verdict: OK
Input
500 7
5 10 10 3 9 10 5 4 10 1 1 8 4 4 9 4 8 4 9 8 9 7 5 2 4 5 8 5 1 6 6 6 4 1 6 5 4 10 1 3 8 7 10 9 4 10 9 5 2 5 6 6 5 9 2 8 5 7 9 3 10 1 2 10 10 7 2 7 4 7 4 4 3 1 4 1 10 1 5 3 8 1 5 8 8 8 1 9 3 10 7 9 9 7 5 1 8 2 10 8 6 2 8 3 8 10 10 6 6 1 8 1 5 7 8 5 5 5 5 4 7 8 10 1 1 7 10 8 10 2 10 10 9 5 7 9 8 1 1 10 10 8 4 8 6 1 8 8 7 1 10 1 6 6 7 4 8 8 10 10 7 6 6 8 2 5 4 4 2 5 2 8 2 8 6 7 6 3 6 1 10 2 7 10 4 1 8 1 5 1 8 10 6 7 9 7 2 1 5 6 5 4 10 6 2 5 1 4 5 8 4 5 5 3 5 8 2 4 3 4 9 2 4 7 2 4 2 8 10 3 6 7 5 3 7 5 6 ...
Participant's output
95

95

Checker comment
ok answer is 95


20
Time: 0 ms, memory: 4 KB
Verdict: OK
Input
500 2
1 10 7 8 2 8 10 2 4 1 7 10 7 10 3 9 9 1 10 9 5 10 6 5 8 7 7 1 7 3 5 8 1 9 5 9 3 9 10 3 10 4 3 1 10 10 7 9 5 10 4 4 6 1 8 5 10 4 5 6 5 9 10 3 10 2 6 7 1 8 7 5 2 3 3 4 8 10 4 7 3 3 8 2 1 6 5 8 10 7 4 10 5 7 7 10 8 2 7 6 4 9 7 8 5 1 9 1 3 6 2 1 3 3 10 4 2 3 4 10 10 7 8 10 3 10 6 9 3 5 2 7 9 1 8 3 5 6 10 2 1 1 5 4 5 6 4 8 6 8 3 4 2 6 4 8 5 10 8 7 10 5 3 10 10 6 8 8 2 8 8 4 10 7 4 2 9 6 1 10 5 10 2 10 8 2 7 9 4 9 7 8 5 8 3 5 5 10 5 9 2 10 3 8 8 4 3 7 2 6 8 4 1 7 8 8 2 10 8 4 10 5 9 8 1 10 6 10 4 5 4 2 3 ...
Participant's output
310

310

Checker comment
ok answer is 310


21
Time: 0 ms, memory: 0 KB
Verdict: OK
Input
500 79
19 24 9 73 12 3 76 71 98 99 43 41 34 79 21 96 98 81 9 13 59 40 33 62 11 88 56 32 90 61 68 63 85 4 37 73 62 64 23 34 9 54 59 61 77 97 7 24 59 50 49 72 50 9 39 58 92 13 13 78 99 63 24 40 73 87 32 74 66 49 83 43 77 89 72 98 55 79 4 94 54 31 12 99 99 89 21 27 52 38 85 46 90 96 40 3 31 21 100 95 84 81 43 48 32 83 57 48 47 55 22 65 63 67 72 27 98 40 38 30 58 61 14 99 38 72 24 6 95 55 64 42 48 68 75 79 1 64 53 47 25 95 68 94 27 2 68 41 31 39 37 5 5 20 31 1 9 19 68 71 46 39 32 19 27 30 39 51 4 28 82 51 97 ...
Participant's output
313

313

Checker comment
ok answer is 313


22
Time: 30 ms, memory: 0 KB
Verdict: OK
Input
500 44
31 35 14 48 67 27 47 49 92 50 31 36 23 36 23 26 91 76 46 54 93 73 44 94 15 52 35 22 99 76 1 6 2 85 3 21 47 42 30 77 91 12 62 68 44 31 24 70 56 48 29 45 44 83 23 99 40 44 16 13 71 40 4 7 76 58 77 39 85 60 46 72 65 25 22 81 55 10 63 92 15 7 17 79 62 85 34 63 39 31 30 68 25 99 74 42 81 3 23 100 83 46 26 36 81 98 46 87 53 89 78 52 13 2 18 50 15 99 19 52 40 86 13 38 79 57 34 66 64 80 18 25 11 91 50 74 96 91 79 11 62 99 74 41 54 33 83 86 90 28 52 86 1 88 8 25 14 27 10 84 34 56 5 17 85 32 91 17 78 91 28 2...
Participant's output
16

16

Checker comment
ok answer is 16


23
Time: 30 ms, memory: 0 KB
Verdict: OK
Input
500 132
318 210 23 438 416 868 675 113 60 694 380 455 254 449 288 984 824 338 80 420 384 782 518 461 724 694 454 722 662 754 934 272 841 727 759 937 923 163 955 486 692 157 735 534 851 160 608 447 717 798 943 425 471 262 215 104 169 240 803 664 386 885 770 161 288 81 925 850 271 971 885 911 390 529 783 60 376 62 553 905 710 742 36 846 759 622 81 726 521 246 886 453 223 48 640 484 547 848 32 561 650 835 464 345 445 514 765 632 60 806 300 133 562 467 526 641 486 863 102 766 293 905 135 729 195 36 80 665 833...
Participant's output
370

370

Checker comment
ok answer is 370


24
Time: 0 ms, memory: 0 KB
Verdict: OK
Input
500 707
382 920 619 113 562 440 498 843 10 449 968 351 43 802 690 510 165 885 617 860 610 23 928 45 228 166 380 856 922 761 523 423 419 956 981 829 160 393 262 470 774 414 945 442 417 93 174 793 10 839 372 751 770 680 991 145 220 670 763 398 462 65 902 727 80 964 521 768 298 386 551 188 570 969 933 387 220 442 504 695 71 870 945 818 222 18 499 65 708 43 683 524 854 811 375 171 805 530 455 665 553 700 943 933 542 25 162 428 666 440 464 32 412 602 472 955 902 821 830 596 428 942 590 168 83 925 438 785 346 7...
Participant's output
159

159

Checker comment
ok answer is 159


25
Time: 30 ms, memory: 0 KB
Verdict: OK
Input
500 4094
4091 4642 6313 9621 6878 9379 7883 5843 2590 8898 9993 691 4260 5575 3245 7864 3982 7631 8375 5733 5466 1751 6246 7058 2779 2590 7213 8904 675 1351 254 7615 9559 1684 2177 3510 510 2043 5198 1467 8929 2885 5262 6190 8780 9017 861 5394 3115 6645 5562 4796 4062 7877 5861 2481 7124 5017 1024 364 6339 467 6527 4629 2190 6022 6071 4602 8285 1656 7041 6233 7256 2288 3768 6115 8412 4312 5206 7819 2100 9291 7275 3189 6864 7031 4230 3975 3713 1228 601 7658 9914 4475 1384 4569 2560 9864 5450 3408 5563 3320...
Participant's output
94

94

Checker comment
ok answer is 94


26
Time: 30 ms, memory: 0 KB
Verdict: OK
Input
500 586
9803 4648 4909 2296 1377 3951 515 5869 6483 4301 8581 4883 6401 6440 8295 7582 4323 5986 7912 5982 3501 3992 657 9834 8284 4254 9491 7494 3479 6166 9035 1311 976 4264 6400 1402 4099 7273 5504 5610 1012 4038 7960 7802 1538 8951 8427 1388 408 3582 343 4770 3064 9591 1445 7523 4016 7640 4984 5586 4711 7295 2602 4140 9982 4905 6963 8520 5312 3367 6708 5510 2788 215 1269 8147 6312 4339 4509 8609 7461 1067 7832 1616 8623 2427 6944 1610 900 4026 9398 4624 9546 9238 8119 9904 6818 1546 5769 1616 4169 8185...
Participant's output
434

434

Checker comment
ok answer is 434


27
Time: 30 ms, memory: 0 KB
Verdict: OK
Input
500 9473
81269 12647 21226 25020 79444 48538 61322 43165 45381 55126 30507 79812 25818 3946 62190 57938 5935 29406 30682 55654 8457 33843 27842 83063 23993 60135 92995 3383 84056 71376 16163 33680 29578 90110 17141 14472 20957 50427 2098 37758 86184 70860 82879 7372 17742 11822 83628 47461 31098 48731 47120 4021 82467 67045 78703 37062 56391 98551 54710 65751 87153 78713 51195 48388 51284 86762 85951 53155 41359 93765 23565 81442 25896 52991 11418 96684 87635 38052 22661 83875 19211 14111 53622 50788 2149...
Participant's output
398

398

Checker comment
ok answer is 398


28
Time: 0 ms, memory: 0 KB
Verdict: OK
Input
500 86807
6981 82653 76174 31887 73398 17303 56657 99543 79275 80530 19095 64003 77415 48459 97783 23465 26276 17761 60219 80095 52843 60276 72252 91647 82201 61800 75273 59269 89020 87679 74401 23727 83156 99042 8659 78716 45490 9304 95109 6093 78267 99309 29226 18983 50501 39052 90250 89807 94199 61477 51901 90891 26605 98759 54287 12103 15442 6982 72862 13677 44036 16086 93623 26955 84884 25645 92 93425 48386 65476 10528 48016 35076 76726 2568 66011 5535 54432 61419 94665 98764 85887 88371 15568 95956 ...
Participant's output
331

331

Checker comment
ok answer is 331


29
Time: 0 ms, memory: 0 KB
Verdict: OK
Input
500 2
2 1 2 1 1 1 1 2 2 1 2 2 2 2 2 1 2 2 2 1 1 1 2 2 2 1 2 2 2 1 2 2 2 2 1 2 1 1 2 1 1 2 1 1 1 2 2 1 2 1 1 1 1 1 1 2 1 2 1 2 2 2 2 1 1 1 2 1 1 1 1 2 2 1 2 1 1 1 2 1 2 1 2 2 2 2 1 2 1 1 1 2 2 2 1 2 1 1 2 1 1 2 1 2 1 1 2 1 2 1 1 1 1 2 1 2 2 1 1 1 2 1 1 2 2 2 2 1 1 1 2 1 2 1 1 2 1 1 1 2 1 2 1 1 2 2 2 2 2 2 1 2 1 1 2 1 1 1 2 1 2 1 2 1 1 1 2 2 1 1 2 2 1 2 1 2 2 1 1 1 2 2 1 2 1 2 2 2 2 2 2 1 1 2 2 2 1 1 2 1 2 2 1 2 2 1 2 2 1 2 1 1 1 2 1 2 1 1 2 1 2 1 1 2 1 1 2 1 2 1 2 2 2 1 1 1 1 1 1 1 2 1 2 1 1 1 1 2 2 2 1 1 ...
Participant's output
49

49

Checker comment
ok answer is 49


30
Time: 0 ms, memory: 0 KB
Verdict: OK
Input
500 2
2 1 1 2 2 1 1 2 2 2 2 2 1 1 1 2 1 1 1 2 1 2 2 1 2 1 1 1 1 2 1 2 1 2 2 2 1 2 1 2 1 1 2 2 1 1 2 1 1 2 2 1 1 1 1 1 2 2 1 2 1 1 2 2 2 2 1 1 1 2 2 1 2 1 1 1 1 1 2 1 1 1 1 2 1 2 1 1 2 1 2 2 2 1 2 1 1 1 1 1 2 1 2 1 2 2 1 2 2 1 1 1 1 2 1 1 1 1 2 1 1 2 2 1 2 1 2 1 2 2 2 2 2 1 2 2 2 1 2 2 2 2 1 1 1 2 2 1 1 1 2 1 2 2 1 1 2 1 2 2 1 2 2 1 1 2 2 2 1 2 2 2 1 2 1 1 1 2 2 2 1 2 2 2 1 1 2 1 1 1 2 2 2 1 2 2 2 1 2 2 1 1 1 2 2 1 1 2 1 2 2 2 2 2 2 2 1 1 1 1 1 2 2 1 2 2 2 1 2 2 2 2 1 2 2 1 1 2 1 1 2 2 2 1 2 1 1 1 1 2 2 2 ...
Participant's output
0

0

Checker comment
ok answer is 0


31
Time: 30 ms, memory: 0 KB
Verdict: OK
Input
1 1
1

Participant's output
0

0

Checker comment
ok answer is 0


32
Time: 0 ms, memory: 4 KB
Verdict: OK
Input
1 2
1

Participant's output
2

2

Checker comment
ok answer is 2


33
Time: 0 ms, memory: 0 KB
Verdict: OK
Input
1 1
2

Participant's output
1

1

Checker comment
ok answer is 1


34
Time: 0 ms, memory: 0 KB
Verdict: OK
Input
500 1
100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 ...
Participant's output
500

500

Checker comment
ok answer is 500


35
Time: 30 ms, memory: 0 KB
Verdict: OK
Input
500 100000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
Participant's output
501

501

Checker comment
ok answer is 501


36
Time: 30 ms, memory: 0 KB
Verdict: OK
Input
500 2
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
Participant's output
501

501

Checker comment
ok answer is 501


37
Time: 30 ms, memory: 4 KB
Verdict: OK
Input
500 1
500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 ...
Participant's output
500

500

Checker comment
ok answer is 500


38
Time: 30 ms, memory: 0 KB
Verdict: OK
Input
4 1
2 3 4 5

Participant's output
4

4

Checker comment
ok answer is 4


39
Time: 30 ms, memory: 4 KB
Verdict: OK
Input
9 228
1 1 1 1 1 1 228 228 228

Participant's output
4

4

Checker comment
ok answer is 4


40
Time: 0 ms, memory: 0 KB
Verdict: OK
Input
500 5
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
Participant's output
501

501

ok answer is 501