結果

問題 No.290 1010
ユーザー kotatsugame
提出日時 2017-08-10 05:06:02
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 182 bytes
コンパイル時間 650 ms
コンパイル使用メモリ 65,984 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-12 01:43:45
合計ジャッジ時間 1,629 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 WA * 4
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
using namespace std;
main()
{
	int n;string s;cin>>n>>s;
	bool flag=false;
	for(int i=0;i<n-1;i++)flag|=s[i]==s[i+1];
	cout<<(flag||s.size()>1?"YES":"NO")<<endl;
}
0