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

5448번 - Acrobat Reader 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB36151145.833%

문제

At Schiphol airport they use biometrical data to check if people are who they claim to be. When the circus will travel abroad next month, this is expected to give some problems, because when acrobats are passing border control you never know in what orientation their face will be. You can assume they will look straight into the camera, but their face can be rotated by a multiple of 90 degrees. Moreover, as with any passenger, their picture may be translated and scaled (by the same factor in both dimensions).

Given a number of pairs of biometric scans, one from the passport and one freshly recorded, determine for each of these acrobats whether his or her scans match or not.

입력

The first line of the input contains a single number: the number of test cases to follow. Each test case has the following format:

  • One line with an integer N, satisfying 1 ≤ N ≤ 10, 000: the number of points in each of the two biometric scans for an acrobat.
  • N lines, each with two integers xi and yi, satisfying −10, 000 ≤ xi,yi ≤ 10, 000: the x- and y-coordinates of a point in the first biometric scan.
  • N lines, each with two integers xi and yi, satisfying −10, 000 ≤ xi,yi ≤ 10, 000: the x- and y-coordinates of a point in the second biometric scan.

Integers on the same line are separated by a single space. No two points within a single biometric scan are identical. The order of the N points in a biometric scan is completely arbitrary.

출력

For every test case in the input, the output should contain a single string, on a single line: "okay" if the scans match, or "mismatch!" if they do not.

제한

예제 입력 1

2
3
-1 1
0 -1
1 0
-1 0
1 -2
3 2
3
0 0
2 1
2 2
0 0
-2 1
-2 2

예제 출력 1

okay
mismatch!

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > Benelux Algorithm Programming Contest > BAPC 2010 Preliminaries G번

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

출처

대학교 대회

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

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