This commit is contained in:
HuangHai
2025-11-20 13:18:00 +08:00
parent 88a4852812
commit 73b3035577
2 changed files with 0 additions and 30 deletions

View File

@@ -40,36 +40,6 @@ int main() {
}
```
### <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1
https://www.acwing.com/problem/content/description/444/
```cpp {.line-numbers}
#include <bits/stdc++.h>
using namespace std;
const int N = 10010, M = 200;
int n, m;
int w[N];
int q[M];
int main() {
cin >> n >> m;
for (int i = 0; i < n; i++) cin >> w[i];
for (int i = 0; i < n; i++) {
int t = 0;
for (int j = 0; j < m; j++) {
if (q[j] < q[t])
t = j;
}
q[t] += w[i];
}
int res = 0;
for (int i = 0; i < m;i++) res = max(res, q[i]);
cout << res << endl;
return 0;
}
```
### <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>2<EFBFBD><32>һ<EFBFBD><D2BB>ˮ<EFBFBD><CBAE>ͷǰ<CDB7>Ŷӽ<C5B6>ˮ<EFBFBD><CBAE>
https://www.acwing.com/problem/content/description/5945/

Binary file not shown.