結果

問題 No.3220 Forest Creation
コンテスト
ユーザー flippergo
提出日時 2026-09-23 09:18:57
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WJ  
(最新)
AC  
(最初)
実行時間 -
コード長 253 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
最終ジャッジ日時 2026-09-23 09:19:02
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)

ソースコード

diff #
raw source code

N = int(input())
A = list(map(int,input().split()))
S = 0
a = 0
for i in range(2,N+1):
    S += i*A[i]
    a += A[i]
if A[1]==0 and S==0:
    print("Yes")
elif A[1]<S-2*(a-1):
    print("No")
elif abs(S-A[1])%2==0:
    print("Yes")
else:
    print("No")
0