結果
| 問題 |
No.3180 angles sum
|
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2025-06-13 22:40:19 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 2,106 bytes |
| コンパイル時間 | 268 ms |
| コンパイル使用メモリ | 82,372 KB |
| 実行使用メモリ | 78,476 KB |
| 最終ジャッジ日時 | 2025-06-14 01:43:19 |
| 合計ジャッジ時間 | 9,178 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 16 WA * 1 |
ソースコード
class Vec2:
def __init__(self, x, y):
self.x = x
self.y = y
def __repr__(self):
return f'({self.x}, {self.y})'
def dot(self, o):
return self.x * o.x + self.y * o.y
def cross(self, o):
return self.x * o.y - self.y * o.x
def normalized(self):
m = self.mag()
if m != 0 and m != 1:
return Vec2(self.x / m, self.y / m)
return self
def magsq(self):
return self.x * self.x + self.y * self.y
def mag(self):
return sqrt(self.magsq())
def rotate(self, rad):
x = self.x * cos(rad) - self.y * sin(rad)
y = self.x * sin(rad) + self.y * cos(rad)
return Vec2(x, y)
def rot90ccw(self):
return Vec2(-self.y, self.x)
def distance(self, other) -> float:
return (self - other).mag()
def __eq__(self, other):
return self.x == other.x and self.y == other.y
def __ne__(self, other):
return not self.__eq__(other)
def __lt__(self, other):
if self.x == other.x:
return self.y < other.y
return self.x < other.x
def __add__(self, other):
return Vec2(self.x + other.x, self.y + other.y)
def __sub__(self, other):
return Vec2(self.x - other.x, self.y - other.y)
def __mul__(self, d):
return Vec2(self.x * d, self.y * d)
def __rmul__(self, d):
return self.__mul__(d)
def __truediv__(self, d):
return Vec2(self.x / d, self.y / d)
def __neg__(self):
return Vec2(-self.x, -self.y)
def __iadd__(self, other):
self.x += other.x
self.y += other.y
return self
def __isub__(self, other):
self.x -= other.x
self.y -= other.y
return self
def solve():
AX, AY, BX, BY, CX, CY = map(int, input().split())
a = complex(AX, AY)
b = complex(BX, BY)
ab = a * b
s = Vec2(ab.real, ab.imag)
t = Vec2(CX, CY)
return s.cross(t) == 0
T = int(input())
for _ in range(T):
ans = solve()
if ans:
print('Yes')
else:
print('No')
norioc