上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 26 下一页
摘要: AtCoder Beginner Contest 144 https://atcoder.jp/contests/abc144 补一下3.23做的。 D - Water Bottle 分类讨论,三角函数。 #include <bits/stdc++.h> #define pi acos (-1) u 阅读全文
posted @ 2023-04-02 18:49 Sakana~ 阅读(15) 评论(0) 推荐(0) 编辑
摘要: AtCoder Beginner Contest 153 https://atcoder.jp/contests/abc153 这套比较简单。 E - Crested Ibis vs Monster 完全背包 #include <bits/stdc++.h> #define ll long long 阅读全文
posted @ 2023-04-02 10:59 Sakana~ 阅读(12) 评论(0) 推荐(0) 编辑
摘要: AtCoder Beginner Contest 152 https://atcoder.jp/contests/abc152 F我看了半天,编码方式那里还算是感觉比较玄乎,这题确实妙。 D - Handstand 2 只需记录两端数字即可,不要想太复杂。 #include <bits/stdc++ 阅读全文
posted @ 2023-04-01 20:50 Sakana~ 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 目前只有非常少的一部分,正在逐渐完善中... # 基础 ## 归并排序求逆序对 ```CC int merge_sort (int l, int r) { if (l >= r) return 0; int mid = l + r >> 1; int res = merge_sort (l, mid 阅读全文
posted @ 2023-04-01 18:12 Sakana~ 阅读(145) 评论(4) 推荐(0) 编辑
摘要: 【算法专题】容斥原理 这类题主要是从反方向(所求=全集-补集)去思考,枚举补集的子集,复杂度一般为 $O(2^n)$ 适用 $n=20$ 左右。 题 E. Devu and Flowers https://codeforces.com/contest/451/problem/E 前置知识:隔板法 然 阅读全文
posted @ 2023-04-01 17:03 Sakana~ 阅读(44) 评论(0) 推荐(0) 编辑
摘要: AtCoder Beginner Contest 151 https://atcoder.jp/contests/abc151 这一套质量一般 E - Max-Min Sums 组合数学 #include <bits/stdc++.h> #define ll long long using name 阅读全文
posted @ 2023-03-31 19:27 Sakana~ 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2023-03-31 15:40 Sakana~ 阅读(30) 评论(0) 推荐(0) 编辑
摘要: AtCoder Beginner Contest 149 https://atcoder.jp/contests/abc149 D - Prediction and Restriction 读题的锅!!没说输了要扣分!!! 两种做法。 贪心 对于相同格子 $i,i+k,i+2k,...$ 采取赢,平 阅读全文
posted @ 2023-03-30 13:46 Sakana~ 阅读(41) 评论(0) 推荐(0) 编辑
摘要: AtCoder Beginner Contest 145 https://atcoder.jp/contests/abc145 D - Knight 乍一看以为是dp,但是数据范围不允许。 仔细一看发现,两种操作的次数是固定的,可以枚举出来每种操作分别进行了多少次,如 $(1,2)$ 走了 $a$ 阅读全文
posted @ 2023-03-28 12:59 Sakana~ 阅读(27) 评论(0) 推荐(0) 编辑
摘要: AtCoder Beginner Contest 148 https://atcoder.jp/contests/abc148 这场比较简单 D - Brick Break 二分 or LIS #include <bits/stdc++.h> #define ll long long using n 阅读全文
posted @ 2023-03-28 12:30 Sakana~ 阅读(17) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 26 下一页