結果
| 問題 | No.9 モンスターのレベル上げ |
| コンテスト | |
| ユーザー |
ゆるく
|
| 提出日時 | 2014-10-12 16:31:17 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
WA
不安定
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 650 bytes |
| 記録 | |
| コンパイル時間 | 56 ms |
| コンパイル使用メモリ | 15,232 KB |
| 実行使用メモリ | 11,264 KB |
| 最終ジャッジ日時 | 2026-10-09 14:46:24 |
| 合計ジャッジ時間 | 9,177 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 WA * 1 |
ソースコード
import heapq
from collections import deque
d = deque()
n = int(input())
a = []
for i in (input().split()):
heapq.heappush(a,((int(i) << 8) + 0))
b = deque(list(map(int, input().split())))
c = n
ans = 0xFFFFFFFF
mxlist = [0] * n
while (c):
tmp = list(a)
mx = 0
index = 0
for bb in b:
t = heapq.heappop(tmp)
am = t & 0xFF
bm = t >> 8
bm += bb >> 1
am += 1
mxlist[index] = am
if am >= ans:
break
index += 1
heapq.heappush(tmp, (bm << 8) + am)
c -= 1
ans = min(ans, max(mxlist))
b.rotate(1)
print(ans)
ゆるく