結果
| 問題 |
No.2343 (l+r)/2
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-09 22:33:28 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 383 bytes |
| コンパイル時間 | 890 ms |
| コンパイル使用メモリ | 60,816 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2025-01-02 03:53:06 |
| 合計ジャッジ時間 | 1,452 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 6 WA * 8 |
ソースコード
#include<iostream>
using namespace std;
int N,A[2<<17];
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int T;
cin>>T;
for(;T--;)
{
cin>>N;
for(int i=0;i<N;i++)cin>>A[i];
bool out=A[0]==A[N-1];
bool ex[2]={false,false};
for(int i=0;i<N;i++)ex[A[i]]=true;
for(int i=1;i<N;i++)if(A[i-1]==A[i])out=false;
cout<<(out||!ex[0]||!ex[1]?"No\n":"Yes\n");
}
}