結果

問題 No.1823 Tricolor Dango
ユーザー ShirotsumeShirotsume
提出日時 2021-12-07 12:44:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 143 ms / 2,000 ms
コード長 453 bytes
コンパイル時間 221 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 103,848 KB
最終ジャッジ日時 2024-04-26 18:07:02
合計ジャッジ時間 5,106 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
61,568 KB
testcase_01 AC 143 ms
77,856 KB
testcase_02 AC 129 ms
78,464 KB
testcase_03 AC 128 ms
78,080 KB
testcase_04 AC 93 ms
77,312 KB
testcase_05 AC 98 ms
77,568 KB
testcase_06 AC 97 ms
77,312 KB
testcase_07 AC 79 ms
77,056 KB
testcase_08 AC 83 ms
77,056 KB
testcase_09 AC 79 ms
76,800 KB
testcase_10 AC 80 ms
76,928 KB
testcase_11 AC 80 ms
77,184 KB
testcase_12 AC 76 ms
76,672 KB
testcase_13 AC 76 ms
77,824 KB
testcase_14 AC 75 ms
77,952 KB
testcase_15 AC 75 ms
77,184 KB
testcase_16 AC 64 ms
71,552 KB
testcase_17 AC 65 ms
72,576 KB
testcase_18 AC 84 ms
82,560 KB
testcase_19 AC 109 ms
103,848 KB
testcase_20 AC 79 ms
82,816 KB
testcase_21 AC 133 ms
78,208 KB
testcase_22 AC 125 ms
78,080 KB
testcase_23 AC 103 ms
77,696 KB
testcase_24 AC 110 ms
78,080 KB
testcase_25 AC 134 ms
78,336 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