結果
問題 |
No.1944 ∞
|
ユーザー |
![]() |
提出日時 | 2025-04-15 22:10:48 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,142 bytes |
コンパイル時間 | 184 ms |
コンパイル使用メモリ | 81,892 KB |
実行使用メモリ | 112,836 KB |
最終ジャッジ日時 | 2025-04-15 22:12:07 |
合計ジャッジ時間 | 3,191 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 WA * 5 |
ソースコード
import math from collections import Counter def main(): import sys input = sys.stdin.read().split() idx = 0 N = int(input[idx]) idx += 1 X = int(input[idx]) idx += 1 Y = int(input[idx]) idx += 1 R = list(map(int, input[idx:idx+N])) idx += N sum_total = sum(R) OP = math.sqrt(X ** 2 + Y ** 2) min_r = min(R) count = Counter(R) for r_last in R: candidates = [] if count[r_last] >= 2: candidates.append(r_last) if min_r != r_last or count[r_last] >= 2: candidates.append(min_r) # Remove duplicates candidates = list(set(candidates)) for r_first in candidates: if r_first == r_last and count[r_last] < 2: continue min_D = r_first + r_last max_D = 2 * sum_total - r_first - r_last lower = OP - r_last upper = OP + r_last left = max(min_D, lower) right = min(max_D, upper) if left <= right: print("Yes") return print("No") if __name__ == "__main__": main()