結果

問題 No.5018 Let's Make a Best-seller Book
ユーザー titia
提出日時 2023-10-01 13:54:42
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 865 bytes
コンパイル時間 346 ms
コンパイル使用メモリ 87,252 KB
実行使用メモリ 4,380 KB
スコア 0
最終ジャッジ日時 2023-10-01 13:54:46
合計ジャッジ時間 3,776 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other TLE * 1 -- * 99
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

T,N,Money=map(int,input().split())

SELLS=[-1]*N

for tests in range(T):
    if Money>=2000000:
        print(2,2,flush=True)
    elif Money>=3000000:
        print(2,3,flush=True)
    elif Money>=5000000:
        print(2,4,flush=True)
    elif Money>=9000000:
        print(2,5,flush=True)
    else:
        ALL=Money//500
        
        if SELLS[0]==-1:
            x=ALL//10

            print(*([1]+[x]*N),flush=True)

        else:
            SUM=sum(SELLS)

            ANS=[0]*N
            for i in range(N):
                ANS[i]=ALL*SELLS[i]//SUM

            print(*([1]+ANS),flush=True)

    Money=int(input())
    S=list(map(int,input().split()))
    P=list(map(int,input().split()))
    R=list(map(int,input().split()))

    if SELLS[0]==-1:
        SELLS=[0]*N

    for i in range(N):
        SELLS[i]+=S[i]
0