結果

問題 No.3220 Forest Creation
ユーザー ゼット
提出日時 2025-08-01 21:34:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 210 bytes
コンパイル時間 188 ms
コンパイル使用メモリ 82,904 KB
実行使用メモリ 83,788 KB
最終ジャッジ日時 2025-08-02 00:00:51
合計ジャッジ時間 4,211 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 46
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
z=0
for x in range(N,1,-1):
  if A[x]==0:
    continue
  w=(x-2)*A[x]
  if z==0:
    w+=2
  z+=w
y=A[1]
if y>=z and (y-z)%2==0:
  print('Yes')
else:
  print('No')
0