結果
問題 |
No.1944 ∞
|
ユーザー |
![]() |
提出日時 | 2025-06-12 19:15:22 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 834 bytes |
コンパイル時間 | 167 ms |
コンパイル使用メモリ | 82,224 KB |
実行使用メモリ | 104,380 KB |
最終ジャッジ日時 | 2025-06-12 19:15:39 |
合計ジャッジ時間 | 2,743 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 26 WA * 10 |
ソースコード
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 sum_R = sum(R) if N < 2: R_min = R[0] R_min2 = R[0] else: sorted_R = sorted(R) R_min = sorted_R[0] R_min2 = sorted_R[1] if len(sorted_R) >= 2 else R_min R_max = max(R) S_max_total = 2 * sum_R - R_min - R_min2 S_min_total = R_max - R_min D = math.hypot(X, Y) R_N = R[-1] lower = abs(D - R_N) upper = D + R_N if S_min_total <= upper and S_max_total >= lower: print("Yes") else: print("No") if __name__ == '__main__': main()