結果
| 問題 |
No.9 モンスターのレベル上げ
|
| ユーザー |
|
| 提出日時 | 2021-04-12 21:30:29 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 416 bytes |
| コンパイル時間 | 177 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 95,776 KB |
| 最終ジャッジ日時 | 2024-06-28 17:07:41 |
| 合計ジャッジ時間 | 14,760 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 WA * 4 |
ソースコード
from heapq import heappush, heappop
n = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
ans = 10**10
for i in range(n):
h = []
count = [0]*n
for ind,a in enumerate(A):
heappush(h, (a,ind))
for j in range(n):
a,ind = heappop(h)
count[ind] += 1
a += B[(i+j)%n]//2
heappush(h, (a,ind))
ans = min(ans,max(count))
print(ans)