結果
| 問題 | No.2298 yukicounter |
| コンテスト | |
| ユーザー |
detteiuu
|
| 提出日時 | 2026-08-02 22:28:28 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 76 ms / 2,000 ms |
| + 681µs | |
| コード長 | 583 bytes |
| 記録 | |
| コンパイル時間 | 88 ms |
| コンパイル使用メモリ | 64,832 KB |
| 実行使用メモリ | 87,772 KB |
| 最終ジャッジ日時 | 2026-10-15 04:10:15 |
| 合計ジャッジ時間 | 3,791 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
ソースコード
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