結果

問題 No.1823 Tricolor Dango
ユーザー 👑 KazunKazun
提出日時 2022-01-28 21:24:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 303 bytes
コンパイル時間 913 ms
コンパイル使用メモリ 86,496 KB
実行使用メモリ 99,544 KB
最終ジャッジ日時 2023-08-28 19:03:16
合計ジャッジ時間 4,415 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,372 KB
testcase_01 AC 109 ms
77,400 KB
testcase_02 AC 105 ms
77,460 KB
testcase_03 AC 107 ms
77,284 KB
testcase_04 AC 92 ms
76,880 KB
testcase_05 AC 92 ms
76,812 KB
testcase_06 AC 92 ms
76,568 KB
testcase_07 AC 81 ms
76,780 KB
testcase_08 AC 82 ms
76,584 KB
testcase_09 AC 82 ms
76,628 KB
testcase_10 AC 80 ms
76,444 KB
testcase_11 AC 81 ms
76,356 KB
testcase_12 AC 82 ms
76,416 KB
testcase_13 AC 82 ms
77,764 KB
testcase_14 AC 83 ms
77,032 KB
testcase_15 AC 79 ms
76,652 KB
testcase_16 AC 76 ms
79,812 KB
testcase_17 AC 80 ms
79,760 KB
testcase_18 AC 86 ms
87,524 KB
testcase_19 AC 121 ms
99,544 KB
testcase_20 AC 87 ms
87,572 KB
testcase_21 AC 102 ms
77,404 KB
testcase_22 AC 105 ms
77,396 KB
testcase_23 AC 98 ms
77,156 KB
testcase_24 AC 103 ms
77,536 KB
testcase_25 AC 105 ms
77,180 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=sys.stdin.readline
write=sys.stdout.write

T=int(input())
Ans=[0]*T
for t in range(T):
    N=int(input())
    A=list(map(int,input().split()))

    S=sum(A)
    if S%3!=0:
        continue

    if max(A)<=S//3:
        Ans[t]=1

write("\n".join(map(lambda x:"Yes" if x else "No",Ans)))
0