結果

問題 No.9 モンスターのレベル上げ
ユーザー pluto77pluto77
提出日時 2016-09-23 08:40:42
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 1,084 ms / 5,000 ms
コード長 308 bytes
コンパイル時間 874 ms
コンパイル使用メモリ 77,380 KB
実行使用メモリ 85,972 KB
最終ジャッジ日時 2023-09-06 05:00:31
合計ジャッジ時間 12,513 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
77,828 KB
testcase_01 AC 83 ms
78,004 KB
testcase_02 AC 1,084 ms
85,736 KB
testcase_03 AC 917 ms
84,696 KB
testcase_04 AC 564 ms
82,088 KB
testcase_05 AC 425 ms
81,196 KB
testcase_06 AC 236 ms
81,032 KB
testcase_07 AC 119 ms
80,108 KB
testcase_08 AC 277 ms
81,420 KB
testcase_09 AC 1,069 ms
85,780 KB
testcase_10 AC 85 ms
78,284 KB
testcase_11 AC 872 ms
85,772 KB
testcase_12 AC 1,020 ms
82,320 KB
testcase_13 AC 805 ms
85,012 KB
testcase_14 AC 1,077 ms
85,972 KB
testcase_15 AC 1,016 ms
85,356 KB
testcase_16 AC 146 ms
80,184 KB
testcase_17 AC 710 ms
82,968 KB
testcase_18 AC 609 ms
82,560 KB
testcase_19 AC 133 ms
80,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki_9
import heapq

n=int(raw_input())
a=[(int(i),0) for i in raw_input().split()]
b=map(int,raw_input().split())
heapq.heapify(a)

res=n
for i in xrange(n):
 aa=a[:]
 for j in range(i,i+n):
  r=j%n
  x,y=aa[0]
  heapq.heapreplace(aa,(x+b[r]/2,y+1))
 temp=max(z for x,z in aa)
 res=min(res,temp)
print res
0