結果
| 問題 | No.2298 yukicounter |
| コンテスト | |
| ユーザー |
chro_96
|
| 提出日時 | 2023-05-12 21:50:36 |
| 言語 | C(gnu17) (gcc 15.2.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| + 123µs | |
| コード長 | 467 bytes |
| 記録 | |
| コンパイル時間 | 53 ms |
| コンパイル使用メモリ | 36,736 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-23 07:45:38 |
| 合計ジャッジ時間 | 1,892 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
#include <stdio.h>
int main () {
char s[1000001] = "";
int res = 0;
int ans = 0;
int tmp = 0;
int st = 0;
int idx = 0;
char t[10] = "yukicoder";
res = scanf("%s", s);
while (s[idx] != '\0') {
if (s[idx] == t[st]) {
st++;
} else {
tmp = 0;
st = 0;
}
if (st >= 9) {
tmp++;
if (tmp > ans) {
ans = tmp;
}
st = 0;
}
idx++;
}
printf("%d\n", ans);
return 0;
}
chro_96