#52. 字符串出现次数统计

字符串出现次数统计

String Occurrence Count

Background

Congcong is organizing his files and has found many duplicate file names. To better manage these files, he wants to count the occurrences of each file name.

Problem Description

Given an array of strings, return a Map<String, Boolean>. Each distinct string in the array should be a key in the map, and its value should be true if that string appears 22 or more times in the array, otherwise false.

Input Format

Input is given from standard input in the following format.

Multiple strings, separated by spaces.

Output Format

Output is printed to standard output in the following format.

A Map<String, Boolean> indicating whether each string appears 22 or more times.

Sample

"a" "b" "a" "c" "b"
{"a": true, "b": true, "c": false}
"c" "b" "a"
{"a": false, "b": false, "c": false}
"c" "c" "c" "c"
{"c": true}

Sample Explanation

In Sample 11, string "a" appears 22 times, "b" appears 22 times, and "c" appears 11 time. Thus, the values for "a" and "b" are true, and for "c" is false. In Sample 22, all strings appear only 11 time, so all values are false. In Sample 33, string "c" appears 44 times, so its value is true.

Constraints

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