結果
問題 |
No.2298 yukicounter
|
ユーザー |
|
提出日時 | 2024-03-19 09:22:47 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 69 ms / 2,000 ms |
コード長 | 423 bytes |
コンパイル時間 | 4,140 ms |
コンパイル使用メモリ | 251,380 KB |
最終ジャッジ日時 | 2025-02-20 07:23:53 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; string S; int pos = 0, cnt = 0, ans = 0; int main() { cin >> S; while (pos < S.size()) { if (S.substr(pos, 9) == "yukicoder") { cnt++; pos += 9; } else { ans = max(ans, cnt); cnt = 0; pos += 1; } } ans = max(ans, cnt); cout << ans << endl; return 0; }