摘要: Allocation 题意 N个房子出售,每个卖Ai刀,现有B刀资金,求最多买多少个。 思路 贪心,排序后从小到大买 代码 #include<bits/stdc++.h> using namespace std; const int MAX=1e5+5; int a[MAX]; int main() 阅读全文
posted @ 2020-03-25 20:41 cryingrain 阅读(189) 评论(0) 推荐(0) 编辑