結果

問題 No.2298 yukicounter
ユーザー katonyonkokatonyonko
提出日時 2023-05-12 21:34:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 100 ms / 2,000 ms
コード長 1,252 bytes
コンパイル時間 321 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 111,872 KB
最終ジャッジ日時 2024-05-06 11:15:05
合計ジャッジ時間 2,884 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
51,968 KB
testcase_01 AC 37 ms
52,352 KB
testcase_02 AC 36 ms
51,968 KB
testcase_03 AC 83 ms
96,256 KB
testcase_04 AC 58 ms
73,984 KB
testcase_05 AC 46 ms
62,208 KB
testcase_06 AC 100 ms
111,872 KB
testcase_07 AC 59 ms
72,320 KB
testcase_08 AC 52 ms
65,408 KB
testcase_09 AC 51 ms
67,072 KB
testcase_10 AC 46 ms
60,800 KB
testcase_11 AC 56 ms
69,632 KB
testcase_12 AC 55 ms
68,864 KB
testcase_13 AC 51 ms
64,640 KB
testcase_14 AC 52 ms
65,024 KB
testcase_15 AC 38 ms
52,352 KB
testcase_16 AC 46 ms
62,208 KB
testcase_17 AC 47 ms
61,440 KB
testcase_18 AC 38 ms
52,224 KB
testcase_19 AC 38 ms
51,968 KB
testcase_20 AC 37 ms
51,840 KB
testcase_21 AC 37 ms
52,224 KB
testcase_22 AC 46 ms
61,312 KB
testcase_23 AC 46 ms
61,824 KB
testcase_24 AC 59 ms
72,448 KB
testcase_25 AC 50 ms
65,408 KB
testcase_26 AC 47 ms
61,568 KB
testcase_27 AC 54 ms
68,864 KB
testcase_28 AC 47 ms
61,184 KB
testcase_29 AC 46 ms
60,928 KB
testcase_30 AC 39 ms
52,352 KB
testcase_31 AC 45 ms
60,160 KB
testcase_32 AC 48 ms
61,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import io
import sys

_INPUT = """\
6
yukicoderaayukicoderyukicoder
codeforces
yukicoderyukicoderyukicoderyukicoderyukiyukicoderyukicoderyukicoder
yukiyukicodercoder
"""

def solve(test):
  S=input()
  x=[]
  now=0
  while now<len(S):
    if S[now:min(now+9,len(S))]=='yukicoder':
      x.append('')
      now=now+9
    else:
      x.append('a')
      now+=1
  x.append('a')
  ans=0
  now=0
  for i in range(len(x)):
    if x[i]!='': ans=max(ans,i-now); now=i+1
  if test==0:
    print(ans)
  else:
    return None

def random_input():
  from random import randint,shuffle
  N=randint(1,10)
  M=randint(1,N)
  A=list(range(1,M+1))+[randint(1,M) for _ in range(N-M)]
  shuffle(A)
  return (" ".join(map(str, [N,M]))+"\n"+" ".join(map(str, A))+"\n")*3

def simple_solve():
  return []

def main(test):
  if test==0:
    solve(0)
  elif test==1:
    sys.stdin = io.StringIO(_INPUT)
    case_no=int(input())
    for _ in range(case_no):
      solve(0)
  else:
    for i in range(1000):
      sys.stdin = io.StringIO(random_input())
      x=solve(1)
      y=simple_solve()
      if x!=y:
        print(i,x,y)
        print(*[line for line in sys.stdin],sep='')
        break

#0:提出用、1:与えられたテスト用、2:ストレステスト用
main(0)
0