結果

問題 No.1823 Tricolor Dango
ユーザー nao109
提出日時 2022-01-28 23:20:11
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 358 bytes
コンパイル時間 1,662 ms
コンパイル使用メモリ 158,308 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-30 11:31:55
合計ジャッジ時間 3,877 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 2 WA * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
    ll t; cin >> t;
    for(ll i=0; i<t; i++){
        ll n; cin >> n;
        ll a[3]={},ch;
        for(ll i=0; i<n; i++){
            cin >> ch;
            a[ch%3]++;
        }
        if(a[1]%3==0&&a[2]%3==0) cout << "Yes" << endl;
        else cout << "No" << endl;
    }
}
0