結果
| 問題 | No.3387 23578 Sequence |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2026-02-09 01:46:13 |
| 言語 | C++17(gnu拡張) (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 671 bytes |
| 記録 | |
| コンパイル時間 | 865 ms |
| コンパイル使用メモリ | 89,912 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-02-09 01:46:16 |
| 合計ジャッジ時間 | 2,566 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 28 |
ソースコード
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
int e;
bool kirk = false;
cin >> e;
int arr[e];
for (int i = 0; i < e; i++)
{
cin >> arr[i];
}
if(e == 1){
cout << "No" << endl;
return 0;
}
int b = arr[0] + arr[e-1];
int t =e;
if(e%2==0)
e=e/2;
else
e=e/2+1;
for(int i = 0; i < e; i++){
if(arr[i] + arr[t-i-1]== b)
kirk = true;
else{
kirk = false;
break;
}
}
if(kirk)
cout << "Yes"<<endl;
else
cout << "No"<<endl;
return 0;
}
vjudge1