Submission #2134204


Source Code Expand

Copy
from collections import Counter
import numpy as np
p = 2.5e5
n = int(input())
l = np.array([list(map(int, input().split())) for _ in range(n)], dtype=np.float32)
ans = np.zeros(n)
a = np.linspace(0, 2 * np.pi, p, endpoint=False)
b = np.array([np.sin(a), np.cos(a)], dtype=np.float32)
for i, v in Counter(np.argmax(np.dot(l, b), axis=0)).items():
ans[i] += v / p
print('\n'.join(map(str, ans)))
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
from collections import Counter
import numpy as np

p = 2.5e5
n = int(input())
l = np.array([list(map(int, input().split())) for _ in range(n)], dtype=np.float32)
ans = np.zeros(n)

a = np.linspace(0, 2 * np.pi, p, endpoint=False)
b = np.array([np.sin(a), np.cos(a)], dtype=np.float32)

for i, v in Counter(np.argmax(np.dot(l, b), axis=0)).items():
  ans[i] += v / p

print('\n'.join(map(str, ans)))

Submission Info

Submission Time
Task B - Holes
User suwakotaro
Language Python (3.4.3)
Score 600
Code Size 413 Byte
Status AC
Exec Time 532 ms
Memory 219668 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 600 / 600
Status
AC × 2
AC × 26
Set Name Test Cases
Sample s1.txt, s2.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 20.txt, 21.txt, 22.txt, 23.txt, 24.txt, s1.txt, s2.txt
Case Name Status Exec Time Memory
01.txt AC 508 ms 213652 KB
02.txt AC 509 ms 215700 KB
03.txt AC 521 ms 217620 KB
04.txt AC 518 ms 217748 KB
05.txt AC 511 ms 213652 KB
06.txt AC 532 ms 219668 KB
07.txt AC 507 ms 213624 KB
08.txt AC 504 ms 213652 KB
09.txt AC 516 ms 217620 KB
10.txt AC 523 ms 213652 KB
11.txt AC 507 ms 213652 KB
12.txt AC 516 ms 215572 KB
13.txt AC 516 ms 215672 KB
14.txt AC 512 ms 213752 KB
15.txt AC 521 ms 217620 KB
16.txt AC 513 ms 217748 KB
17.txt AC 498 ms 213652 KB
18.txt AC 526 ms 217620 KB
19.txt AC 516 ms 217748 KB
20.txt AC 511 ms 211604 KB
21.txt AC 321 ms 30228 KB
22.txt AC 263 ms 22292 KB
23.txt AC 265 ms 27156 KB
24.txt AC 315 ms 26132 KB
s1.txt AC 262 ms 22164 KB
s2.txt AC 319 ms 32020 KB


2025-03-29 (Sat)
11:04:27 +00:00