結果
| 問題 | No.1535 五七五 |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2021-06-06 18:45:40 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 839 ms / 2,000 ms |
| + 979µs | |
| コード長 | 377 bytes |
| 記録 | |
| コンパイル時間 | 53 ms |
| コンパイル使用メモリ | 14,848 KB |
| 実行使用メモリ | 55,304 KB |
| 最終ジャッジ日時 | 2026-09-28 11:26:22 |
| 合計ジャッジ時間 | 10,210 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
from itertools import accumulate
import bisect
N=int(input())
a,b,c=map(int,input().split())
S=input().split()
S=[len(s) for s in S]
A=[0]+list(accumulate(S))
ANS=0
for i in range(N):
x=A[i]
y=bisect.bisect(A,x+a)
z=bisect.bisect(A,x+a+b)
w=bisect.bisect(A,x+a+b+c)
if A[y-1]==x+a and A[z-1]==x+a+b and A[w-1]==x+a+b+c:
ANS+=1
print(ANS)
titia