結果
| 問題 |
No.290 1010
|
| コンテスト | |
| ユーザー |
femto
|
| 提出日時 | 2016-01-24 22:23:59 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 471 bytes |
| コンパイル時間 | 477 ms |
| コンパイル使用メモリ | 62,524 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-21 16:10:19 |
| 合計ジャッジ時間 | 2,208 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 RE * 4 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string s;
cin >> s >> s;
for(int i = 0; i < s.size() - 1; i++) {
if(s[i] == s[i + 1]) {
cout << "YES" << endl;
return 0;
}
}
for(int i = 0; i < i + 4 < s.size(); i++) {
if(s.substr(i, 4) == "1010" || s.substr(i, 4) == "0101") {
cout << "YES" << endl;
return 0;
}
}
cout << "NO" << endl;
}
femto