摘要: 希冀平台: 代码: #include<iostream> #include<vector> #include<algorithm> #include<math.h> #include<sstream> #include<string> #include<string.h> #include<ioma 阅读全文
posted @ 2024-05-07 11:46 WHUStar 阅读(25) 评论(0) 推荐(0)
摘要: 链接:https://codeforces.com/problemset/problem/1840/D 洛谷链接:https://www.luogu.com.cn/problem/CF1840D 思路: 这个题目之前好像碰到过类似的,感觉就是对长度二分,然后遍历,注意有个坑的点在于应该是2*len因 阅读全文
posted @ 2024-05-06 20:45 WHUStar 阅读(18) 评论(0) 推荐(0)
摘要: 链接:https://codeforces.com/problemset/problem/1860/C 洛谷链接:https://www.luogu.com.cn/problem/CF1860C 相关知识点复习:LIS最长上升子序列 链接:https://blog.csdn.net/lxt_Luci 阅读全文
posted @ 2024-05-05 19:10 WHUStar 阅读(20) 评论(0) 推荐(0)
摘要: 链接:https://codeforces.com/problemset/problem/1878/E 洛谷链接:https://www.luogu.com.cn/problem/CF1878E 知识点:st表+二分(我不知道为什么有的题解说不用二分...反正我的在第11个测试点会TLE) 思路就是 阅读全文
posted @ 2024-05-05 14:07 WHUStar 阅读(13) 评论(0) 推荐(0)
摘要: 题面: 链接:https://codeforces.com/problemset/problem/1893/A 洛谷链接:https://www.luogu.com.cn/problem/CF1893A 思路:逆着推 有一个非常重要的结论得观察出来: 所以当倒过来推的时候(b->a),同理可以直接取 阅读全文
posted @ 2024-05-05 11:54 WHUStar 阅读(20) 评论(0) 推荐(0)
摘要: 电子书板子: 希冀平台: #include<iostream> #include<vector> #include<algorithm> #include<math.h> #include<sstream> #include<string> #include<string.h> #include<i 阅读全文
posted @ 2024-05-04 17:06 WHUStar 阅读(12) 评论(0) 推荐(0)
摘要: 链接:https://codeforces.com/problemset/problem/1896/C 洛谷:https://www.luogu.com.cn/problem/CF1896C 这题疑似有点水了?为什么还有绿题hhhh 思路:结构体+排序 首先对a,b各自排序:取b的下x和a的上x比较 阅读全文
posted @ 2024-05-01 10:50 WHUStar 阅读(19) 评论(0) 推荐(0)
摘要: 链接:https://codeforces.com/problemset/problem/1901/C 洛谷链接:https://www.luogu.com.cn/problem/CF1901C 思路: 首先去重:这里建议分清楚总操作数n和元素总数cnt。 然后把去重的元素放在数组中,sort让它升 阅读全文
posted @ 2024-05-01 10:25 WHUStar 阅读(19) 评论(0) 推荐(0)
摘要: 链接:https://codeforces.com/problemset/problem/1903/C 洛谷链接(有翻译):https://www.luogu.com.cn/problem/CF1903C 解答: 观察可知:如果后面连续的和大于等于0,那么后面就可以连成一段(贪心),就是说因为前面每 阅读全文
posted @ 2024-05-01 09:48 WHUStar 阅读(26) 评论(0) 推荐(0)
摘要: 题目: 链接: https://www.luogu.com.cn/problem/CF1907D 大致思路: 二分模拟 关键点: ①确定二分区间:最小值为第一次跳的左边界,最大值为连续两个线段的最远值(注意,应该有四种情况:左1减右1,左2减右1,左1减右2,左2减右2,取绝对值); ②确定如何模拟 阅读全文
posted @ 2024-04-29 19:45 WHUStar 阅读(21) 评论(0) 推荐(0)