#76. 统计1和4

    ID: 76 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatArray-2gesp1循环结构条件结构

统计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 11s is greater than the number of 44s; 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 true if the count of 11s is greater than the count of 44s; otherwise, output false.

Sample

[1 4 1]
true
[1 4 1 4]
false
[1 1]
true

Sample Explanation

Sample 1: The array contains two 11s and one 44. The count of 11s (22) is greater than the count of 44s (11), so true is output. Sample 2: The array contains two 11s and two 44s. The count of 11s (22) is not greater than the count of 44s (22), so false is output. Sample 3: The array contains two 11s and zero 44s. The count of 11s (22) is greater than the count of 44s (00), so true is output.

Constraints

Time limit: 11 second, Memory limit: 10241024 KiB for each test case.