結果
| 問題 | No.3387 23578 Sequence |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2026-02-09 01:51:37 |
| 言語 | C++17(gcc13) (gcc 13.4.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 681 bytes |
| 記録 | |
| コンパイル時間 | 2,099 ms |
| コンパイル使用メモリ | 195,944 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-02-09 01:51:41 |
| 合計ジャッジ時間 | 3,921 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 28 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
/*
#define fastio ios::sync_with_stdio(false); cin.tie(nullptr);
using ll= long long;
*/
void solve(){
int n;
cin>>n;
int arr[n];
for(int i=0; i<n ; i++)
{
cin>>arr[i];
}
int sum=0;
bool flag = true;
for(int i=0;i<n/2;i++){
if(i==0){
sum = arr[i]+arr[n-i-1];
}else{
int temp = arr[i]+arr[n-i-1];
if(sum!=temp)
flag = false;
}
}
if(flag)
cout<<"Yes";
else
cout<<"No";
return;
}
int main(){
/*fastio
#ifdef TESTING
freopen("input.txt", "r", stdin);
#else
#define endl "\n"
#endif
*/
int t;
cin>>t;
while(t--){
solve();
cout<<endl;
}
return 0;
}
vjudge1