結果

問題 No.1313 N言っちゃダメゲーム (4)
ユーザー flippergoflippergo
提出日時 2020-12-23 20:45:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 56 ms / 2,000 ms
コード長 537 bytes
コンパイル時間 537 ms
コンパイル使用メモリ 81,668 KB
実行使用メモリ 66,160 KB
最終ジャッジ日時 2023-10-21 15:17:44
合計ジャッジ時間 3,449 ms
ジャッジサーバーID
(参考情報)
judge9 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,504 KB
testcase_01 AC 37 ms
53,504 KB
testcase_02 AC 38 ms
53,504 KB
testcase_03 AC 38 ms
53,504 KB
testcase_04 AC 37 ms
53,504 KB
testcase_05 AC 37 ms
53,504 KB
testcase_06 AC 38 ms
53,504 KB
testcase_07 AC 36 ms
53,504 KB
testcase_08 AC 37 ms
53,504 KB
testcase_09 AC 37 ms
53,504 KB
testcase_10 AC 37 ms
53,504 KB
testcase_11 AC 37 ms
53,504 KB
testcase_12 AC 38 ms
53,504 KB
testcase_13 AC 47 ms
61,816 KB
testcase_14 AC 48 ms
64,012 KB
testcase_15 AC 47 ms
61,884 KB
testcase_16 AC 49 ms
64,072 KB
testcase_17 AC 47 ms
61,868 KB
testcase_18 AC 47 ms
62,936 KB
testcase_19 AC 47 ms
62,860 KB
testcase_20 AC 45 ms
60,020 KB
testcase_21 AC 48 ms
62,628 KB
testcase_22 AC 46 ms
60,320 KB
testcase_23 AC 53 ms
64,812 KB
testcase_24 AC 48 ms
61,952 KB
testcase_25 AC 54 ms
65,000 KB
testcase_26 AC 46 ms
61,928 KB
testcase_27 AC 47 ms
62,432 KB
testcase_28 AC 54 ms
66,144 KB
testcase_29 AC 54 ms
66,144 KB
testcase_30 AC 56 ms
66,148 KB
testcase_31 AC 53 ms
64,092 KB
testcase_32 AC 56 ms
66,160 KB
testcase_33 AC 49 ms
64,028 KB
testcase_34 AC 50 ms
64,028 KB
testcase_35 AC 46 ms
61,816 KB
testcase_36 AC 48 ms
64,012 KB
testcase_37 AC 48 ms
64,012 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int,input().split())
S = input().strip()
S = "o"+S
dp = [0 for _ in range(N)]
ind = -1
for i in range(N-1,-1,-1):
    if S[i]=="x":
        dp[i]=1
    else:
        dp[i]=0
        x = i
        ind = i-1
        break
for i in range(ind,-1,-1):
    if S[i]=="x":
        dp[i]=1
    else:
        if x-i>K:
            dp[i]=0
            x = i
        else:
            dp[i]=1
A = []
for i in range(1,K+1):
    if S[i]=="o" and dp[i]==0:
        A.append(i)
if len(A)==0:
    print(0)
else:
    for a in A:
        print(a)
0