結果
| 問題 |
No.1944 ∞
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 19:13:52 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 773 bytes |
| コンパイル時間 | 166 ms |
| コンパイル使用メモリ | 82,116 KB |
| 実行使用メモリ | 101,376 KB |
| 最終ジャッジ日時 | 2025-06-12 19:13:56 |
| 合計ジャッジ時間 | 2,988 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 32 WA * 4 |
ソースコード
import math
def main():
import sys
input = sys.stdin.read
data = input().split()
idx = 0
N = int(data[idx])
idx += 1
X = int(data[idx])
idx += 1
Y = int(data[idx])
idx += 1
R = list(map(int, data[idx:idx+N]))
idx += N
if N == 1:
target = R[0] ** 2
current = X * X + Y * Y
if current == target:
print("Yes")
else:
print("No")
return
sum_R = sum(R)
S_max = 2 * sum_R - R[0] - R[-1]
D0 = math.sqrt(X ** 2 + Y ** 2)
R1 = R[0]
RN = R[-1]
lower = max(abs(R1 - RN), D0 - RN)
upper = min(S_max, D0 + RN)
if lower <= upper:
print("Yes")
else:
print("No")
if __name__ == "__main__":
main()
gew1fw