結果
| 問題 | No.3387 23578 Sequence |
| コンテスト | |
| ユーザー |
hen
|
| 提出日時 | 2025-11-29 14:19:05 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 1,840 bytes |
| 記録 | |
| コンパイル時間 | 5,777 ms |
| コンパイル使用メモリ | 335,128 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-11-29 14:19:12 |
| 合計ジャッジ時間 | 7,557 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
#ifndef ONLINE_JUDGE
#define _GLIBCXX_DEBUG
#endif
#define int long long
using ull = unsigned long long;
using ll = long long;
using vi = vector<int>;
using vs = vector<string>;
using vc = vector<char>;
using vb = vector<bool>;
using vd = vector<double>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vvvvi = vector<vvvi>;
#define rep(i,n) for(ll i = 0; i< (int)n; i++)
#define drep(i,n) for(ll i=n; i>=0; i--)
#define REP(a,b,c) for(ll a = b; a<c; a++)
#define DREP(a,b,c) for(ll a = b; a>=c; a--)
const ll INF = 5e18;
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define pb push_back
#define eb emplace_back
#define em emplace
#define pob pop_back
#define Yes cout << "Yes" << endl
#define No cout << "No" << endl
#define YES cout << "YES" << endl
#define NO cout << "NO" << endl
#define fail cout << -1 << endl
#define YN {cout<<"Yes"<<endl;}else{cout<<"No"<<endl;} // if(bool) YN; みたいに
template<class T> inline bool chmin(T& a, T b) {if(a>b) {a=b; return true;} else return false;}
template<class T> inline bool chmax(T& a, T b) {if(a<b) {a=b; return true;} else return false;}
template<class T> T max(vector<T> &a) {T ans = a[0]; for(auto x : a) chmax(ans,x); return ans;}
template<class T> T min(vector<T> &a) {T ans = a[0]; for(auto x : a) chmin(ans,x); return ans;}
vi DY = {1,0,-1,0,1,-1,-1,1};
vi DX = {0,1,0,-1,1,1,-1,-1};
// cout << fixed << setprecision(20);
using mint = modint998244353;
int32_t main() {
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
}
int n; cin>>n;
vi a(n); rep(i,n) cin>>a[i];
int c = a[0]+a[n-1];
rep(i,n) {
int t = a[i] + a[n-i-1];
if(c != t) {
No;
return 0;
}
}
Yes;
}
hen