結果
問題 |
No.290 1010
|
ユーザー |
![]() |
提出日時 | 2016-05-21 19:04:42 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 53 ms / 5,000 ms |
コード長 | 293 bytes |
コンパイル時間 | 488 ms |
コンパイル使用メモリ | 65,544 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-11 01:12:45 |
合計ジャッジ時間 | 1,478 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
#include <iostream> #include <string> using namespace std; int main() { int n; string s; cin>>n>>s; string res="NO"; for(int i=0; i<n-1; ++i) if (s[i]==s[i+1]) res="YES"; for(int i=0; i<n-3; ++i) if (s[i]==s[i+2] and s[i+1]==s[i+3]) res="YES"; cout<<res<<endl; }