시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 86 22 18 31.034%

문제

택희는 OS조교이다. 이번 숙제는 간단히 pintos가 동작하는 화면을 캡쳐한 다음에, 이를 프린트해서 제출하는 것이다. 학생들은 보고서에 자기 학번, 이름과 제출한 날짜를 간단하게 써서 내면 된다. 어차피 올해가 몇 년인지는 모두가 알고 있기 때문에, 월/일만 적어서 내면 된다. 예를 들어, 09/20/2005 (2005년 9월 20일)이라고 쓰는 대신에 9/20이라고 쓰면 된다.

일단 채점하기 전에 과거 채점 기준을 확인하기 위해서 예전에 사람들이 냈던 보고서와 점수를 확인하고 있었다. 그런데... 올해 숙제와 예전 숙제가 섞이고 말았다. 학생들이 보고서에 연도를 쓰지 않았고, 보고서에 채점 결과를 써놓지 않았기 때문에, 보고서만 가지고는 언제 숙제인지 알수가 없게 되었다. 게다가 숙제 마감일은 매년 같다.

따라서 택희는 제출일과 숙제 마감일을 가지고 채점을 해야할지 말아야할지 결정하려고 한다.

숙제 마감일과 각 학생이 제출한 날짜가 주어졌을 때, 이것을 채점해야할지 말아야할지, 결정하는 프로그램을 작성하시오. 출력에 대한 설명은 출력 설명에 자세히 나와있다.

입력

첫째 줄에 테스트 케이스의 개수 T가 주어진다. 둘째 줄부터 T개의 줄에는 각 테스트 케이스의 정보가 주어진다. 테스트 케이스의 정보는 날짜 2개로 이루어져 있다. 첫 번째 날짜는 숙제 마감일이고, 두 번째 날짜는 보고서에 적힌 날짜이다. 숙제 마감일은 월/일/연 형식이다. 숙제마감일은 2000년이상, 2200년 이하이고, 올바른 날짜만 주어진다.  보고서에 적힌 날짜는 월/일 형식이고, 이 날짜도 올바른 날짜만 주어진다.

출력

각 테스트 케이스에 대해서 다음과 같이 출력한다.

m/d/y IS n DAY(S) PRIOR: 보고서에 적힌 날짜가 숙제 마감일보다 7일전 이내 일 때 (같을 때는 제외)

m/d/y IS n DAY(S) AFTER: 보고서에 적힌 날짜가 숙제 마감일보다 7일후 이내 일 때 (같을 때는 제외)

SAME DAY: 보고서에 적힌 날짜와 숙제 마감일이 같을 때

OUT OF RANGE: 보고서에 적힌 날짜가 숙제 마감일보다 7일 후 또는 7일 전 안에 있지 않을 때

m/d/y는 월/일/연이고, y는 1999년 보다 크거나 같고, 2201년 보다 작거나 같다. 이때, 숙제 마감일은 매년 같기 때문에, y가 같은 필요는 없다.

예제 입력 1

7
11/20/2005 11/21
11/20/2005 11/17
11/20/2005 11/20
11/20/2005 11/13
11/20/2005 11/28
1/2/2005 12/30
12/31/2100 1/3

예제 출력 1

11/21/2005 IS 1 DAY AFTER
11/17/2005 IS 3 DAYS PRIOR
SAME DAY
11/13/2005 IS 7 DAYS PRIOR
OUT OF RANGE
12/30/2004 IS 3 DAYS PRIOR
1/3/2101 IS 3 DAYS AFTER
W3sicHJvYmxlbV9pZCI6IjI3MzAiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM2MjRcdWIyOThcdWM3NDAgT1MgXHVjMjE5XHVjODFjIFx1YzgxY1x1Y2Q5Y1x1Yzc3YyIsImRlc2NyaXB0aW9uIjoiPHA+XHVkMGRkXHVkNzZjXHViMjk0IE9TXHVjODcwXHVhZDUwXHVjNzc0XHViMmU0LiBcdWM3NzRcdWJjODggXHVjMjE5XHVjODFjXHViMjk0IFx1YWMwNFx1YjJlOFx1ZDc4OCBwaW50b3NcdWFjMDAgXHViM2Q5XHVjNzkxXHVkNTU4XHViMjk0IFx1ZDY1NFx1YmE3NFx1Yzc0NCBcdWNlYTFcdWNjZDBcdWQ1NWMgXHViMmU0XHVjNzRjXHVjNWQwLCBcdWM3NzRcdWI5N2MgXHVkNTA0XHViOWIwXHVkMmI4XHVkNTc0XHVjMTFjIFx1YzgxY1x1Y2Q5Y1x1ZDU1OFx1YjI5NCBcdWFjODNcdWM3NzRcdWIyZTQuIFx1ZDU1OVx1YzBkZFx1YjRlNFx1Yzc0MCBcdWJjZjRcdWFjZTBcdWMxMWNcdWM1ZDAgXHVjNzkwXHVh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cclxuIiwiaGludCI6IiIsIm9yaWdpbmFsIjoiMSIsInByb2JsZW1fbGFuZ19jb2RlIjoiXHVjNjAxXHVjNWI0In1d

출처

ACM-ICPC > Regionals > North America > Greater New York Region > 2005 Greater New York Programming Contest B번

  • 문제를 번역한 사람: baekjoon
  • 문제의 오타를 찾은 사람: rms sloth