Submission #23799675


Source Code Expand

def init_arg(num): return int(num)-1
def II(): return int(input())
def IS(): return input()
def IL(): return list(map(int, input().split()))
def IL_arg(): return list(map(init_arg, input().split()))
def ILs(n): return [list(map(int, input().split())) for _ in range(n)]
tf = lambda boolean: "Yes" if boolean else "No"
def INF(): return 1e10
def zeros1(n): return [0 for _ in range(n)]
def zeros2(n, m): return [[0 for _ in range(n)] for _ in range(m)]

import numpy as np
n = II()
xs = []
ys = []
tmp = []
for _ in range(n):
    x, y = IL()
    xs.append(x)
    ys.append(y)
    tmp.append(1)
As = np.array([xs, ys, tmp])

xs = []
ys = []
tmp = []
for _ in range(n):
    x, y = IL()
    xs.append(x)
    ys.append(y)
    tmp.append(1)
Bs = np.array([xs, ys, tmp])

As = np.linalg.pinv(As)
dot = np.dot(Bs, As)
dot = [[round(dot[i, j]) for i in range(3)] for j in range(3)]
dot = np.array(dot)


if int(dot[0, 0]) == int(dot[1, 1]) and int(dot[0, 1])==-1*int(dot[1, 2]):
	print("Yes")
else:
  	print("No")

Submission Info

Submission Time
Task D - Congruence Points
User metropo
Language Python (3.8.2)
Score 0
Code Size 1048 Byte
Status WA
Exec Time 134 ms
Memory 28172 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 400
Status
AC × 2
WA × 2
AC × 34
WA × 30
Set Name Test Cases
Sample example0.txt, example1.txt, example2.txt, example3.txt
All 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, 020.txt, 021.txt, 022.txt, 023.txt, 024.txt, 025.txt, 026.txt, 027.txt, 028.txt, 029.txt, 030.txt, 031.txt, 032.txt, 033.txt, 034.txt, 035.txt, 036.txt, 037.txt, 038.txt, 039.txt, 040.txt, 041.txt, 042.txt, 043.txt, 044.txt, 045.txt, example0.txt, example1.txt, example2.txt, example3.txt, killer_T_01.txt, killer_T_02.txt, killer_T_03.txt, killer_T_04.txt, killer_T_05.txt, killer_T_06.txt, killer_T_07.txt, killer_T_08.txt, killer_T_09.txt, killer_T_10.txt, killer_T_11.txt, killer_T_12.txt, killer_T_13.txt, killer_T_14.txt
Case Name Status Exec Time Memory
000.txt AC 134 ms 27804 KiB
001.txt WA 116 ms 27664 KiB
002.txt WA 116 ms 27648 KiB
003.txt WA 113 ms 27848 KiB
004.txt WA 116 ms 27680 KiB
005.txt AC 116 ms 27828 KiB
006.txt AC 114 ms 28168 KiB
007.txt AC 114 ms 28132 KiB
008.txt AC 116 ms 27860 KiB
009.txt AC 114 ms 27640 KiB
010.txt AC 115 ms 27572 KiB
011.txt AC 115 ms 27688 KiB
012.txt AC 118 ms 28172 KiB
013.txt WA 117 ms 27688 KiB
014.txt WA 114 ms 27700 KiB
015.txt WA 115 ms 27844 KiB
016.txt AC 114 ms 28156 KiB
017.txt WA 114 ms 27768 KiB
018.txt AC 116 ms 27572 KiB
019.txt WA 114 ms 27388 KiB
020.txt AC 113 ms 28120 KiB
021.txt WA 113 ms 27528 KiB
022.txt AC 114 ms 27576 KiB
023.txt AC 112 ms 27784 KiB
024.txt WA 113 ms 27392 KiB
025.txt WA 111 ms 27772 KiB
026.txt WA 114 ms 27520 KiB
027.txt AC 114 ms 27628 KiB
028.txt AC 115 ms 27508 KiB
029.txt AC 115 ms 27960 KiB
030.txt AC 117 ms 27392 KiB
031.txt AC 115 ms 27472 KiB
032.txt AC 114 ms 27748 KiB
033.txt AC 115 ms 28108 KiB
034.txt WA 114 ms 27512 KiB
035.txt AC 112 ms 27924 KiB
036.txt WA 112 ms 27736 KiB
037.txt AC 114 ms 27696 KiB
038.txt AC 113 ms 27788 KiB
039.txt AC 113 ms 27536 KiB
040.txt AC 113 ms 27788 KiB
041.txt WA 112 ms 28148 KiB
042.txt WA 114 ms 27648 KiB
043.txt WA 118 ms 27724 KiB
044.txt WA 117 ms 27996 KiB
045.txt AC 118 ms 27728 KiB
example0.txt WA 114 ms 27728 KiB
example1.txt AC 117 ms 27728 KiB
example2.txt AC 117 ms 27508 KiB
example3.txt WA 118 ms 27536 KiB
killer_T_01.txt AC 118 ms 28144 KiB
killer_T_02.txt WA 118 ms 27916 KiB
killer_T_03.txt WA 115 ms 27576 KiB
killer_T_04.txt WA 116 ms 27396 KiB
killer_T_05.txt AC 117 ms 27412 KiB
killer_T_06.txt WA 118 ms 27712 KiB
killer_T_07.txt WA 114 ms 28112 KiB
killer_T_08.txt AC 121 ms 27996 KiB
killer_T_09.txt WA 117 ms 27792 KiB
killer_T_10.txt AC 116 ms 27708 KiB
killer_T_11.txt WA 116 ms 27732 KiB
killer_T_12.txt AC 113 ms 27732 KiB
killer_T_13.txt WA 115 ms 28108 KiB
killer_T_14.txt WA 116 ms 27512 KiB