結果

問題 No.290 1010
ユーザー 0w1
提出日時 2016-11-20 22:49:14
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 21 ms / 5,000 ms
コード長 310 bytes
コンパイル時間 1,500 ms
コンパイル使用メモリ 165,836 KB
実行使用メモリ 5,424 KB
最終ジャッジ日時 2024-11-27 09:12:45
合計ジャッジ時間 2,587 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

signed main(){
  int N; cin >> N;
  string S; cin >> S;
  if( S.size() >= 4 )
    cout << "YES" << endl, exit( 0 );
  for( int i = 1; i < S.size(); ++i )
    if( S[ i ] == S[ i - 1 ] ) 
      cout << "YES" << endl, exit( 0 );
  cout << "NO" << endl;
  return 0;
}
0