結果

問題 No.3387 23578 Sequence
コンテスト
ユーザー dvasgdjhas
提出日時 2025-11-28 21:30:46
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 423 bytes
コンパイル時間 3,522 ms
コンパイル使用メモリ 283,268 KB
実行使用メモリ 7,852 KB
最終ジャッジ日時 2025-11-28 21:30:56
合計ジャッジ時間 4,476 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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

signed main(){
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int n;cin>>n;
    vector<int> a(n);
    for(int i=0;i<n;i++)cin>>a[i];
    int c=0;
    map<int,int> m;
    for(int i=0;i<n/2;i++){
        m[a[i]+a[n-1-i]]++;
    }
    if(m[a[0]+a[n-1]] == n/2)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
    return 0;
}
0