結果

問題 No.9 モンスターのレベル上げ
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-04-12 21:32:43
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 428 bytes
コンパイル時間 921 ms
コンパイル使用メモリ 87,040 KB
実行使用メモリ 124,472 KB
最終ジャッジ日時 2023-09-11 02:40:12
合計ジャッジ時間 27,517 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
71,040 KB
testcase_01 AC 77 ms
71,328 KB
testcase_02 AC 3,792 ms
124,280 KB
testcase_03 AC 2,971 ms
110,680 KB
testcase_04 AC 1,622 ms
91,720 KB
testcase_05 AC 1,115 ms
85,548 KB
testcase_06 AC 491 ms
80,064 KB
testcase_07 AC 139 ms
77,964 KB
testcase_08 AC 605 ms
81,044 KB
testcase_09 AC 3,696 ms
124,076 KB
testcase_10 AC 76 ms
71,052 KB
testcase_11 AC 4,499 ms
122,932 KB
testcase_12 TLE -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0