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

20775번 - Antiplagiarism 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB49343269.565%

문제

Students of a specialized arts school must paint a picture as their graduation qualification work. In the course of their study, the students have mastered a technique of painting on a square canvas using two types of brushstroke: <<asterisk>> and <<hash>>. Using this technique, the prodigies must paint a square masterpiece of the size $N \times N,ドル using only the two types of strokes.

This is a tedious task, and every year a few students decide they could benefit from the hard work of the previous generations of their alumni-to-be. However, their imagination is quite limited. A student takes someone else's picture and applies the following operations several times: 1) rotate the image 90 degrees, 2) mirror it along the vertical or horizontal axis. After that, he submits the result as his own picture. Some students have even tried presenting unchanged old works as their own.

Their professors can feel something is wrong, but unfortunately, it is beyond their own powers to find out for sure whether the paintings are plagiarized or not. It's time to put an end to this disgraceful business and write a program that would automate the plagiarism check by defining whether a painting is a copy or not, thus helping the professors to find cheating students.

입력

The first line of the input file contains a single integer: $N$ is the size of the side of the square canvas (1ドル \leq N \leq 500$). Each of the following $N$ lines contains $N$ symbols \verb|*| or \verb|#|, denoting the types of the corresponding strokes of the first painting. Next comes an empty line. The next $N$ lines describe the second painting in the same format.

출력

The only line of the output file is the word YES, if one of the paintings is plagiarized from another, or NO if not.

제한

예제 입력 1

1
*
#

예제 출력 1

NO

예제 입력 2

3
#**
#*#
###
###
**#
*##

예제 출력 2

YES

힌트

출처

Contest > Open Cup > 2020/2021 Season > Stage 4: Grand Prix of Siberia, Division 1 10번

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

출처

대학교 대회

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

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