結果
| 問題 | No.1385 Simple Geometry 2 |
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2021-02-07 23:23:38 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 181 ms / 500 ms |
| コード長 | 272 bytes |
| 記録 | |
| コンパイル時間 | 171 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 188,028 KB |
| 最終ジャッジ日時 | 2026-03-26 01:19:05 |
| 合計ジャッジ時間 | 15,484 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 65 |
ソースコード
from math import cos,sin,pi
n,L = map(int,input().split())
*a, = map(int,input().split())
w = 2*pi/L
ans = 0j
x = y = v = 0
for j in range(n):
x += v
y += (j-1)*v*2
v = cos(-w*a[j]) + 1j*sin(-w*a[j])
ans += (x*(n-2*j)+y)/v
print(ans.imag*3/n/(n-1)/(n-2))
convexineq