結果
問題 |
No.1823 Tricolor Dango
|
ユーザー |
👑 |
提出日時 | 2023-06-05 21:17:22 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 88 ms / 2,000 ms |
コード長 | 351 bytes |
コンパイル時間 | 748 ms |
コンパイル使用メモリ | 70,152 KB |
最終ジャッジ日時 | 2025-02-13 22:57:01 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 25 |
ソースコード
#include <iostream> #include <vector> using namespace std; void solve(){ int n;cin>>n; long long mx = 0; long long sm = 0; for(int i = 0; n > i; i++){ long long x;cin>>x; mx = max(mx,x); sm += x; } if(sm%3 || sm/3 < mx)cout << "No" << endl; else cout << "Yes" << endl; } int main(){ int t;cin>>t; while(t--)solve(); }