結果

問題 No.2518 Adjacent Larger
ユーザー hiro1729hiro1729
提出日時 2023-10-27 21:43:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 215 bytes
コンパイル時間 187 ms
コンパイル使用メモリ 81,872 KB
実行使用メモリ 115,032 KB
最終ジャッジ日時 2023-10-27 21:43:40
合計ジャッジ時間 3,898 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,508 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 53 ms
72,596 KB
testcase_12 AC 52 ms
72,824 KB
testcase_13 AC 51 ms
72,592 KB
testcase_14 AC 52 ms
72,596 KB
testcase_15 AC 52 ms
72,592 KB
testcase_16 AC 81 ms
109,744 KB
testcase_17 AC 65 ms
89,672 KB
testcase_18 AC 63 ms
89,716 KB
testcase_19 AC 60 ms
84,512 KB
testcase_20 AC 69 ms
95,652 KB
testcase_21 AC 81 ms
107,456 KB
testcase_22 AC 77 ms
107,452 KB
testcase_23 AC 83 ms
109,964 KB
testcase_24 AC 66 ms
96,092 KB
testcase_25 AC 68 ms
96,212 KB
testcase_26 AC 70 ms
96,212 KB
testcase_27 AC 81 ms
114,192 KB
testcase_28 AC 83 ms
115,032 KB
権限があれば一括ダウンロードができます

ソースコード

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 b and all(b[i] != b[i + 1] for i in range(len(b) - 1)) else "No")
0