結果

問題 No.2298 yukicounter
ユーザー karinohito
提出日時 2023-09-22 17:12:51
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 316 bytes
コンパイル時間 1,970 ms
コンパイル使用メモリ 193,960 KB
最終ジャッジ日時 2025-02-17 00:06:11
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
    string S;
    cin>>S;
    int an=0,k=0;
    int N=S.size();
    for(int i=0;i<N-8;i++){
        if(S.substr(i,9)=="yukicoder"){
            i+=8;
            k++;
            an=max(an,k);
        }
        else k=0;
    }
    cout<<max(an,k)<<endl;
}
0