結果
| 問題 | No.3387 23578 Sequence |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-12-27 15:16:21 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 955 bytes |
| 記録 | |
| コンパイル時間 | 5,645 ms |
| コンパイル使用メモリ | 335,068 KB |
| 実行使用メモリ | 7,852 KB |
| 最終ジャッジ日時 | 2025-12-27 15:16:28 |
| 合計ジャッジ時間 | 6,971 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
#include <set>
#include <queue>
#include <stack>
#include <utility>
#include <map>
#include <regex>
#include <math.h>
#include <random>
#include <algorithm>
#define pb push_back
#define eb emplace_back
#define all(x) begin(x), end(x)
#define gall(x) begin(x), end(x), greater<>()
#define ll long long
#define rep(i,x) for(int i=0;i<x;i++)
#define P pair<int, int>
#define lP pair<ll, ll>
using namespace std;
using namespace atcoder;
void chmin(ll &a, ll b) { a = min(a, b); }
void chmax(ll &a, ll b) { a = max(a, b); }
const int dx[] = {1, 0, -1, 0};
const int dy[] = {0, 1, 0, -1};
int main()
{
//freopen("input.txt", "r", stdin);
ll n;
cin >> n;
vector<ll> a(n);
rep(i,n) {
cin>>a[i];
}
bool f = true;
rep(i,n) {
if (a[i] + a[n-i - 1] != a[0] + a[n-1]) f = false;
}
if (f) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}