結果
問題 |
No.1738 What's in the box?
|
ユーザー |
|
提出日時 | 2021-11-21 01:56:50 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 362 bytes |
コンパイル時間 | 198 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-06-12 21:56:15 |
合計ジャッジ時間 | 4,606 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 42 WA * 26 RE * 2 |
ソースコード
N,M = map(int,input().split()) W = list(map(int,input().split())) m = sum(W)/M ans = [0]*N def f(x): s = 0 t = 10**9 def is_ok(y): return y*m <= x while t-s>1: mid = (t+s)//2 if is_ok(mid): s = mid else: t = mid return s for i in range(N): ans[i] = f(W[i]) print(*ans)