結果

問題 No.1823 Tricolor Dango
ユーザー titiatitia
提出日時 2022-01-28 21:22:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 301 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 10,760 KB
実行使用メモリ 30,100 KB
最終ジャッジ日時 2023-08-28 19:00:25
合計ジャッジ時間 2,614 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,840 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 39 ms
8,632 KB
testcase_09 AC 44 ms
8,516 KB
testcase_10 AC 40 ms
8,612 KB
testcase_11 WA -
testcase_12 AC 34 ms
8,476 KB
testcase_13 AC 41 ms
10,664 KB
testcase_14 AC 38 ms
10,484 KB
testcase_15 AC 39 ms
11,344 KB
testcase_16 AC 25 ms
12,520 KB
testcase_17 AC 31 ms
12,224 KB
testcase_18 AC 59 ms
17,716 KB
testcase_19 AC 122 ms
30,100 KB
testcase_20 AC 59 ms
17,668 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

T=int(input())
for tests in range(T):    
    n=int(input())
    A=list(map(int,input().split()))

    if sum(A)%3!=0:
        print("No")
        continue

    A.sort()

    if A[-1]+A[-2]<=sum(A)//3*2:
        print("Yes")
    else:
        print("No")

    

0