結果
問題 | No.1823 Tricolor Dango |
ユーザー | Ain48803949 |
提出日時 | 2022-01-28 21:58:04 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 98 ms / 2,000 ms |
コード長 | 1,057 bytes |
コンパイル時間 | 413 ms |
コンパイル使用メモリ | 10,896 KB |
実行使用メモリ | 31,920 KB |
最終ジャッジ日時 | 2023-08-28 19:53:46 |
合計ジャッジ時間 | 3,548 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 31 ms
10,220 KB |
testcase_01 | AC | 80 ms
10,308 KB |
testcase_02 | AC | 80 ms
10,144 KB |
testcase_03 | AC | 80 ms
10,252 KB |
testcase_04 | AC | 56 ms
10,312 KB |
testcase_05 | AC | 57 ms
10,396 KB |
testcase_06 | AC | 57 ms
10,328 KB |
testcase_07 | AC | 51 ms
10,704 KB |
testcase_08 | AC | 50 ms
10,548 KB |
testcase_09 | AC | 53 ms
10,580 KB |
testcase_10 | AC | 52 ms
10,528 KB |
testcase_11 | AC | 51 ms
10,620 KB |
testcase_12 | AC | 49 ms
10,628 KB |
testcase_13 | AC | 56 ms
12,908 KB |
testcase_14 | AC | 53 ms
12,824 KB |
testcase_15 | AC | 50 ms
13,356 KB |
testcase_16 | AC | 42 ms
14,680 KB |
testcase_17 | AC | 41 ms
14,212 KB |
testcase_18 | AC | 59 ms
20,692 KB |
testcase_19 | AC | 98 ms
31,920 KB |
testcase_20 | AC | 59 ms
20,356 KB |
testcase_21 | AC | 66 ms
10,204 KB |
testcase_22 | AC | 78 ms
10,316 KB |
testcase_23 | AC | 58 ms
10,304 KB |
testcase_24 | AC | 65 ms
10,220 KB |
testcase_25 | AC | 78 ms
10,292 KB |
ソースコード
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")