結果

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

ソースコード

diff #
raw source code

#include <iostream>
using namespace std;

int main(){
	int n;
	cin>>n;
	int arr[n];
	for(int i=0;i<n;i++){
		cin>>arr[i];
	}
	int sum=arr[0]+arr[n-1];
	bool f=true;
	if(n>1){
	for(int i=1;i<n/2;i++){
		if((arr[i]+arr[n-i-1])!=sum){
			f=false;
			break;	
		}
	}}
	if(f)cout<<"Yes";
	else cout<<"No";
	return 0;
}
0