結果

問題 No.1586 Equal Array
ユーザー Narumisakakios
提出日時 2021-07-08 23:03:33
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 350 bytes
コンパイル時間 1,581 ms
コンパイル使用メモリ 168,136 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-01 13:07:42
合計ジャッジ時間 3,160 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
    ll N;cin>>N;
    vector<int>A(N);
    ll ans = 0;
    rep(i,N){
        cin>>A[i];
        ans += (A[0]-A[i])%1000000000;
    }
    if(ans%2==0)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
    cout<<ans<<endl;
}
0