CT24712

The Dominant Values Beneath Firefly Mere

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

At the lantern lake of Firefly Mere, Ishaan records each coins in a worn leather ledger. The guild wants answers, not guesses. 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 <= 449; 0 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 192 631 803 106 259 898 943 829 119 630 760 684 99 835 626 531 777 715 201 144 424 133 341 905 186 119 425 514 233 959 478 955 331 788 183 75 166 194 652 279 473 730 941 623 82 502 381 564 666 632 86 979 155 818 830 43 485 649 228 929 52 667 73 364 160 713 224 79 743 486 615 327 823 598 394 890 248 871 681 235 907 754 929 649 893 687 977 112 790 56 185 902 25 892 961 107 250 602 20 924 135 586 28 999 754 576 976 481 495 186 370 550 623 924 987 602 370 68 43 76 173 915 735 639 194 594 509 852 508 825 534 643 618 38 790 823 604 705 764 905 303 878 879 280 652 52 867 744 78 869 52 667 488 661 729 637 731 249 318 891 54 404 285 765 557 815 557 585 771 620 632 442 112 41 298 431 989 102 596 540 580 738 911 588 948 593 18 591 429 644 184 314 487
Output: 79

Example 2:

Input: 168 259 956 33 103 918 858 562 557 190 539 924 91 770 15 11 657 592 213 648 572 286 523 634 687 850 110 967 500 749 71 298 267 77 495 944 209 430 608 2 312 160 338 520 142 945 71 194 603 142 563 594 146 879 429 475 876 944 265 567 620 815 614 419 153 555 159 830 642 959 936 614 589 736 601 593 176 886 385 683 55 291 223 819 747 906 61 215 871 196 619 814 668 553 332 387 133 914 941 456 291 638 78 328 263 63 627 707 722 581 266 145 854 866 566 654 645 18 178 823 477 439 807 163 252 396 262 113 858 48 355 643 821 288 801 705 953 7 424 108 214 847 495 251 32 295 96 565 102 847 177 449 566 588 156 857 795 181 596 669 761 84 573 34 3 403 661 580 510
Output: 118

Example 3:

Input: 415 469 861 709 750 964 157 88 866 693 198 622 215 703 609 958 253 384 966 433 21 747 194 754 402 141 361 756 251 711 56 625 794 500 469 136 484 930 558 402 633 756 523 893 917 620 726 793 272 436 667 413 836 18 86 115 416 405 163 392 854 20 286 110 131 22 138 653 765 21 4 640 635 976 168 712 532 220 20 909 769 776 22 840 847 458 502 39 378 733 385 630 522 182 457 649 382 623 370 582 429 157 962 716 87 383 480 492 538 350 902 400 383 974 399 371 505 373 859 848 250 328 665 539 873 344 493 944 270 333 541 880 606 341 623 419 534 24 117 895 422 297 581 297 373 120 229 284 133 371 38 96 105 923 182 453 43 610 331 341 586 763 75 586 42 462 212 32 543 624 154 841 871 911 128 205 916 693 246 172 418 747 245 273 794 847 79 893 394 556 659 95 287 931 736 736 712 540 470 68 68 527 680 663 293 438 2…
Output: 207

Constraints:

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

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