题目大意:判断是否有相邻以及空余座位
题目分析:前后的座位补成正常的座位就好了
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s; int n;
cin>>n>>s;
s='0'+s+'0';
if(s.find("000")==-1 && s.find("11")==-1)
puts("Yes");
else puts("No");
}
//By sri_akshya_18, contest: Codeforces Round #484 (Div. 2), problem: (A) Row, Accepted, #, Copy