結果
問題 | No.290 1010 |
ユーザー |
![]() |
提出日時 | 2015-10-16 22:48:42 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 22 ms / 5,000 ms |
コード長 | 921 bytes |
コンパイル時間 | 839 ms |
コンパイル使用メモリ | 91,576 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-21 20:01:23 |
合計ジャッジ時間 | 1,875 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
#include <algorithm> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <memory> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; #define sz size() #define pb push_back #define mp make_pair #define fi first #define se second #define all(c) (c).begin(), (c).end() #define rep(i,a,b) for(int i=(a);i<(b);++i) #define clr(a, b) memset((a), (b) ,sizeof(a)) #define MOD 1000000007 int main() { int n; cin>>n; string s; cin>>s; vector<string> v; v.pb("0"); v.pb("1"); v.pb("01"); v.pb("10"); v.pb("101"); v.pb("010"); if(count(all(v),s)==1){ cout << "NO" << endl; } else{ cout << "YES" << endl; } return 0; }