結果
| 問題 |
No.1594 Three Classes
|
| コンテスト | |
| ユーザー |
Narumisakakios
|
| 提出日時 | 2021-07-09 22:41:55 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 373 bytes |
| コンパイル時間 | 1,536 ms |
| コンパイル使用メモリ | 168,072 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-01 17:24:16 |
| 合計ジャッジ時間 | 2,273 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 8 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
ll N;cin>>N;
vector<ll>A(N);
ll ans = 0;
ll num = 0;
for(ll i=0;i<N;i++){
cin>>A[i];
ans += A[i];
num = max(num,A[i]);
}
if(ans%3!=0){
cout<<"No"<<endl;
return 0;
}
if(num<=ans/3){
cout<<"Yes"<<endl;
}
}
Narumisakakios