結果

問題 No.2298 yukicounter
ユーザー YugimnYugimn
提出日時 2023-09-08 11:21:56
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 889 bytes
コンパイル時間 4,183 ms
コンパイル使用メモリ 267,592 KB
実行使用メモリ 8,768 KB
最終ジャッジ日時 2023-09-08 11:22:08
合計ジャッジ時間 11,336 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
8,644 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 TLE -
testcase_04 AC 260 ms
4,376 KB
testcase_05 AC 7 ms
4,384 KB
testcase_06 TLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

//Normal-2

#define _GLIBCXX_DEBUG
#define ll long long
#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;

void p(auto a){
  cout << a;
}

void ps(auto a){
  cout << a << " ";
}

void ps(){
  cout << " ";
}

void pl(auto a){
  cout << a << endl;
}

void pl(){
  cout << endl;
}

void fix15(){
  cout << fixed << setprecision(15);
}

void YES(){
  pl("YES");
}

void NO(){
  pl("NO");
}

void Yes(){
  pl("Yes");
}

void No(){
  pl("No");
}

void yes(){
  pl("yes");
}

void no(){
  pl("no");
}

//Normal-2
int main(){
  string S; cin >> S;

  int f = (int)S.find("yukicoder");
  while(f != -1){
    S.replace(f, 9, "#");

    f = (int)S.find("yukicoder");
  }

  int ans = 0, chain = 0;
  for(int i = 0; i < (int)S.size(); i++){
    if(S[i] != '#'){
      ans = max(ans, chain);

      chain = 0;
    }else{
      chain++;
    }
  }

  pl(max(ans, chain));
}
0