結果

問題 No.1940 Escape through + -
ユーザー SyNtAx_error_1SyNtAx_error_1
提出日時 2022-05-18 20:03:04
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 13 ms / 2,000 ms
コード長 2,212 bytes
コンパイル時間 1,666 ms
コンパイル使用メモリ 171,588 KB
実行使用メモリ 4,424 KB
最終ジャッジ日時 2023-10-16 23:32:52
合計ジャッジ時間 3,047 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 1 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 1 ms
4,348 KB
testcase_11 AC 1 ms
4,348 KB
testcase_12 AC 1 ms
4,348 KB
testcase_13 AC 1 ms
4,348 KB
testcase_14 AC 2 ms
4,348 KB
testcase_15 AC 2 ms
4,348 KB
testcase_16 AC 1 ms
4,348 KB
testcase_17 AC 2 ms
4,348 KB
testcase_18 AC 2 ms
4,348 KB
testcase_19 AC 2 ms
4,348 KB
testcase_20 AC 3 ms
4,348 KB
testcase_21 AC 3 ms
4,348 KB
testcase_22 AC 3 ms
4,348 KB
testcase_23 AC 3 ms
4,348 KB
testcase_24 AC 13 ms
4,424 KB
testcase_25 AC 13 ms
4,424 KB
testcase_26 AC 12 ms
4,424 KB
testcase_27 AC 13 ms
4,424 KB
testcase_28 AC 12 ms
4,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

// @SyNtAx_error_1

/* #region  templates */
// clang-format off
#include<bits/stdc++.h>
//#include<atcoder/all>
#define rep(i,n) REP(i,0,n)
#define REP(i,a,b) for(ll i=a; i<ll(b);i++)
#define REPD(i,a,b) for(ll i=ll(b)-1;i>=ll(a);i--)
#define ALL(x) x.begin(),x.end()
using namespace std;
//using namespace atcoder;
using ll=long long;
using pll=pair<ll,ll>;
using vll=vector<ll>;
using vpll=vector<pll>;
using Graph=vector<vll>;
template<typename T>using p_queue=priority_queue<T>;
template<typename T>using rp_queue=priority_queue<T,vector<T>,greater<T>>;
constexpr int INF32=2147483647;
constexpr ll INF64=9223372036854775807LL;
struct Init{Init(){ios::sync_with_stdio(0);std::cin.tie(0);cout<<fixed<<setprecision(15);}}init;
ll inline ceils(ll a,ll b){return (a+b-1)/b;}
void inline yes(bool end=1){cout<<"Yes"<<"\n";if(end)exit(0);}
void inline no(bool end=1){cout<<"No"<<"\n";exit(0);if(end)exit(0);}
void inline yesno(bool b,bool end=1){if(b)yes(end);else no(end);}
template<typename T>bool inline chmin(T &a,T b){return(a>b?a=b,1:0);}
template<typename T>bool inline chmax(T &a,T b){return(a<b?a=b,1:0);}
template<typename T>void inline prt(T &t,string end="\n"){cout<<t<<end;}
template<typename T> void inline coutALL(T begin,T end){for(;begin!=end;){cout<<*begin<<(++begin==end?"\n":" ");}}
template<class T>void inline coutALL(T &t){coutALL(t.begin(),t.end());}
template<typename T>T inline powint(T x,T n){T ans=1;while(n>0){if(n&1)ans*=x;x*=x;n>>=1;}return ans;}
template<typename T>T inline gcd(T a,T b){if(a%b==0)return b;else return gcd(b,a%b);}
template<typename T>T inline lcm(T a,T b){return a/gcd(a,b)*b;}
template<typename T>T inline factorial(T t){if(t<=1)return T(1);return t*factorial(t-1);}
template<typename T>T inline nPr(T n,T r){T ans=1;for(T i=r-1;i>=0;i--)ans*=(n-i);return ans;}
template<typename T>T inline nCr(T n,T r){if(r>n/2)r=n-r;return nPr(n,r)/factorial(r);}
template<class T>ll inline siz(T &t){return ll(t.size());}
template<class T>bool inline exist(T &t){return !empty(t);}
// clang-format on
/* #endregion */
int main() {
  ll N, M, S;
  cin >> N >> M >> S;
  vll A(N);
  ll sum = 0;
  rep(i, N) {
    cin >> A[i];
    sum += A[i];
  }
  yesno((S - sum) % M == 0);
}
0