結果
| 問題 |
No.476 正しくない平均
|
| ユーザー |
|
| 提出日時 | 2020-04-07 08:32:05 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 368 bytes |
| コンパイル時間 | 630 ms |
| コンパイル使用メモリ | 65,776 KB |
| 最終ジャッジ日時 | 2025-01-09 14:49:58 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
#include <iostream>
using lint = long long;
void solve() {
int n;
lint s;
std::cin >> n >> s;
s *= n;
while (n--) {
lint x;
std::cin >> x;
s -= x;
}
std::cout << (s == 0 ? "YES" : "NO") << std::endl;
}
int main() {
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
solve();
return 0;
}