結果

問題 No.290 1010
ユーザー kotatsugame
提出日時 2017-08-10 05:06:30
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 24 ms / 5,000 ms
コード長 182 bytes
コンパイル時間 510 ms
コンパイル使用メモリ 65,240 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-12 01:43:47
合計ジャッジ時間 1,446 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます
コンパイルメッセージ
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()>3?"YES":"NO")<<endl;
}
0