結果
| 問題 |
No.290 1010
|
| コンテスト | |
| ユーザー |
dshj
|
| 提出日時 | 2019-09-01 18:13:56 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 543 bytes |
| コンパイル時間 | 1,139 ms |
| コンパイル使用メモリ | 158,620 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-28 22:04:52 |
| 合計ジャッジ時間 | 2,271 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 WA * 3 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main() {
int n;
string str;
cin>>n>>str;
if(n == 1){
cout<<"NO";
return 0;
}
bool flg = false;
//substringをもとめなくても、隣が同じ時点でOKなので、それを確かめる
int strSize = str.size();
for(int i=0 ; i< strSize-1; i++) {
if(str[i] == str[i+1] ){
flg = true;
}
}
if(flg){
cout<<"YES";
}else{
cout<<"NO";
}
return 0;
}
dshj