随笔分类 - AtCoder
摘要:# A - Non-Adjacent Flip https://atcoder.jp/contests/arc156/tasks/arc156_a ## 题意 给定一个01串,每次可以把不相邻的两个字符进行翻转,问最少要操作多少次使得全部变为0,无解输出-1。 ## 分析 记录 的数量为 $
阅读全文
摘要:# AtCoder Beginner Contest 165 https://atcoder.jp/contests/abc165 ## C - Many Requirements dfs ```CC #include using namespace std; const int N = 15, M
阅读全文
摘要:# AtCoder Beginner Contest 162 ABCD全暴力 E数学题看不懂,感性理解 F线性dp,非常基础我不会,寄 ## E - Sum of gcd of Tuples (Hard) 看了题解发现好多做法都是推一堆式子,我实在看不懂(卷积莫反啥啥的呜呜呜) 然后看见这个感觉比较
阅读全文
摘要:# AtCoder Beginner Contest 161 https://atcoder.jp/contests/abc161 这套不算难,但是sb我还是写不出来是为什么呢 F是个妙妙题 ## C - Replacing Integer WA了一次所以放上来 ```CC #include #de
阅读全文
摘要:AtCoder Beginner Contest 159 https://atcoder.jp/contests/abc159 EF 是打基础的好题 D - Banned K #include <bits/stdc++.h> #define ll long long using namespace
阅读全文
摘要:AtCoder Beginner Contest 158 https://atcoder.jp/contests/abc158 基础不牢,地动山摇 D - String Formation 一个小小的STL应用 #include <bits/stdc++.h> #define ll long lon
阅读全文
摘要:AtCoder Beginner Contest 155 https://atcoder.jp/contests/abc155 D - Pairs 这个二分好难写,疯狂WA,QAQ #include <bits/stdc++.h> #define ll long long using namespa
阅读全文
摘要: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 144 https://atcoder.jp/contests/abc144 补一下3.23做的。 D - Water Bottle 分类讨论,三角函数。 #include <bits/stdc++.h> #define pi acos (-1) u
阅读全文
摘要:AtCoder Beginner Contest 153 https://atcoder.jp/contests/abc153 这套比较简单。 E - Crested Ibis vs Monster 完全背包 #include <bits/stdc++.h> #define ll long long
阅读全文
摘要: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 149 https://atcoder.jp/contests/abc149 D - Prediction and Restriction 读题的锅!!没说输了要扣分!!! 两种做法。 贪心 对于相同格子 采取赢,平
阅读全文
摘要:AtCoder Beginner Contest 145 https://atcoder.jp/contests/abc145 D - Knight 乍一看以为是dp,但是数据范围不允许。 仔细一看发现,两种操作的次数是固定的,可以枚举出来每种操作分别进行了多少次,如 走了
阅读全文
摘要:AtCoder Beginner Contest 148 https://atcoder.jp/contests/abc148 这场比较简单 D - Brick Break 二分 or LIS #include <bits/stdc++.h> #define ll long long using n
阅读全文
摘要:AtCoder Beginner Contest 147 https://atcoder.jp/contests/abc147 C - HonestOrUnkind2 推理题,爆搜。好那好难,一直不知道怎么下手 #include <bits/stdc++.h> using namespace std
阅读全文
摘要:AtCoder Beginner Contest 146 https://atcoder.jp/contests/abc146 C - Buy an Integer 这个O(1)推式子的做法不知道为什么WA:https://atcoder.jp/contests/abc146/submissions
阅读全文
摘要:AtCoder Beginner Contest 141 https://atcoder.jp/contests/abc141 D - Powerful Discount Tickets 贪心 + 堆 #include <bits/stdc++.h> #define ll long long usi
阅读全文