結果
問題 |
No.2836 Comment Out
|
ユーザー |
|
提出日時 | 2024-08-09 22:17:38 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 361 bytes |
コンパイル時間 | 2,686 ms |
コンパイル使用メモリ | 243,116 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-08-09 22:17:43 |
合計ジャッジ時間 | 5,113 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 29 WA * 23 |
ソースコード
// #define _GLIBCXX_DEBUG #include<bits/stdc++.h> using namespace std; int N,A[201010]; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); cout<<fixed<<setprecision(15); cin>>N; for(int i=1;i<=N;i++)cin>>A[i]; for(int i=0;i<=N;i++){ if(abs(A[i]-A[i+1])>1){ cout<<"No"<<endl; exit(0); } } cout<<"Yes"<<endl; }