結果

問題 No.3387 23578 Sequence
コンテスト
ユーザー VvyLw
提出日時 2025-12-02 10:07:00
言語 D
(dmd 2.109.1)
結果
WA  
実行時間 -
コード長 312 bytes
コンパイル時間 3,090 ms
コンパイル使用メモリ 166,504 KB
実行使用メモリ 7,852 KB
最終ジャッジ日時 2025-12-02 10:07:05
合計ジャッジ時間 4,998 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import std;
void main() {
    const n = readln.chomp.to!int;
    const a = readln.split.to!(int[]);
    const x = a[0] + a[$-1];
    writeln(yes(iota(1, n / 2).map!(i => a[i] + a[n - 1 - i]).all!(e => e == x)));
}

pragma(inline)
string yes(const bool b) pure @nogc nothrow @safe {
    return b ? "Yes" : "No";
}
0