結果
| 問題 |
No.1535 五七五
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-18 03:17:34 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 238 ms / 2,000 ms |
| コード長 | 276 bytes |
| コンパイル時間 | 187 ms |
| コンパイル使用メモリ | 82,036 KB |
| 実行使用メモリ | 195,516 KB |
| 最終ジャッジ日時 | 2024-11-23 13:12:41 |
| 合計ジャッジ時間 | 4,922 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
n = int(input())
a, b, c = map(int, input().split())
S = input().split()
S = [len(s) for s in S]
ans = 0
se = {0}
tot = 0
for i in range(n):
tot += S[i]
se.add(tot)
if tot - c in se and tot - c - b in se and tot - c - b - a in se:
ans += 1
print(ans)