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

26533번 - Tractor Path 다국어

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

문제

You just finished disking your field and it is time to head back to the farmhouse. Some of the livestock has been acting up (you think it is the Clydesdale horses but you’re not sure) and putting up obstacles to prevent you from getting home.

입력

The first line contains a single positive integer, n, denoting the side length of the square field. The next n lines will consist of a map of your field, with ‘.’ denoting an open space and ‘x’ denoting an obstacle. You are in the top left corner of the field and the farmhouse is in the bottom right corner of the field. You don’t have a lot of gas in the tractor, so each move you make must be either down or right (no backtracking).

출력

Print “Yes” if there is a simple path (down and right moves only) to your farm house. If there is no simple path print “No”.

제한

예제 입력 1

6
..x...
.x....
....x.
xx.x..
..x...
......

예제 출력 1

No

예제 입력 2

5
.x.x.
.....
xxx..
....x
.x...

예제 출력 2

Yes

힌트

출처

School > PLU High School Programming Contest > PLU 2017 > Novice 8번

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

출처

대학교 대회

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

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