結果

問題 No.3387 23578 Sequence
コンテスト
ユーザー vjudge1
提出日時 2026-02-09 02:36:33
言語 C++17
(gcc 15.2.0 + boost 1.89.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 448 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,222 ms
コンパイル使用メモリ 221,768 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2026-02-09 02:36:37
合計ジャッジ時間 3,814 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;
#define int long long




void solve() {

    int n ;cin>>n;
    map<int,int>mp;
    vector<int>arr(n);

    for(auto &a : arr) cin>>a;


    for(int i = 0; i < n ; i++){

        mp[arr[i] + arr[n-i-1]]++;
    }

    if(mp.size() == 1) cout<<"Yes";
    else cout<<"No";


}

signed main() {

    int t = 1;
    // cin >> t;
    while (t--) {
        solve();
        cout<<endl;
    }
    return 0;
}
0