結果
| 問題 | No.2518 Adjacent Larger |
| コンテスト | |
| ユーザー |
timi
|
| 提出日時 | 2023-10-28 18:42:11 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 269 bytes |
| 記録 | |
| コンパイル時間 | 251 ms |
| コンパイル使用メモリ | 95,816 KB |
| 実行使用メモリ | 111,712 KB |
| 最終ジャッジ日時 | 2026-09-04 05:42:09 |
| 合計ジャッジ時間 | 5,210 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 14 WA * 14 |
ソースコード
T=int(input())
for _ in range(T):
N=int(input())
A=list(map(int, input().split()))
f=1
if A.count(0)==0 or A.count(2)==0 or sum(A)!=N:
f=0
for i in range(N):
if A[i-1]==A[i] and A[i]!=1:
f=0
if f==1:
print('Yes')
else:
print('No')
timi