結果

問題 No.1823 Tricolor Dango
ユーザー ShirotsumeShirotsume
提出日時 2021-11-24 02:05:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 216 ms / 2,000 ms
コード長 454 bytes
コンパイル時間 310 ms
コンパイル使用メモリ 87,028 KB
実行使用メモリ 111,516 KB
最終ジャッジ日時 2023-09-08 06:53:03
合計ジャッジ時間 6,225 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
77,060 KB
testcase_01 AC 216 ms
80,092 KB
testcase_02 AC 182 ms
79,748 KB
testcase_03 AC 188 ms
79,744 KB
testcase_04 AC 163 ms
79,580 KB
testcase_05 AC 163 ms
79,216 KB
testcase_06 AC 164 ms
79,320 KB
testcase_07 AC 146 ms
79,012 KB
testcase_08 AC 151 ms
79,016 KB
testcase_09 AC 148 ms
78,828 KB
testcase_10 AC 148 ms
78,816 KB
testcase_11 AC 145 ms
79,128 KB
testcase_12 AC 141 ms
78,832 KB
testcase_13 AC 145 ms
80,232 KB
testcase_14 AC 142 ms
80,000 KB
testcase_15 AC 137 ms
79,064 KB
testcase_16 AC 130 ms
83,032 KB
testcase_17 AC 136 ms
83,304 KB
testcase_18 AC 141 ms
91,432 KB
testcase_19 AC 164 ms
111,516 KB
testcase_20 AC 137 ms
91,268 KB
testcase_21 AC 169 ms
79,852 KB
testcase_22 AC 185 ms
80,124 KB
testcase_23 AC 167 ms
80,012 KB
testcase_24 AC 170 ms
80,128 KB
testcase_25 AC 177 ms
80,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda: sys.stdin.readline().rstrip()
import bisect
import itertools
import math
from collections import deque
from collections import Counter
import copy
INF = 10 ** 9
import random

def solve():
    n = int(input())
    a = list(map(int,input().split()))
    if sum(a) % 3 == 0 and max(a) <= sum(a) // 3:
        return 'Yes'
    else:
        return 'No'







    



    
t = int(input())
for _ in range(t):
    print(solve())

0