結果

問題 No.2836 Comment Out
ユーザー hiro1729
提出日時 2024-08-09 22:07:55
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 153 bytes
コンパイル時間 250 ms
コンパイル使用メモリ 82,412 KB
実行使用メモリ 102,392 KB
最終ジャッジ日時 2024-08-09 22:08:01
合計ジャッジ時間 5,530 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26 WA * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
print("Yes" if all(A[i - 1] == 1 or A[i] == 1 or  A[i + 1] == 1 for i in range(1, N - 1)) else "No")
0