結果

問題 No.1823 Tricolor Dango
ユーザー ShirotsumeShirotsume
提出日時 2021-11-24 02:01:12
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 462 bytes
コンパイル時間 1,666 ms
コンパイル使用メモリ 86,556 KB
実行使用メモリ 111,656 KB
最終ジャッジ日時 2023-09-08 06:48:16
合計ジャッジ時間 8,559 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
77,256 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 146 ms
78,672 KB
testcase_08 AC 147 ms
78,700 KB
testcase_09 AC 150 ms
78,736 KB
testcase_10 AC 148 ms
78,944 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 148 ms
80,036 KB
testcase_14 AC 148 ms
79,912 KB
testcase_15 AC 142 ms
78,888 KB
testcase_16 AC 144 ms
82,976 KB
testcase_17 AC 144 ms
83,104 KB
testcase_18 AC 152 ms
91,216 KB
testcase_19 AC 178 ms
111,656 KB
testcase_20 AC 151 ms
91,196 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
権限があれば一括ダウンロードができます

ソースコード

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) - min(a) < sum(a) // 3:
        return 'Yes'
    else:
        return 'No'







    



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

0