結果

問題 No.3387 23578 Sequence
コンテスト
ユーザー daiota
提出日時 2025-11-28 21:27:18
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 445 bytes
コンパイル時間 1,858 ms
コンパイル使用メモリ 195,356 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-11-28 21:27:21
合計ジャッジ時間 3,059 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<ll,ll> P;
#define REP(i,n) for(ll i=0;i<ll(n);i++)










int main(void){
	cin.tie(nullptr);  ios_base::sync_with_stdio(false);
	ll i,j;





	ll N;
	cin >> N;

	vector<ll> A(N+1);
	for(i=1;i<=N;i++) cin >> A[i];

	for(i=1;i<=N;i++){
		if(A[i]+A[N-i+1]!=A[1]+A[N]){
			cout << "No" << endl;
			return 0;
		}
	}



	cout << "Yes" << endl;







	return 0;

}
0