結果
| 問題 |
No.1071 ベホマラー
|
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2020-06-05 22:23:20 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 440 bytes |
| コンパイル時間 | 147 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 46,820 KB |
| 最終ジャッジ日時 | 2024-12-17 16:08:26 |
| 合計ジャッジ時間 | 15,740 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 13 WA * 7 |
ソースコード
import sys import numpy as np read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N, K, X, Y = map(int, readline().split()) A = np.array(read().split(), np.int64) # 必要回数になおす A -= 1 A = (A + K - 1) // K A.sort() A = A[::-1] A = np.append(A, 0) Acum = np.cumsum(A) x = Acum - np.arange(1, N + 2, dtype=np.int64) * A y = A cost = x * X + y * Y x, y print(cost.min())
maspy