序列(array) 题目描述 给定一个长为 \(m\) 的序列 \(a\). 有一个长为 \(m\) 的序列 \(b\),需满足 \(0\leq b_i \leq n\),\(\sum_{i=1}^m a_ib_i \leq D\) 且 \(b_i\) 为整数. 求 \(\sum b_i + k \min_{i=1}^m{b_i}\) 的最大值. 输入格式 第一行一个正整数 \(T\),表示数据组数. 对于每组数据,第 \(1\) 行四个整数 \(n, m, k, D\). 第 \(2…