結果

問題 No.1944 ∞
ユーザー gew1fw
提出日時 2025-06-12 19:13:49
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 467 bytes
コンパイル時間 202 ms
コンパイル使用メモリ 82,332 KB
実行使用メモリ 103,480 KB
最終ジャッジ日時 2025-06-12 19:13:53
合計ジャッジ時間 3,458 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

n, x, y = map(int, input().split())
r = list(map(int, input().split()))

if n == 1:
    if x == 0 and y == 0:
        print("Yes")
    else:
        print("No")
elif n == 2:
    s = r[0] + r[1]
    d = math.hypot(x, y)
    if abs(d - s) < 1e-9:
        print("Yes")
    else:
        print("No")
else:
    s = 0
    for i in range(n-1):
        s += r[i] + r[i+1]
    d = math.hypot(x, y)
    if d <= s:
        print("Yes")
    else:
        print("No")
0