結果
| 問題 |
No.1823 Tricolor Dango
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-28 22:53:54 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 496 bytes |
| コンパイル時間 | 519 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 43,032 KB |
| 最終ジャッジ日時 | 2024-12-30 09:49:58 |
| 合計ジャッジ時間 | 75,138 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 1 TLE * 24 |
ソースコード
t = int(input())
for re in range(t):
n = int(input())
a = list(map(int,input().split()))
a.sort(reverse=True)
times = sum(a)//3
if sum(a)%3 != 0:
print("No")
continue
for try_stick in range(times):
a[0] -= 1
a[1] -= 1
a[2] -= 1
target = 0
a = [item for item in a if item != target]
a.sort(reverse=True)
if len(a) < 3 and a!=[]:
print("No")
break
else:
print("Yes")