結果
| 問題 |
No.2518 Adjacent Larger
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-10-27 22:16:54 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 281 bytes |
| コンパイル時間 | 361 ms |
| コンパイル使用メモリ | 82,388 KB |
| 実行使用メモリ | 105,344 KB |
| 最終ジャッジ日時 | 2024-09-25 14:19:27 |
| 合計ジャッジ時間 | 3,333 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 1 |
| other | RE * 28 |
ソースコード
t=int(input())
for _ in range(t):
n=int(input())
A=list(map(int,input().split()))
if set(A)=={1}:
print("No")
continue
p=1
for i in A:
if i==2:
if p==2:
print("No")
continue
p=2
if i==0:
if p==0:
print("No")
continue
p=0
print("Yes")