結果
| 問題 | No.2298 yukicounter |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-19 09:22:47 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 15 ms / 2,000 ms |
| コード長 | 423 bytes |
| 記録 | |
| コンパイル時間 | 2,929 ms |
| コンパイル使用メモリ | 273,712 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-07-04 03:18:14 |
| 合計ジャッジ時間 | 4,339 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}