結果
| 問題 |
No.1940 Escape through + -
|
| ユーザー |
|
| 提出日時 | 2022-08-12 16:33:22 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 49 ms / 2,000 ms |
| コード長 | 304 bytes |
| コンパイル時間 | 1,815 ms |
| コンパイル使用メモリ | 192,292 KB |
| 最終ジャッジ日時 | 2025-01-30 20:28:25 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 25 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
long long n, m, s, a, t;
int main() {
cin >> n >> m >> s;
for (int i = 0; i < n; i++) {
cin >> a;
t += a;
}
if ((max(t, s) - min(t, s)) % m == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
}