結果
| 問題 | No.1823 Tricolor Dango |
| コンテスト | |
| ユーザー |
ikoma
|
| 提出日時 | 2022-01-28 22:51:53 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 299 bytes |
| 記録 | |
| コンパイル時間 | 757 ms |
| コンパイル使用メモリ | 84,992 KB |
| 実行使用メモリ | 111,232 KB |
| 最終ジャッジ日時 | 2026-06-04 00:27:39 |
| 合計ジャッジ時間 | 4,288 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 2 WA * 23 |
ソースコード
import sys
input = sys.stdin.readline
T=int(input())
from collections import defaultdict
for t in range(T):
N=int(input())
A=list(map(lambda x:-int(x),input().split()))
cnt = defaultdict(int)
for a in A:
cnt[a%3]+=1
print("Yes" if cnt[1]%3==0 and cnt[2]%3==0 else "No")
ikoma