Submission #21297967


Source Code Expand

import sys

sys.setrecursionlimit(500005)
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

n = ni()
x0, y0 = na()
xh, yh = na()

xc = (x0+xh)/2
yc = (y0+yh)/2

xv = x0-xc
yv = y0-yc
import math

theta = 360/n*math.pi/180
xxc = math.cos(theta) * xv - math.sin(theta) * yv + xc
yyc = math.sin(theta) * xv + math.cos(theta) * yv + yc
print(f"{xxc:.12f} {yyc:.12f}")

Submission Info

Submission Time
Task D - Opposite
User uwi
Language PyPy3 (7.3.0)
Score 400
Code Size 473 Byte
Status AC
Exec Time 68 ms
Memory 62596 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 400 / 400
Status
AC × 2
AC × 18
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All handmade_00.txt, handmade_01.txt, handmade_02.txt, handmade_03.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
handmade_00.txt AC 68 ms 62488 KiB
handmade_01.txt AC 52 ms 62284 KiB
handmade_02.txt AC 50 ms 62256 KiB
handmade_03.txt AC 53 ms 62312 KiB
random_00.txt AC 52 ms 62308 KiB
random_01.txt AC 51 ms 62072 KiB
random_02.txt AC 49 ms 62292 KiB
random_03.txt AC 51 ms 62228 KiB
random_04.txt AC 50 ms 62444 KiB
random_05.txt AC 50 ms 62072 KiB
random_06.txt AC 52 ms 62372 KiB
random_07.txt AC 53 ms 62448 KiB
random_08.txt AC 51 ms 62308 KiB
random_09.txt AC 52 ms 62596 KiB
random_10.txt AC 50 ms 62484 KiB
random_11.txt AC 49 ms 62492 KiB
sample_01.txt AC 50 ms 62432 KiB
sample_02.txt AC 50 ms 62300 KiB