上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 35 下一页
摘要: 利用几何关系转化以后,变成经典的区间覆盖问题,每次选择当前覆盖范围内能覆盖最远的线段 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 10010; const double eps 阅读全文
posted @ 2021-06-02 21:53 Tartarus_li 阅读(25) 评论(0) 推荐(0) 编辑
摘要: https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=0&problem=1736&mosmsg=Submission+received+with+ID+2645038 阅读全文
posted @ 2021-06-01 21:58 Tartarus_li 阅读(32) 评论(0) 推荐(0) 编辑
摘要: https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4098 首先打表,正方体旋转的 \(24\) 种姿态 枚举所有正方体的旋转状态(第 \(1\) 个正方体不用旋转) 阅读全文
posted @ 2021-06-01 20:58 Tartarus_li 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 先枚举出第一行的 \(2^n\) 种状态,然后递推出后面所有的行 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 20; const int INF = 1000000007; i 阅读全文
posted @ 2021-06-01 20:04 Tartarus_li 阅读(31) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h> using namespace std; const string ma[500] = { "1w","2w","3w","4w","5w","6w","7w","8w","9w", "1b","2b","3b","4b","5b","6b" 阅读全文
posted @ 2021-06-01 16:39 Tartarus_li 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 不要忘记 \(vis\) 数组.. #include<iostream> #include<cstring> #include<cstdio> #include<algorithm> #include<queue> using namespace std; typedef long long ll; 阅读全文
posted @ 2021-05-30 00:03 Tartarus_li 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 反向bfs + 康托展开 #include<iostream> #include<string> #include<queue> #include<cstring> #include<vector> #include<algorithm> using namespace std; typedef l 阅读全文
posted @ 2021-05-28 20:30 Tartarus_li 阅读(28) 评论(0) 推荐(0) 编辑
摘要: \(string\) 的简单应用 #include<cstdio> #include<iostream> #include<map> using namespace std; typedef long long ll; const int maxn = 110; int T, n; map<stri 阅读全文
posted @ 2021-05-28 16:04 Tartarus_li 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4609 \(fft\) 经典套路,求 \(n\) 个数任意两个相加所得的数的种类/数量,只需要将数值当作指数,系数0/1表示有/没有或 \(a_i\) 表示该数值有 \(a_i\) 个,\(fft\) 即 阅读全文
posted @ 2021-02-07 20:52 Tartarus_li 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://ac.nowcoder.com/acm/problem/14532 不难看出题目是用矩阵乘法来加速的,但显然时间复杂度 \(O(n^{3}logm)\) 过高 构造出矩阵后,打印出来发现,该矩阵是一个循环矩阵 设 \(a,b\) 均为循环矩阵,则有以下性质: \(a + b 阅读全文
posted @ 2021-02-05 21:33 Tartarus_li 阅读(56) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 35 下一页