結果
問題 |
No.1940 Escape through + -
|
ユーザー |
![]() |
提出日時 | 2024-05-05 00:15:50 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 45 ms / 2,000 ms |
コード長 | 495 bytes |
コンパイル時間 | 2,671 ms |
コンパイル使用メモリ | 247,616 KB |
実行使用メモリ | 6,816 KB |
最終ジャッジ日時 | 2024-11-26 15:54:20 |
合計ジャッジ時間 | 4,261 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 25 |
ソースコード
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #define _GLIBCXX_DEBUG #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { ll n, m, s; cin >> n >> m >> s; vector<ll> a(n); rep(i, n) cin >> a[i]; if (accumulate(a.begin(), a.end(), 0LL) % m == s % m) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }