結果
| 問題 |
No.5018 Let's Make a Best-seller Book
|
| コンテスト | |
| ユーザー |
すぎぱも
|
| 提出日時 | 2023-10-01 15:19:40 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 158 ms / 400 ms |
| コード長 | 805 bytes |
| コンパイル時間 | 463 ms |
| コンパイル使用メモリ | 87,304 KB |
| 実行使用メモリ | 92,236 KB |
| スコア | 4,434 |
| 平均クエリ数 | 52.00 |
| 最終ジャッジ日時 | 2023-10-01 15:19:59 |
| 合計ジャッジ時間 | 17,529 ms |
|
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
| 純コード判定しない問題か言語 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 100 |
ソースコード
T, N, money = map(int, input().split())
s, p, r = [0] * N, [0] * N, [0] * N
def do(arg):
if type(arg) == list:
print(1, *arg, flush=True)
else:
print(2, arg, flush=True)
money = int(input())
if money == -1:
exit()
s = list(map(int, input().split()))
p = list(map(int, input().split()))
r = list(map(int, input().split()))
return money, s, p, r
money, s, p, r = do([money // (500 * N)] * N)
for week in range(T - 1):
leftbook = money // 500
# print(leftbook)
needbook = (sum(r) + leftbook)
# print(needbook)
ship = [max(0, needbook // N - r) for r in r]
# print(sum(s * 500 for s in ship))
money, s, p, r = do(ship)
# 52 10 200000000
# 10000000
# 1 2 3 4 5 6 7 8 9 10
# 1 2 3 4 5 6 7 8 9 10
# 1 2 3 4 5 6 7 8 9 10
すぎぱも