結果

問題 No.1535 五七五
ユーザー gorugo30
提出日時 2021-06-06 18:08:44
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 393 bytes
コンパイル時間 160 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 61,856 KB
最終ジャッジ日時 2024-11-23 02:03:11
合計ジャッジ時間 28,838 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12 TLE * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
a, b, c = map(int, input().split())
S = ""
T = list(input().split())
for i in range(N):
    S += "1"
    S += "0" * (len(T[i]) - 1)
S += "1"

ind = 0
ans = 0
for i in range(N):
    if ind + a + b + c >= len(S):
        continue
    if S[ind] == "1" and S[ind + a] == "1" and S[ind + a + b] == "1" and S[ind + a + b + c] == "1":
        ans += 1
    ind += len(T[i])
print(ans)
0