結果
| 問題 | No.2298 yukicounter |
| コンテスト | |
| ユーザー |
nyya
|
| 提出日時 | 2023-05-13 16:05:13 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 555 bytes |
| 記録 | |
| コンパイル時間 | 1,182 ms |
| コンパイル使用メモリ | 180,500 KB |
| 実行使用メモリ | 9,796 KB |
| 最終ジャッジ日時 | 2026-10-14 00:21:50 |
| 合計ジャッジ時間 | 3,437 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
bool chmax(int& a,int b){if(a<b){a=b; return 1;} return 0;}
int main(){
string s;
cin >> s;
int sz = s.size();
string yuki = "yukicoder";
int cnt = 0;
int now = 0;
int ans = 0;
for(int i=0;i<sz;i++) {
if(s[i] == yuki[now]) now++;
else {
cnt = 0;
now = 0;
}
if(now==(int)yuki.size()) {
now=0;
cnt++;
}
chmax(ans,cnt);
}
cout << ans << endl;
return 0;
}
nyya