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

28288번 - Special Event 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB40432228984.012%

문제

You are trying to schedule a special event on one of five possible days.

Your job is to determine on which day you should schedule the event, so that the largest number of interested people are able to attend.

입력

The first line of input will contain a positive integer $N,ドル representing the number of people interested in attending your event. The next $N$ lines will each contain one person's availability using one character for each of Day 1ドル,ドル Day 2ドル,ドル Day 3ドル,ドル Day 4ドル,ドル and Day 5ドル$ (in that order). The character Y means the person is able to attend and a period (.) means the person is not able to attend.

출력

The output will consist of one line listing the day number(s) on which the largest number of interested people are able to attend.

If there is more than one day on which the largest number of people are able to attend, output all of these day numbers in increasing order and separated by commas (without spaces).

제한

예제 입력 1

3
YY.Y.
...Y.
.YYY.

예제 출력 1

4

All three people are able to attend on Day 4ドル,ドル and they are not all available on any other day.

예제 입력 2

5
YY..Y
.YY.Y
.Y.Y.
.YY.Y
Y...Y

예제 출력 2

2,5

There is no day on which all five people are able to attend. Four people are able to attend on both Day 2ドル$ and Day 5ドル$.

힌트

출처

Olympiad > Canadian Computing Competition & Olympiad > 2023 > CCC 2023 Junior Division 3번

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

출처

대학교 대회

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

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