結果
問題 |
No.9 モンスターのレベル上げ
|
ユーザー |
![]() |
提出日時 | 2015-08-16 16:30:25 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 466 bytes |
コンパイル時間 | 176 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 18,340 KB |
最終ジャッジ日時 | 2024-07-18 09:53:42 |
合計ジャッジ時間 | 6,695 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 TLE * 1 -- * 17 |
ソースコード
import queue N = int(input()) A = [int(x) for x in input().split()] B = [int(x) for x in input().split()] min_max_cnt = N for i in range(N): q = queue.PriorityQueue() for j in range(N): q.put((A[j], 0), A[j]*10000) max_cnt = 0 for j in range(N): t = q.get() q.put((B[j-i]//2+t[0], t[1]+1), ((B[j-i]//2+t[0])*10000+t[1]+1)) max_cnt = max(max_cnt, t[1]+1) min_max_cnt = min(min_max_cnt, max_cnt) print(min_max_cnt)