結果
問題 |
No.476 正しくない平均
|
ユーザー |
![]() |
提出日時 | 2019-05-21 12:03:30 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 323 bytes |
コンパイル時間 | 440 ms |
コンパイル使用メモリ | 58,840 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-17 08:54:35 |
合計ジャッジ時間 | 1,329 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 WA * 1 |
ソースコード
#include <iostream> #include <vector> using namespace std; int main(){ int n, ave, sum = 0; cin >> n >> ave; vector<int> a(n); for(int i = 0; i < n; i ++){ cin >> a[i]; sum += a[i]; } if(ave * n == sum){ cout << "YES" << endl; }else{ cout << "NO" << endl; } }