포럼
문제 ICPC00310

B. Birthday Boy

설명

Bobby has just joined a new company, and human resources has asked him to note his birthday on the office calendar. Bobby the Birthday Boy wants to feel special! Also, Bobby the Birthday Boy does not mind lying for attention.

He notices that the longer people have not celebrated a birthday or eaten cake, the more they like it when a new one comes around. So he wants to pick his birthday in such a way that the longest period of time without a birthday possible has just passed. Of course he does not want to share his birthday with any colleague, either.

Can you help him make up a fake birthday to make him feel as special as possible? Bobby does not care about leap years: you can assume every year is not a leap year, and that no one has a birthday on the 29th of February. In case of a tie, Bobby decides to fill in the date that is soonest (strictly) after the current date, the 27th of October, because that means he will get to celebrate his birthday as soon as possible.

제약
입력 형식
  • One line with a number \(1 \leq n \leq 100\), the number of colleagues Bobby has in his new office.
  • Then follow \(n\) lines, each line corresponding to one coworker. Each line gives the name of the colleague (using at most \(20\) upper or lower case letters) separated from their birthday date by a space. The date is in format mm-dd.
출력 형식

Print the fake birthday date (format: mm-dd) chosen by Bobby.

예제 1
입력
3
Henk 01-09
Roos 09-20
Pietje 11-11
출력
09-19
예제 2
입력
16
Henk 01-09
Luc 12-31
Jan 03-22
Roos 09-20
Pietje 11-11
Anne 02-28
Pierre 09-25
Dan 12-15
Lieze 11-17
Charlotte 05-01
Lenny 08-02
Marc 04-25
Martha 06-12
John 03-26
Matthew 01-20
John 01-20
출력
08-01
예제 3
입력
3
JohnIII 04-29
JohnVI 10-28
JohnIIX 04-28
출력
04-27
예제 4
입력
3
CharlesII 04-30
CharlesV 10-29
CharlesVII 04-29
출력
10-28
문제 정보

생성자가 기록되지 않았습니다.

출처 ICPC BAPC 2018

평가 및 의견

B. Birthday Boy

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 1 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

B. Birthday Boy

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8