摘要: 题目传送门 sol:很基础的二分答案板子题。一开始方向搞错了往动规贪心那边想了,想了一个多小时都没思路。 二分答案 #include "cstdio" #include "algorithm" using namespace std; const int MAXN = 1e5 + 5; int ar 阅读全文
posted @ 2019-06-15 21:37 Jathon-cnblogs 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 题目传送门 sol:dp[i]为前i头牛按题目要求分组后的最大技能水平和。然后dp方程式就显而易见了; 动态规划 #include "bits/stdc++.h" using namespace std; const int MAXN = 1e4 + 5; int arr[MAXN], dp[MAX 阅读全文
posted @ 2019-06-15 21:26 Jathon-cnblogs 阅读(223) 评论(0) 推荐(0) 编辑