結果

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

ソースコード

diff #

n = int(input())
a = list(map(int,input().split()))
if min(a) <= 1 and all(abs(a[i]-a[i+1]) <= 1 for i in range(n-1)):
    print('Yes')
else:
    print('No')
0