結果
| 問題 |
No.9 モンスターのレベル上げ
|
| ユーザー |
tktk_snsn
|
| 提出日時 | 2021-01-02 05:42:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 380 bytes |
| コンパイル時間 | 666 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 95,120 KB |
| 最終ジャッジ日時 | 2024-10-11 19:33:52 |
| 合計ジャッジ時間 | 14,743 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 18 |
ソースコード
import heapq
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split())) * 2
ans = 0
for i in range(N):
P = [(a, 0) for a in A]
heapq.heapify(P)
for j in range(N):
a, c = heapq.heappop(P)
a += B[i+j]//2
c += 1
heapq.heappush(P, (a, c))
score = min(c for _, c in P)
ans = max(ans, score)
print(ans)
tktk_snsn