結果
問題 |
No.1940 Escape through + -
|
ユーザー |
![]() |
提出日時 | 2022-05-19 22:24:46 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 16 ms / 2,000 ms |
コード長 | 529 bytes |
コンパイル時間 | 401 ms |
コンパイル使用メモリ | 40,772 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 02:57:05 |
合計ジャッジ時間 | 2,116 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 25 |
ソースコード
/* -*- coding: utf-8 -*- * * 1940.cc: No.1940 Escape through + - - yukicoder */ #include<cstdio> #include<algorithm> using namespace std; /* constant */ const int MAX_N = 100000; /* typedef */ typedef long long ll; /* global variables */ int as[MAX_N]; /* subroutines */ /* main */ int main() { int n; ll m, s; scanf("%d%lld%lld", &n, &m, &s); ll asum = 0; for (int i = 0; i < n; i++) scanf("%d", as + i), asum += as[i]; if (abs(s - asum) % m == 0) puts("Yes"); else puts("No"); return 0; }