結果
| 問題 | No.944 煎っぞ! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-03-13 22:27:21 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 534 bytes |
| 記録 | |
| コンパイル時間 | 240 ms |
| コンパイル使用メモリ | 85,192 KB |
| 実行使用メモリ | 93,116 KB |
| 最終ジャッジ日時 | 2026-04-07 13:08:09 |
| 合計ジャッジ時間 | 24,465 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 WA * 1 TLE * 20 -- * 3 |
ソースコード
N = int(input())
a = list(map(int,input().split()))
def calc(x):
count = 0
now = 0
left = 0
while left < N:
right = left
while right < N and now + a[right] <= x:
now += a[right]
right += 1
if now < x:
return 0
now = 0
count += 1
left = right
return count
ans = 0
Sum = 0
S = sum(a)
M = max(a)
for i in a:
Sum += i
if Sum > S // 2:break
if Sum < M:continue
t = calc(Sum)
if t > ans:
ans = t
print(ans)