結果

問題 No.2812 Plus Minus Blackboard
ユーザー ニックネームニックネーム
提出日時 2024-07-19 21:48:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 247 bytes
コンパイル時間 528 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 32,032 KB
最終ジャッジ日時 2024-07-19 21:48:28
合計ジャッジ時間 3,348 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,624 KB
testcase_01 AC 25 ms
10,752 KB
testcase_02 AC 25 ms
10,624 KB
testcase_03 WA -
testcase_04 AC 101 ms
22,080 KB
testcase_05 AC 153 ms
29,656 KB
testcase_06 AC 50 ms
14,176 KB
testcase_07 AC 54 ms
13,284 KB
testcase_08 AC 41 ms
12,964 KB
testcase_09 AC 135 ms
26,816 KB
testcase_10 AC 38 ms
12,416 KB
testcase_11 AC 93 ms
20,964 KB
testcase_12 AC 75 ms
18,708 KB
testcase_13 AC 152 ms
30,700 KB
testcase_14 AC 56 ms
15,696 KB
testcase_15 AC 40 ms
12,288 KB
testcase_16 AC 136 ms
28,620 KB
testcase_17 WA -
testcase_18 AC 43 ms
13,916 KB
testcase_19 AC 113 ms
24,800 KB
testcase_20 AC 37 ms
12,416 KB
testcase_21 AC 146 ms
30,780 KB
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
p = []; q = []
for v in map(int,input().split()):
    if v>0: p.append(v)
    else: q.append(-v)
if not p or not q: exit(print("No"))
p.sort(); q.sort(); r = sum(p); s = sum(q)
if r>s: p,q = q,p
print("Yes" if s-q[-1]<r else "No")
0