結果
| 問題 | No.2298 yukicounter |
| コンテスト | |
| ユーザー |
detteiuu
|
| 提出日時 | 2026-08-02 22:28:28 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 106 ms / 2,000 ms |
| + 706µs | |
| コード長 | 583 bytes |
| 記録 | |
| コンパイル時間 | 232 ms |
| コンパイル使用メモリ | 95,988 KB |
| 実行使用メモリ | 133,760 KB |
| 最終ジャッジ日時 | 2026-08-02 22:28:33 |
| 合計ジャッジ時間 | 4,461 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
S = input()
N = len(S)
def RLE(A):
ans = []
cnt = 0
for i in range(len(A)):
cnt += 1
if i+1 == len(A) or A[i] != A[i+1]:
ans.append((A[i], cnt))
cnt = 0
return ans
def RLER(A):
ans = []
for s, c in A:
ans.append(s*c)
return "".join(ans)
ans = []
idx = 0
while idx < N:
if idx+9 <= N and S[idx:idx+9] == "yukicoder":
ans.append("#")
idx += 9
else:
ans.append(".")
idx += 1
R = RLE(ans)
MAX = 0
for n, c in R:
if n == "#":
MAX = max(MAX, c)
print(MAX)
detteiuu