結果
| 問題 |
No.1823 Tricolor Dango
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-16 22:15:39 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 565 bytes |
| コンパイル時間 | 4,149 ms |
| コンパイル使用メモリ | 252,020 KB |
| 最終ジャッジ日時 | 2025-01-27 12:47:32 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 1 WA * 24 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
#define ll long long
#define all(x) x.begin(),x.end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(void)
{
ll t;
cin >> t;
while(t--){
ll n;
cin >> n;
vector<ll> a(n);
rep(i, n) cin >> a[i];
ll s = accumulate(all(a), 0);
ll m = *max_element(all(a));
if(s % 3 == 0 && (m <= s / 3)){
cout << "Yes" << endl;
}
else cout << "No" << endl;
}
return 0;
}