上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 21 下一页
摘要: 想法题是硬伤,面对卡题和卡bug的情况应对能力太差 A.求两个前缀和以及两个后缀和,相邻最小值的最大值。 #include<iostream> using namespace std; const int maxn = 1e5 + 10; int a[maxn]; int pre1[maxn],pr 阅读全文
posted @ 2019-04-09 21:35 Hugh_Locke 阅读(246) 评论(0) 推荐(0) 编辑
摘要: A.如果第i个数字是偶数,总贡献就加上i #include <map> #include <set> #include <ctime> #include <cmath> #include <queue> #include <stack> #include <vector> #include <str 阅读全文
posted @ 2019-04-08 18:34 Hugh_Locke 阅读(263) 评论(0) 推荐(0) 编辑
摘要: A.维护一个前缀最大值,不断跳即可 #include <map> #include <set> #include <ctime> #include <cmath> #include <queue> #include <stack> #include <vector> #include <string 阅读全文
posted @ 2019-04-07 22:27 Hugh_Locke 阅读(245) 评论(0) 推荐(0) 编辑
摘要: A.算2,3的因子个数即可 #include <map> #include <set> #include <ctime> #include <cmath> #include <queue> #include <stack> #include <vector> #include <string> #i 阅读全文
posted @ 2019-04-07 18:11 Hugh_Locke 阅读(377) 评论(0) 推荐(0) 编辑
摘要: 一不小心又翻车了,第二次痛失200分 1.开局7分钟A了L2-3,一看榜已经有七个大兄弟排在前面了,翻车 * 1 2.把L1-3 A了18分,留了两分准备抢顽强拼搏奖,最后五秒钟把题过了,万万没想到还有人最后一秒才过题,翻车 * 2 3.L2-2的bug最后都没修出来,翻车 * 3 最后188分比去 阅读全文
posted @ 2019-03-31 10:20 Hugh_Locke 阅读(237) 评论(0) 推荐(0) 编辑
摘要: https://www.lydsy.com/JudgeOnline/problem.php?id=3674 用可持久化数组维护并查集的fa数组, 查询时间复杂度为nlognlogn,一个log是并查集的时间复杂度,采用按秩合并的操作,需要注意的是按秩合并的秩意思为当前最大结点下的树的最大深度。 另一 阅读全文
posted @ 2019-03-25 18:53 Hugh_Locke 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 愉快的校赛翻皮水! 题解 A 温暖的签到,注意用gets #include <map> #include <set> #include <ctime> #include <cmath> #include <queue> #include <stack> #include <vector> #incl 阅读全文
posted @ 2019-03-20 15:24 Hugh_Locke 阅读(250) 评论(0) 推荐(0) 编辑
摘要: A 易知最优的方法是一次只拿一颗,石头数谁多谁赢,一样多后手赢 #include <map> #include <set> #include <ctime> #include <cmath> #include <queue> #include <stack> #include <vector> #i 阅读全文
posted @ 2019-02-27 19:56 Hugh_Locke 阅读(260) 评论(0) 推荐(1) 编辑
摘要: https://www.lydsy.com/JudgeOnline/problem.php?id=3932 题意:给出一些带有等级的线段,求一点上前K小个等级线段的等级之和 询问是对于每一个点询问前K小的和,比较容易想到的是对每一个点都建立一颗权值线段树,维护点的数量和点的等级和。 问题是空间太大, 阅读全文
posted @ 2019-02-21 22:39 Hugh_Locke 阅读(259) 评论(0) 推荐(0) 编辑
摘要: https://www.lydsy.com/JudgeOnline/problem.php?id=2588 题意:强制在线的询问树链权值第K小(无修) 这种类似于第K小的题,一般容易想到主席树,但是树链并不能不是一个按顺序的序列,使用树链剖分也不太容易维护几条链之间的第K小关系。 但是可以从主席树的 阅读全文
posted @ 2019-02-16 13:44 Hugh_Locke 阅读(232) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 21 下一页