#76. 统计1和4
统计1和4
Count 1s and 4s
Background
Congcong is currently learning about array operations. He encountered an interesting problem that requires determining the quantity relationship of specific elements within an array.
Problem Description
Given an array of integers, return true if the number of s is greater than the number of s; otherwise, return false.
Input Format
Input is given from standard input in the following format.
An array of integers, with elements separated by spaces.
Output Format
Output is printed to standard output in the following format.
Output
trueif the count of s is greater than the count of s; otherwise, outputfalse.
Sample
[1 4 1]
true
[1 4 1 4]
false
[1 1]
true
Sample Explanation
Sample 1: The array contains two s and one . The count of s () is greater than the count of s (), so true is output.
Sample 2: The array contains two s and two s. The count of s () is not greater than the count of s (), so false is output.
Sample 3: The array contains two s and zero s. The count of s () is greater than the count of s (), so true is output.
Constraints
Time limit: second, Memory limit: KiB for each test case.