摘要: L 小沙の抱团 hard 原题链接 代码 点击查看代码 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #include<vector> #include<queue> 阅读全文
posted @ 2023-02-01 23:31 Keith- 阅读(17) 评论(0) 推荐(0) 编辑
摘要: K 小沙の抱团 easy 原题链接 思路 代码 点击查看代码 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #include<vector> #include<que 阅读全文
posted @ 2023-02-01 22:42 Keith- 阅读(14) 评论(0) 推荐(0) 编辑
摘要: H 小沙の店铺 原题链接 代码 点击查看代码 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #include<vector> #include<queue> usin 阅读全文
posted @ 2023-02-01 22:34 Keith- 阅读(12) 评论(0) 推荐(0) 编辑
摘要: B 小沙の博弈 原题链接 题意 字典序贪心 思路 考虑需要使自己的字典序比对方小,那么每次都尽可能的少选,由于每次必须选择一个,那么双方都 会一直选择一个直至石子被取完。 当石子数目为偶数时,双方的取石子的次数相同,得到的字典序也相同,所以平手; 当石子数目为奇数时,先手会比后手多取一次,所以得到的 阅读全文
posted @ 2023-02-01 22:25 Keith- 阅读(13) 评论(0) 推荐(0) 编辑
摘要: A 小沙の好客 原题链接‘ 代码 点击查看代码 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #include<vector> #include<queue> usi 阅读全文
posted @ 2023-02-01 22:17 Keith- 阅读(15) 评论(0) 推荐(0) 编辑
摘要: B 清楚姐姐学构造 原题链接 题意 给出三个同余式子,分类讨论 思路 $$ \left{ \begin{array}{} a_i \equiv a_{N-1-i}\ (mod\ m) & \ b_i \equiv -b_{N-1-i}\ (mod\ m) &\ c_i \equiv a_i + b_ 阅读全文
posted @ 2023-02-01 21:35 Keith- 阅读(32) 评论(0) 推荐(0) 编辑
摘要: G 清楚姐姐逛街(Easy Version) 原题链接 题意 终点会按照固定方式移动的搜索问题,多次查询 思路 只要时间t是确定的,那么终点的位置就是确定的 -> 可以模拟每一时刻 bfs维护智乃到每个点的最短距离 模拟每一时刻清楚姐姐的位置 如果该时刻大于智乃到每个点的最短距离(前提是智乃能够到达 阅读全文
posted @ 2023-02-01 01:27 Keith- 阅读(27) 评论(0) 推荐(0) 编辑