結果

問題 No.3220 Forest Creation
ユーザー yu23578
提出日時 2025-08-01 21:59:11
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 331 bytes
コンパイル時間 1,835 ms
コンパイル使用メモリ 194,740 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-08-01 21:59:16
合計ジャッジ時間 4,310 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 31 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define int long long

int N;

signed main(){
  cin>>N;
  vector<int> A(N+1);
  for(int i = 0; i <= N; i++) cin>>A[i];
  int cnt = 0;
  for(int i = 2; i <= N; i++) cnt += A[i]*(i-1);
  if(A[1] - cnt >= 0 && ((A[1] - cnt) % 2 == 0)) cout << "Yes" << endl;
  else cout << "No" << endl;
}
0