CT22889

The Bronze Dominant Values

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Lata runs the cooperage at the lantern lake of Firefly Mere. Today the books show a list of parcels, and the numbers must be worked out before sundown. Task: Read n integers and print how many of the elements after the first are strictly greater than the first element. Input format: First line: n. Second line: n space-separated integers. Output format: Print the count of elements a[2..n] greater than a[1]. Constraints: 1 <= n <= 913; 0 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 312 826 967 824 780 888 126 571 832 195 256 460 533 799 494 278 46 315 552 260 115 677 264 308 509 568 843 112 37 328 500 971 524 675 295 667 453 421 384 700 212 74 850 565 534 743 942 421 207 333 868 11 417 103 536 105 779 903 212 570 108 582 69 291 261 483 137 627 653 198 688 766 486 35 402 801 244 532 15 969 51 736 609 342 380 257 827 105 405 164 185 463 244 826 766 326 89 59 327 260 153 925 281 399 896 463 897 213 649 326 88 255 50 625 908 184 644 928 633 18 386 23 950 133 748 859 228 550 645 612 60 440 449 269 566 143 287 527 882 22 635 670 373 129 455 991 951 308 394 505 935 367 370 998 50 420 20 328 391 895 463 296 256 240 467 827 75 793 486 909 580 867 181 139 477 683 503 55 380 841 995 790 398 315 978 528 389 216 435 201 195 92 869 489 776 46 469 795 50 947 953 317 404 7 405 238 7…
Output: 50

Example 2:

Input: 832 336 749 740 37 807 844 550 841 876 712 951 166 662 99 804 68 87 214 639 932 547 305 370 801 718 140 230 678 371 647 361 967 72 830 240 266 75 909 347 954 27 923 160 263 584 437 723 208 891 873 535 613 811 426 702 540 53 793 381 340 166 340 121 136 745 797 531 862 383 69 829 383 545 704 75 199 719 834 359 665 110 462 40 716 859 501 144 402 280 438 752 405 496 851 915 111 309 112 490 628 650 656 821 581 871 576 150 450 268 809 889 129 383 261 629 671 815 313 616 885 424 945 406 810 842 701 742 72 821 701 844 433 562 639 665 587 533 741 125 23 589 132 380 742 390 304 512 811 420 271 744 813 485 313 137 455 7 908 879 758 1000 604 812 789 739 390 927 110 196 430 582 324 191 687 898 472 961 152 313 908 702 82 644 977 910 369 583 270 35 514 250 201 580 292 0 140 752 307 933 62 212 516 810 574…
Output: 562

Example 3:

Input: 604 367 200 316 254 543 443 143 668 559 313 701 905 36 42 625 645 519 683 943 902 537 587 111 830 797 475 612 501 860 277 560 129 565 673 822 296 853 473 671 643 46 263 531 255 950 399 604 929 613 110 695 108 478 552 559 73 819 809 94 246 971 869 624 384 997 552 187 660 978 397 601 215 574 521 186 489 779 875 402 613 607 531 892 963 455 996 703 547 116 2 757 884 400 850 433 499 706 115 846 962 195 13 406 988 210 244 219 491 1000 928 644 945 590 313 914 372 192 391 457 470 655 680 666 381 740 32 381 733 726 178 461 612 549 25 259 400 179 272 263 179 638 640 879 289 526 396 209 943 560 168 100 244 34 213 330 158 197 130 921 891 67 348 564 255 455 293 203 272 164 807 208 716 482 700 298 307 405 241 238 804 979 649 118 102 277 361 373 292 755 831 846 439 437 507 770 436 819 309 78 424 322 513 …
Output: 400

Constraints:

1 <= n <= 913; 0 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Loading...
Test Cases:No test cases
No test cases available.
The Bronze Dominant Values - EASY Coding Problem | CodeTikki