摘要: 朴素算法每轮都sort会tle所以要优化 用归并难点在于想明白为什么是归并比赛过程中 输赢持续有序 这是归并的前提条件所以才可以归并#include #include using namespace std;co... 阅读全文
posted @ 2018-07-12 21:56 张浦 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 经典排序贪心开始时间从小到大为第一关键字结束时间从大到小为第二关键字从尾至头连一遍输出结果#include #include using namespace std;const int MAXN = 1e6 +... 阅读全文
posted @ 2018-07-12 17:09 张浦 阅读(61) 评论(0) 推荐(0) 编辑
摘要: 基础题(水题)数组存对应字母坑点在于结合题意判重一个原字母对应两个加密字母不行两个原字幕对应一个加密字母不行#include #include using namespace std;int main(){ ch... 阅读全文
posted @ 2018-07-12 16:22 张浦 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 水题 结合题意双指针夹逼 #include #include #include using namespace std;const int MAXN = 3e4 + 10;int arr[MAXN];void ... 阅读全文
posted @ 2018-07-12 15:01 张浦 阅读(59) 评论(0) 推荐(0) 编辑
摘要: 水题 #include #include using namespace std;const int MAXN = 5e3 + 10;struct prc{ int price, val; }arr[MAXN]... 阅读全文
posted @ 2018-07-12 14:30 张浦 阅读(71) 评论(0) 推荐(0) 编辑