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

34387번 - Office Hours 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
3 초 2048 MB28262291.667%

문제

Your professor is wondering when to schedule their office hours for the upcoming semester. Since every student has a different schedule, the professor needs to find the best time to host office hours.

Your task is to output the time and day of the week that your professor should host office hours given the availability of the students. Your professor can host one hour of office hours per week, so you must find the time at which the largest number of students are available to attend office hours.

For simplicity, 24ドル$-hour time will be used (there is no AM/PM). Each day starts at midnight which is denoted as 00:00. The last hour of the day starts at 23:00 (11:00 PM).

입력

The first line of input will be an integer 1ドル \leq N \leq 10,000円,ドル the number of availability reports that follow. The next $N$ lines will contain each person's name, a day they have availability, an integer 1ドル \leq X \leq 24$ indicating how many hours they are available on that day, and $X$ integers indicating the hours in 24ドル$-hour time when they are available that day, each separated by a space.

An integer $H$ denoting when a student has availability means that they are available from H:00 until (H+1):00. All integers $H$ representing times will be in the range $[0, 23]$.

Note that a student's name may appear on more than one line if they have availability on more than one day of the week. Names are guaranteed to have no spaces.

출력

A string with the best day ($D$) and time ($T$) for office hours:

Your professor should host office hours D @ T

where $D$ is one of "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", or "Saturday" (without the quotes) and $T$ is a zero-padded time representing the start of the office hours in 24ドル$-hour time. (If the time is before 10:00, then there should be a leading 0ドル$ as in 01:00.)

Note that the solution is guaranteed to be unique. That is, there is a single day and time for which the maximum number of students are available to attend office hours.

제한

예제 입력 1

6
Ethan Monday 2 10 14
Ethan Tuesday 1 5
Sumner Monday 2 10 17
Sumner Friday 1 2
Colin Tuesday 1 15
Colin Friday 1 3

예제 출력 1

Your professor should host office hours Monday @ 10:00

예제 입력 2

1
Mariana Monday 1 7

예제 출력 2

Your professor should host office hours Monday @ 07:00

노트

출처

School > CS@Mines > CS@Mines HSPC 2022 > Beginner H번

  • 문제를 만든 사람: Ethan Richards
(追記) (追記ここまで)

출처

대학교 대회

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

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