贪心
浑水摸鱼拒绝996福报
这个作者很懒,什么都没留下…
展开
-
守望者的逃离
// 守望者的逃离.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include <iostream> #include<algorithm> #include<cstring> #include<string> using namespace std; const int maxn = 500000; int d[maxn]; //一道比较经典的贪心题目,我们可以注意到这一题他一个闪现的距离是大于走3S的距离的,所以我们原创 2021-09-21 18:46:10 · 111 阅读 · 0 评论 -
加工生产调度
#include<algorithm> //为贪心算法问题 //大伙用的都是johnson的算法,简称为双机调度算法 #include<iostream> #include<cstring> #include<string> using namespace std; const int maxn = 5000; int a[maxn]; int b[maxn]; int order[maxn]; struct c { int belong, time, id原创 2021-09-17 20:01:51 · 101 阅读 · 0 评论 -
切蛋糕 贪心
// 切蛋糕.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include <iostream> #include<algorithm> #include<cstring> #include<string> //这是一个贪心+二分查找+dfs的一个问题 const int maxn = 10000; using namespace std; int cake[maxn]; int mouth[maxn]; int prec原创 2021-09-17 19:45:41 · 132 阅读 · 0 评论