摘要: 原题链接 考察:线性dp 思路: 想到了但三重循环以为会超时,实际是只有$j=1$时才有三重循环. ##Code #include <iostream> #include <cstring> using namespace std; const int N = 1010; int n,m,x,y,c 阅读全文
posted @ 2021-07-23 13:07 acmloser 阅读(49) 评论(0) 推荐(0) 编辑
摘要: 原题链接 思路: 结论题,排序奇偶分组,均分,没想出怎么证明 ##Code #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N = 100010; int n,sum 阅读全文
posted @ 2021-07-23 11:00 acmloser 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 原题链接 考察:思维 or 搜索 错误思路: 二分模拟,精度爆炸 正确思路一: 搜索....我是fw 正确思路二: 双指针设置$l = 1,r = n$,如果$s[i]==l$,说明右边不会在有人,$s[i]==r$左边不会在有人. ##Code #include <iostream> #inclu 阅读全文
posted @ 2021-07-23 09:44 acmloser 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 原题链接 考察:贪心 思路: 死于读不懂题,对于每个仓库,求裁判到它的距离,排序,两类仓库分开求,因为题目是这么说的 ##Code #include <iostream> #include <cstring> #include <cmath> #include <queue> using names 阅读全文
posted @ 2021-07-23 01:10 acmloser 阅读(45) 评论(0) 推荐(0) 编辑