随笔分类 - ACM - 数学 - 组合数学
摘要:# Codeforces Round 690 (Div. 3) https://codeforces.com/contest/1462 ## A. Favorite Sequence 按题意输出 ```CC #include using namespace std; const int N = 1e
阅读全文
摘要:# Educational Codeforces Round 38 C - F https://codeforces.com/contest/938 今天写出了三题ovo ## C. Constructing Tests 多画几个图就能发现,对于 的正方形来说,要使得 $m\
阅读全文
摘要:# Educational Codeforces Round 33 (Rated for Div. 2) https://codeforces.com/contest/893 昨日vp,今日补完F D贪心,思路值得学习; E组合数学推式子,式子不难,关键在于模型抽象 F主席树,调了老半天,关键在于要
阅读全文
摘要:AtCoder Beginner Contest 156 https://atcoder.jp/contests/abc156 D - Bouquet 组合数学。 二项式定理。 注意取模之前一定要保证他是正数(有时候只加一次mod可能不够) #include <bits/stdc++.h> #def
阅读全文
摘要:AtCoder Beginner Contest 154 https://atcoder.jp/contests/abc154 今天也比较简单。 E - Almost Everywhere Zero 贪心或者数位dp。 (其实我这个贪心应该就是在模拟数位dp) 贪心 #include <bits/s
阅读全文
摘要:AtCoder Beginner Contest 152 https://atcoder.jp/contests/abc152 F我看了半天,编码方式那里还算是感觉比较玄乎,这题确实妙。 D - Handstand 2 只需记录两端数字即可,不要想太复杂。 #include <bits/stdc++
阅读全文
摘要:AtCoder Beginner Contest 151 https://atcoder.jp/contests/abc151 这一套质量一般 E - Max-Min Sums 组合数学 #include <bits/stdc++.h> #define ll long long using name
阅读全文
摘要:AtCoder Beginner Contest 150 https://atcoder.jp/contests/abc150 def都蛮不错的 D - Semi Common Multiple 先推一下:$x=a_i\times(p+0.5)\rightarrow x=\frac{a_i}2(2p
阅读全文
摘要:AtCoder Beginner Contest 145 https://atcoder.jp/contests/abc145 D - Knight 乍一看以为是dp,但是数据范围不允许。 仔细一看发现,两种操作的次数是固定的,可以枚举出来每种操作分别进行了多少次,如 走了
阅读全文
摘要:AtCoder Beginner Contest 132 https://atcoder.jp/contests/abc132 持续被暴打的一天,因为晚上要打cf,所以明天再来写总结。悲 ct就是菜鸟newbie😫 A - Fifty-Fifty #include <bits/stdc++.h>
阅读全文
摘要:AtCoder Beginner Contest 127 https://atcoder.jp/contests/abc127/tasks 4/6: ABCD A - Ferris Wheel 水题 #include <bits/stdc++.h> using namespace std; int
阅读全文
摘要:AtCoder Beginner Contest 262 A-F https://atcoder.jp/contests/abc262 我太懒了,现在才发 A - World Cup 题意 给定y,找到>=y的离y最近的模4等于2的数 分析 如题 Code #include <bits/stdc++
阅读全文