結果
問題 | No.1823 Tricolor Dango |
ユーザー |
|
提出日時 | 2022-02-04 21:07:33 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 576 bytes |
コンパイル時間 | 2,417 ms |
コンパイル使用メモリ | 192,064 KB |
最終ジャッジ日時 | 2025-01-27 18:35:57 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 1 WA * 24 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll = long long; const int INF = 1<<30; const long long LINF = 1LL<<60; const long long MOD = (long long)1e9 + 7; int main(){ int t; cin >> t; while(t--){ int n; cin >> n; int m = 0, sum = 0; for(int i = 0; i < n; i++){ int a; cin >> a; m = max(a, m); sum += a; } if(sum % 3 == 0 && m <= sum / 3 ){ cout << "Yes" << endl; }else{ cout << "No" << endl; } } return 0; }