結果
問題 | No.2518 Adjacent Larger |
ユーザー |
![]() |
提出日時 | 2023-10-27 21:53:37 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 390 bytes |
コンパイル時間 | 315 ms |
コンパイル使用メモリ | 82,228 KB |
実行使用メモリ | 110,204 KB |
最終ジャッジ日時 | 2024-09-25 14:00:39 |
合計ジャッジ時間 | 4,020 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 14 WA * 14 |
ソースコード
T = int(input()) for _ in range(T): N = int(input()) A = list(map(str,input().split())) B = "".join(A) if "22" in B or "00" in B: print("No") continue if B.find("0") == -1: print("No") continue cnt = 0 for ii,vv in enumerate(A): cnt += int(vv) if cnt != N: print("No") continue print("Yes")