上一页 1 ··· 4 5 6 7 8 9 下一页
摘要: Lagrange interpolation approach 是要解决一种如下的问题: 给定 $n$ 个坐标,$(x_1, y_1), (x_2, y_2), \dots, (x_n, y_n)$,确定一个多项式 $f(x) = a_0 + a_1x + a_2x^2 + \dots + a_dx 阅读全文
posted @ 2023-05-04 21:47 CountingGroup 阅读(44) 评论(0) 推荐(0) 编辑
摘要: https://codeforces.com/contest/1817 https://codeforces.com/contest/1818 2A. Politics 因为编号为 $1$ 的人一定不会离开,那么最后留下的人一定要和编号为 $1$ 的人的所有参数都一致,所以计数即可。 #includ 阅读全文
posted @ 2023-04-30 18:31 CountingGroup 阅读(306) 评论(2) 推荐(1) 编辑
摘要: 注:本文不写证明。 https://www.wolframalpha.com/ 花絮:真·sigma:,真·abc:, 一、剩余类环 $\mathbb{Z}/n\mathbb{Z}$ 记号:$\overline{x}$ 在$\mod n$ 意义下代表一个集合:${\dots,x-2n,x-n,x,x 阅读全文
posted @ 2023-04-29 09:22 CountingGroup 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 利益相关:2023 SD 第一轮省集,pt 同学因为爆空间有两道题挂到了 0 分。 一、计算空间消耗 | 数据类型 | 消耗字节数量 | | : : | : : | | char | $1$ | | int | $4$ | | unsigned int | $4$ | | long long | $ 阅读全文
posted @ 2023-04-28 18:14 CountingGroup 阅读(125) 评论(0) 推荐(0) 编辑
摘要: $$\text{orz lxl sto}$$ Codechef DGCD (Weaker) / AcWing 246 给定一个长度为 $n$ 的数列 $A = (a_1, a_2, \dots, a_n)$,支持两种操作: C L R d:将 $a_L, a_{L+1}, \dots, a_R$ 都 阅读全文
posted @ 2023-04-15 12:55 CountingGroup 阅读(21) 评论(0) 推荐(0) 编辑
摘要: A. Li Hua and Maze 题目保证了两个点的哈密顿距离至少为 $2$,所以他们不会相邻。 只要有点在角上答案就是 $2$,在边上但不在角上就是 $3$,否则就是 $4$。 #include <bits/stdc++.h> #include <ext/pb_ds/assoc_contain 阅读全文
posted @ 2023-04-11 20:49 CountingGroup 阅读(32) 评论(0) 推荐(0) 编辑
摘要: A - Double Click 直接模拟就好。 时间复杂度:$O(N)$。 #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include 阅读全文
posted @ 2023-04-11 20:25 CountingGroup 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 一、堆 #include <bits/stdc++.h> using namespace std; int n; priority_queue < int, vector < int >, greater < int > > heap; signed main () { scanf ("%d", & 阅读全文
posted @ 2023-03-31 16:28 CountingGroup 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 1. CF743C - Vladik and fractions (*1500) 目标:给定 $n$,构造 $x,y,z$ 满足 $x \neq y, x \neq z, y \neq z$ 且 $\dfrac{2}{n}=\dfrac{1}{x}+\dfrac{1}{y}+\dfrac{1}{z} 阅读全文
posted @ 2023-03-29 20:26 CountingGroup 阅读(10) 评论(0) 推荐(0) 编辑
摘要: Day 0 启程! 前面忘了。 Day 1 第一天 8:12 上考场,8:27 看到 t1 误以为自己不大会做,一开始只写了 \(20pts\),此时大概是 8:45。 然后开 t2,一直理解不了题意,稍微在草稿纸上模拟了一下,理解了样例,码了一个 \(O(2^m)\) 的 \(10pts\) 做法 阅读全文
posted @ 2023-03-28 22:07 CountingGroup 阅读(69) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 下一页