結果

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

ソースコード

diff #
raw source code

#include<iostream>
#include<vector>
using namespace std;
void solve(){
int n;
cin>>n;
vector<int>a(n);
for(int i=0;i<n;i++){
    cin>>a[i];
}
int y=a[0]+a[n-1];
for(int i=0;i<n;i++){
    int x=a[i]+a[n-i+1];
if(x!=y){
    cout<<"No"<<endl;
    return;
    
}

}
cout<<"Yes"<<endl;

}

int main(){
   
    solve();

}
0