結果
| 問題 | No.290 1010 |
| コンテスト | |
| ユーザー |
latte0119
|
| 提出日時 | 2015-10-16 23:59:26 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 6 ms / 5,000 ms |
| コード長 | 461 bytes |
| 記録 | |
| コンパイル時間 | 1,234 ms |
| コンパイル使用メモリ | 176,680 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-04-03 07:55:17 |
| 合計ジャッジ時間 | 1,931 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
typedef pair<int,int>P;
typedef vector<int>VI;
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
int N;
char str[1010101];
int main(){
scanf("%d%s",&N,str);
for(int i=0;i<N-1;i++){
if(str[i]==str[i+1]){
cout<<"YES"<<endl;
return 0;
}
}
if(N>=4)cout<<"YES"<<endl;
else cout<<"NO"<<endl;
return 0;
}
latte0119