mad_max
mad_max
全部文章
贪心
主席树(1)
优先队列(3)
博弈论(2)
哈希(3)
广度优先搜索(2)
数论(8)
未归档(1)
树(2)
树状数组(3)
模拟(4)
深度优先搜索(6)
线段树(3)
归档
标签
去牛客网
登录
/
注册
mad_max的博客
全部文章
/ 贪心
(共2篇)
HDUOJ 1789 Doing Homework again(贪心)
solution:难点在于找到贪心策略,我们发现按时间排序并不能满足要求,于是改用分数排序 #include <bits/stdc++.h> using namespace std; struct node { int date; int score; }a[1001]; //...
贪心
2019-08-20
0
462
HDUOJ 2124 Repair the wall(贪心)
solution:简单的贪心思路,排个序就完了 #include <bits/stdc++.h> using namespace std; int main() { int l, n; while (cin >> l >> n) { int cnt ...
贪心
2019-08-20
1
495