結果

問題 No.3387 23578 Sequence
コンテスト
ユーザー vjudge1
提出日時 2026-02-09 01:07:03
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 65 ms / 2,000 ms
+ 210µs
コード長 286 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 230 ms
コンパイル使用メモリ 96,228 KB
実行使用メモリ 78,976 KB
最終ジャッジ日時 2026-07-21 05:03:45
合計ジャッジ時間 4,300 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

def solve():
    n = int(input())

    arr = list(map(int, input().split()))

    j = n - 1
    i = 0
    while i <= j:
        if (arr[i] + arr[j]) != (arr[0] + arr[n - 1]):
            print("No")
            return
        i += 1
        j -= 1

    print("Yes")


solve()

# adkadla
0