Logo
(追記) (追記ここまで)

32500번 - Dishonest Lottery 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB39822620056.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

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

예제 출력 1

45 50

힌트

출처

ICPC > Regionals > North America > North America Qualification Contest > ICPC North America Qualifier 2024 E번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /