結果

問題 No.2343 (l+r)/2
ユーザー kotatsugame
提出日時 2023-06-09 22:31:23
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 302 bytes
コンパイル時間 586 ms
コンパイル使用メモリ 60,348 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2025-01-02 03:50:15
合計ジャッジ時間 1,351 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 6 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#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];
		for(int i=1;i<N;i++)if(A[i-1]==A[i])out=false;
		cout<<(out?"No\n":"Yes\n");
	}
}
0