結果

問題 No.1940 Escape through + -
ユーザー ymmtr(せるたわーしーぷ!)
提出日時 2022-05-18 22:07:24
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 430 bytes
コンパイル時間 1,688 ms
コンパイル使用メモリ 165,740 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-17 01:44:38
合計ジャッジ時間 2,849 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

//No.1940 Escape through + -
//Writer : matcharate12 さん
//Solver : ymmtr(せるたわーθ)
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define ALL(a)  (a).begin(),(a).end()
int main(){
    ll n,m,s,asum=0,a;cin>>n>>m>>s;
    for(ll i=0;i<n;i++){
        cin>>a;
        asum+=a;
    }
    if(abs(asum-s)%m==0){
        cout<<"Yes"<<endl;
    }
    else{
        cout<<"No"<<endl;
    }
    return 0;
}
0