結果
| 問題 | No.290 1010 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2016-11-24 01:52:19 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 22 ms / 5,000 ms | 
| コード長 | 517 bytes | 
| コンパイル時間 | 759 ms | 
| コンパイル使用メモリ | 80,972 KB | 
| 実行使用メモリ | 5,296 KB | 
| 最終ジャッジ日時 | 2024-11-27 10:29:48 | 
| 合計ジャッジ時間 | 1,843 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 24 | 
ソースコード
#define _USE_MATH_DEFINES
#include<stdio.h>
#include<string>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include<stack>
#include<queue>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include<iomanip>
//#include<bits/stdc++.h>
using namespace std;
int main() {
	
	int x=0,y=0;
	int n;
	string p;
	cin>>n>>p;
	for(int i=1;i<n;i++){
		
		if(p[i]==p[i-1]){
			cout<<"YES"<<endl;
			return 0;
		}
	}
	if(n>3)cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
	return 0;
}
	
            
            
            
        