結果

問題 No.1535 五七五
ユーザー lloyzlloyz
提出日時 2021-12-22 22:32:16
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 460 bytes
コンパイル時間 1,660 ms
コンパイル使用メモリ 86,420 KB
実行使用メモリ 112,692 KB
最終ジャッジ日時 2023-10-15 00:24:39
合計ジャッジ時間 8,320 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
70,884 KB
testcase_01 AC 70 ms
70,636 KB
testcase_02 AC 69 ms
70,736 KB
testcase_03 AC 71 ms
70,716 KB
testcase_04 AC 154 ms
112,692 KB
testcase_05 TLE -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ABC = list(map(int, input().split()))
S = list(input().split())

Slen = [0 for _ in range(n)]
for i in range(n):
    Slen[i] = len(S[i])

ans = 0
for i in range(n):
    ind = 0
    tmp = 0
    while i < n:
        tmp += Slen[i]
        if tmp == ABC[ind]:
            ind += 1
            if ind == 3:
                ans += 1
                break
            tmp = 0
        elif tmp > ABC[ind]:
            break
        i += 1
print(ans)
0