摘要:Dashboard - Educational Codeforces Round 166 Problem - A - Codeforces 签到(写的有点烦...) #include<bits/stdc++.h> using namespace std; const int N=2e5+10; vo
阅读全文
|
12 2024 档案
摘要:Dashboard - Educational Codeforces Round 166 Problem - A - Codeforces 签到(写的有点烦...) #include<bits/stdc++.h> using namespace std; const int N=2e5+10; vo
阅读全文
摘要:Educational Codeforces Round 165 Problem - A - Codeforces 答案只会是2或3,分类一下就好了 #include<bits/stdc++.h> using namespace std; const int N=2e5+10; int n; int
阅读全文
摘要:ST表 \(RMQ\),支持查询一个静态数组的区间最大值,不支持修改操作 预处理:\(o(n*lgn)\) 查询:\(o(1)\) 预处理 \(ST\)表的基本思想是倍增,预处理类似于区间\(dp\)问题 定义\(f[i][j]\)为从下标为\(i\)的元素开始,向后扩展\(2^{j}\)的距离的区
阅读全文
摘要:Educational Codeforces Round 173 (Rated for Div. 2) - Codeforces Problem - A - Codeforces 签到题目 Problem - B - Codeforces 数学 被小学奥数薄纱力.... 给出一个由\(n!\)个\(
阅读全文
摘要:Educational Codeforces Round 157 (Rated for Div. 2) Problem - A - Codeforces 构造 签到题没啥好说的 #include<bits/stdc++.h> using namespace std; const int N=2e5+
阅读全文
摘要:Educational Codeforces Round 172 (Rated for Div. 2) - Codeforces Problem - A - Codeforces 数学 排序 显然将数组排序之后每次拿最大值,若恰好拿到\(k\)则答案为\(0\),如果中途拿到\(i\)时总和,大于\
阅读全文
摘要:Educational Codeforces Round 80 (Rated for Div. 2) - Codeforces Problem - A - Codeforces 数学 双钩函数,直接显然极值点是\(\sqrt{d}-1\),但要注意取整的时候可能存在偏差,暴力搜索一下附近的值就好了
阅读全文
摘要:树状数组 作用: 动态地维护前缀和查询 Time complexity 修改一个数:$$o(lgn)$$ 查询一段区间和:$$o(lgn)$$ 实现过程 1 lowbit 返回一个数的二进制下末尾第一个1和后面的0构成的数 如11011000100 返回100=4 int lowbit(int x)
阅读全文
摘要:Educational Codeforces Round 169 (Rated for Div. 2) - Codeforces Problem - A - Codeforces 构造 签到题,明显只有\(n\leq2\)的时候有解 #include<bits/stdc++.h> using nam
阅读全文
|