結果
| 問題 | No.1823 Tricolor Dango |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-29 11:41:47 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 49 ms / 2,000 ms |
| + 325µs | |
| コード長 | 326 bytes |
| 記録 | |
| コンパイル時間 | 827 ms |
| コンパイル使用メモリ | 183,708 KB |
| 実行使用メモリ | 9,924 KB |
| 最終ジャッジ日時 | 2026-10-10 02:22:36 |
| 合計ジャッジ時間 | 3,683 ms |
|
ジャッジサーバーID (参考情報) |
judge4_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 25 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef int64_t ll;
int main() {
int t,n;
cin>>t;
while(t--){
cin>>n;
ll a,ma=0,sum=0;
for(int i=0;i<n;i++){
cin>>a;
ma=max(a,ma);
sum+=a;
}
if(sum%3==0 && ma*3<=sum)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
return 0;
}