結果
問題 |
No.2298 yukicounter
|
ユーザー |
![]() |
提出日時 | 2023-05-18 15:07:53 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 30 ms / 2,000 ms |
コード長 | 297 bytes |
コンパイル時間 | 1,576 ms |
コンパイル使用メモリ | 167,680 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-16 05:50:46 |
合計ジャッジ時間 | 3,539 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int N = s.size(), ans = 0, a = 0; string t = "yukicoder"; for( int i = 0; i < N; i++ ) { if( s.substr( i, 9 ) == t ) { a++; i += 9 - 1; } else a = 0; ans = max( ans, a ); } cout << ans << endl; }