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

13227번 - TicTacToe 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB43224819355.460%

문제

We want to create a program to check the result of a tic tac toe game. A tic tac toe board is a 3x3 grid. Each position can contain either X or O. The game finishes with a winner when a player creates a straight line of 3 equal symbols. The next 3 boards show finished games with a winner. The empty positions are represented using dots.

X.X OX. .X.
OOO .O. .X.
... X.O .XO

In contrast, these 3 boards have not finished with a winner.

OXO X.. ...
XXO O.O .X.
OOX .XX ..O

입력

The test case consists of 3 lines. Each one with 3 characters (dot, O or X). Note that we are using the letter “O” not the digit zero.

출력

For each test case, write YES if the board finished with a winner or NO if there is no winner.

제한

예제 입력 1

XXX
.OO
OO.

예제 출력 1

YES

예제 입력 2

XOX
OXO
OXO

예제 출력 2

NO

힌트

출처

Olympiad > All-Ireland Programming Olympiad > 2015 AIPO National Finals - Junior 1번

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

출처

대학교 대회

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

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