結果
| 問題 | No.1823 Tricolor Dango |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-28 22:53:54 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 496 bytes |
| 記録 | |
| コンパイル時間 | 760 ms |
| コンパイル使用メモリ | 20,824 KB |
| 実行使用メモリ | 21,760 KB |
| 最終ジャッジ日時 | 2026-06-04 00:31:47 |
| 合計ジャッジ時間 | 4,433 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | TLE * 1 -- * 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")