結果
| 問題 |
No.9 モンスターのレベル上げ
|
| ユーザー |
|
| 提出日時 | 2021-04-12 21:32:43 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 428 bytes |
| コンパイル時間 | 212 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 123,696 KB |
| 最終ジャッジ日時 | 2024-06-28 17:10:11 |
| 合計ジャッジ時間 | 26,723 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 TLE * 1 |
ソースコード
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,0,ind))
for j in range(n):
a,num,ind = heappop(h)
count[ind] += 1
a += B[(i+j)%n]//2
heappush(h, (a,num+1,ind))
ans = min(ans,max(count))
print(ans)