結果
| 問題 |
No.1823 Tricolor Dango
|
| コンテスト | |
| ユーザー |
Ain48803949
|
| 提出日時 | 2022-01-28 21:58:04 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 135 ms / 2,000 ms |
| コード長 | 1,057 bytes |
| コンパイル時間 | 224 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 33,980 KB |
| 最終ジャッジ日時 | 2024-12-30 06:39:46 |
| 合計ジャッジ時間 | 4,004 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 25 |
ソースコード
import bisect,collections,copy,heapq,itertools,math,string,sys,queue,time,random
input = lambda: sys.stdin.readline().rstrip()
def I(): return input()
def IS(): return input().split()
def II(): return int(input())
def IIS(): return list(map(int,input().split()))
def LIIS(): return list(map(int,input().split()))
def comb(n, r):return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def make_divisors(n):
lower_divisors , upper_divisors = [], []
i = 1
while i*i <= n:
if n % i == 0:
lower_divisors.append(i)
if i != n // i:
upper_divisors.append(n//i)
i += 1
return lower_divisors + upper_divisors[::-1]
ragen=range
INF=10**18
MOD=998244353
#sys.setrecursionlimit(10**7)
alpha="abcdefghijklmnopqrstuvwxyz"
def bit(x):
return bin(x).count("1")
##############################################################################
t=II()
for i in range(t):
n=II()
A=LIIS()
if sum(A)%3==0 and max(A)<=sum(A)//3:
print("Yes")
else:
print("No")
Ain48803949