結果
| 問題 | No.3387 23578 Sequence |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2026-02-09 01:15:47 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 534 bytes |
| 記録 | |
| コンパイル時間 | 3,667 ms |
| コンパイル使用メモリ | 334,272 KB |
| 実行使用メモリ | 7,976 KB |
| 最終ジャッジ日時 | 2026-02-09 01:15:52 |
| 合計ジャッジ時間 | 5,064 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 28 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++)
{
cin >> a[i];
}
bool t=false;
for (int i = 0; i < n; i++)
{
if ( (a[i]+ a[n-i-1]) == (a[0] + a[n-1]) )
{
t=true;
}else{
t=false;
}
}
if (!t)
{
cout << "NO" << endl;
}else{
cout << "YES" << endl;
}
return 0;
}
vjudge1