結果

問題 No.2518 Adjacent Larger
ユーザー hiro1729
提出日時 2023-10-27 21:40:02
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 231 bytes
コンパイル時間 341 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 114,884 KB
最終ジャッジ日時 2024-09-25 13:44:39
合計ジャッジ時間 4,165 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 18 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	b = []
	for i in a:
		if i != 1:
			b.append(i)
	print("Yes" if 0 in b and 2 in b and all(b[i] != b[i + 1] for i in range(len(b) - 1)) else "No")
0