結果
| 問題 |
No.2015 Stair Counter
|
| コンテスト | |
| ユーザー |
sorag
|
| 提出日時 | 2022-07-22 23:19:27 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 483 bytes |
| コンパイル時間 | 539 ms |
| コンパイル使用メモリ | 69,324 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-04 08:07:58 |
| 合計ジャッジ時間 | 2,882 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | AC * 3 WA * 22 |
ソースコード
#include <iostream>
#include <vector>
using namespace std;
int main() {
int t,n,m;
cin>>t;
for (int i=0;i<t;i++){
cin>>n>>m;
vector<int> a(n);
for(int j=0;j<n;j++) {
cin>>a.at(j);
}
for(int k=0;k<n;k++){
a.at(k)+=1;
if(k>2 and a.at(k)==0 and a.at(k+1)==0){
cout<<"No"<<endl;
break;
}
}
cout<<"Yes"<<endl;
}
return 0;
}
sorag