結果

問題 No.3387 23578 Sequence
コンテスト
ユーザー vjudge1
提出日時 2026-02-09 01:42:56
言語 PyPy3
(7.3.17)
結果
WA  
実行時間 -
コード長 415 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 288 ms
コンパイル使用メモリ 82,324 KB
実行使用メモリ 54,020 KB
最終ジャッジ日時 2026-02-09 01:43:00
合計ジャッジ時間 3,218 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 28
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

# t = int(input())
# n = int(input())
# a = list(map(int,input().split()))
# a,b,c = map(int,input().split())
#By Tahir Huzaifa
n = int(input())
a = list(map(int,input().split()))

st = 0
end = n-1
s = a[st] + a[end]
# print(s)
st+=1
end-=1
f = True
while st<=end:
    if s!= (a[st]+a[end]):
        # print(s)
        f=False
        break
    st+=1
    end-=1
if f:
    print("YES")
else:
    print("NO")


    

0