結果
| 問題 |
No.2298 yukicounter
|
| コンテスト | |
| ユーザー |
chro_96
|
| 提出日時 | 2023-05-12 21:50:36 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 7 ms / 2,000 ms |
| コード長 | 467 bytes |
| コンパイル時間 | 195 ms |
| コンパイル使用メモリ | 28,672 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-28 17:55:45 |
| 合計ジャッジ時間 | 1,375 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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