2023年3月2日
摘要: 只要某数字的十进制表示中有三个连续的 6 ,古代人也认为这是个魔鬼的数,比如 666,1666,6663,16666,6660666 古代典籍中经常用“第X小的魔鬼的数”来指代这些数, 输入XX ,输出对应的第X个魔鬼数 二分 X ,看1~X 有几个这样的数,以此检验 #include <iostr 阅读全文
posted @ 2023-03-02 22:00 towboat 阅读(25) 评论(0) 推荐(0)
摘要: 求树上每个点的 最远点的距离 Di 换根dp #include <iostream> #include <vector> #include <algorithm> #include <cstring> using namespace std ; const int N=1e5,M=N; int nx 阅读全文
posted @ 2023-03-02 01:29 towboat 阅读(9) 评论(0) 推荐(0)
摘要: 消除方块,同色可以消除,产生价值 (len)^2 求最后最大的价值 区间dp #include <iostream> #include<queue> #include <cstring> #define IOS std::ios::sync_with_stdio(0) using namespace 阅读全文
posted @ 2023-03-02 01:15 towboat 阅读(11) 评论(0) 推荐(0)