| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 (추가 시간 없음) | 1024 MB | 398 | 226 | 200 | 56.338% |
You suspect your local lottery of cheating! Some numbers are coming up too often!
Each week, the lottery randomly selects five numbers in the range from one to fifty. So, each number should appear about 10ドル\%$ of the time if the numbers are truly chosen randomly. If a number appears far more than that, it’s suspicious!
Determine if a set of lottery drawings is suspicious by listing all numbers that appear too often. To allow for random error, you’ll need to flag any number that appears more than 20ドル\%$ of the time.
The first line of input contains a single integer $n$ (1ドル≤n≤1,000円$). There will be 10ドル \cdot n$ lottery results for you to analyze.
Each of the next 10ドル \cdot n$ lines contains 5ドル$ integers $x$ (1ドル≤x≤50$). Each line represents a drawing. All values on a line are unique.
On a single line, output all numbers that appear strictly more than 2ドル \cdot n$ times in the list. If there is more than one, output them space-separated, in sorted order from smallest to largest. If there aren’t any, output $-1$.
1 32 30 16 45 27 34 45 35 31 42 1 12 26 50 13 34 50 36 21 39 47 7 41 18 45 28 48 2 8 4 16 40 17 2 19 50 4 30 15 6 31 13 33 46 18 49 23 24 17 48
45 50