板刷atcoder vp

AtCoder Beginner Contest 145

AtCoder Beginner Contest 145 https://atcoder.jp/contests/abc145 D - Knight 乍一看以为是dp,但是数据范围不允许。 仔细一看发现,两种操作的次数是固定的,可以枚举出来每种操作分别进行了多少次,如 $(1,2)$ 走了 $a$ ......
Beginner AtCoder Contest 145

AtCoder Beginner Contest 148

AtCoder Beginner Contest 148 https://atcoder.jp/contests/abc148 这场比较简单 D - Brick Break 二分 or LIS #include <bits/stdc++.h> #define ll long long using n ......
Beginner AtCoder Contest 148

【题解】Atcoder ABC295 A-G

A.Probably English 题目分析: 直接每一个单词判一下就好了。 代码: 点击查看代码 #include<bits/stdc++.h> using namespace std; int main(){ int n;scanf("%d",&n); bool flag = false; f ......
题解 Atcoder ABC 295 A-G

Edu Round 板刷计划 3. Educational Codeforces Round 3 题解

Change Log: 2023.03.27 开坑. A - USB Flash Drives 弱智题. 将 $a_i$ 从大到小排序,然后枚举贪心地取即可. 时间复杂度 $O(n\log n)$. 随便过. Sample submission. ......
板刷 题解 Round Educational Codeforces

AtCoder Beginner Contest 147

AtCoder Beginner Contest 147 https://atcoder.jp/contests/abc147 C - HonestOrUnkind2 推理题,爆搜。好那好难,一直不知道怎么下手 #include <bits/stdc++.h> using namespace std ......
Beginner AtCoder Contest 147

[ABC294] vp 题解 [E~G]

[ABC294] vp 题解 A B C D 略 E - 2xN Grid 双指针模拟 考虑 $L$ 太大了,无法直接把压缩后的表示法展开,那么我们直接一块一块地考虑即可。 用两个指针 $i, j$ 表示当前走到了哪一格(解压后),分类讨论。 $i > j$,将第二行往后拓展一块,判断第一行当前块 ......
题解 ABC 294 vp

AtCoder Beginner Contest 295 A-D题解

比赛地址 A.Probably English 1 void solve() 2 { 3 int n;cin>>n; 4 set<string>st; 5 st.insert("and"); 6 st.insert("not"); 7 st.insert("that"); 8 st.insert(" ......
题解 Beginner AtCoder Contest 295

AtCoder Beginner Contest 146

AtCoder Beginner Contest 146 https://atcoder.jp/contests/abc146 C - Buy an Integer 这个O(1)推式子的做法不知道为什么WA:https://atcoder.jp/contests/abc146/submissions ......
Beginner AtCoder Contest 146

AtCoder Beginner Contest 248 F(连通性状压dp)

F 连通性状压dp 思路 看了dls的讲解后才明白一点点。 状态$dp[i][j][k]$表示到表示到i列,删除了j条边,点i和n-1+i是否联通,对于下一列点, 若当前i和n-1+i连通,则多出来的三条边连任意两条,使得下一列点i+1和n+i连通,否则下一列点不连通。 若当前点i和n-1+i不连通 ......
性状 Beginner AtCoder Contest 248

AtCoder Educational DP Contest

1.A 没什么难度,直接算就可以了。 点击查看代码 #include<bits/stdc++.h> #define int long long #define Yes printf("Yes\n") #define No printf("No\n") #define YES printf("YES\ ......
Educational AtCoder Contest DP

AtCoder Grand Contest 019 F Yes or No

洛谷传送门 AtCoder 传送门 首先容易发现最优策略是回答剩余多的选项。设 $n$ 为剩余 Yes 的数量,$m$ 为剩余 No 的数量,考虑将 $(n,m)$ 放到平面上,若 $n > m$ 则回答 Yes 并向左走,$n < m$ 则回答 No 并向下走,$n=m$ 则随意。 如果按照这样的 ......
AtCoder Contest Grand 019 Yes

AtCoder Grand Contest 008 F Black Radius

洛谷传送门 AtCoder 传送门 神题!!!!111 考虑如何不重不漏地计数。先考虑全为 1 的情况,令 $f(u,d)$ 为与 $u$ 的距离 $\le d$ 的点集。 首先单独算全集,那么对于不是全集的集合就会有一些比较好的性质。 考虑若有若干个 $f(u,d)$ 同构,那 只在 $d$ 最小 ......
AtCoder Contest Radius Grand Black

Edu Round 板刷计划 2. Educational Codeforces Round 2 题解

Change Log: 2023.03.22 开坑. A - Extract Numbers ......
板刷 题解 Round Educational Codeforces

AtCoder Beginner Contest 246

AtCoder Beginner Contest 246 D 题意 求一个$x\geq n$ 使得$x=a^3+a^2b+ab^2+b^3$且$n\leq10^{18}$ 思路 变形 $x=(a+b)(a^2+b^2)$ ,那么a、b的范围在1e6 从大到小枚举每个a,那么每个符合情况的b的最小值一 ......
Beginner AtCoder Contest 246

[AtCoder] B - Counting Grids

The key observation is that there is always at most 1 cell that violates both conditions. Proof: if x violates both conditions, that means all other n ......
Counting AtCoder Grids

Edu Round 板刷计划 1. Educational Codeforces Round 1 题解

Change Log: 2023.03.21 开坑. A - Tricky Sum 简单题. 注意到 $n$ 以内 $2$ 的幂次只有 $O(\log n)$ 个,因此只要先算出 $1$ ~ $n$ 里所有数的和再减去 $2$ 的幂次的和的 $2$ 倍即可. 时间复杂度 $O(t\log n)$. ......
板刷 题解 Round Educational Codeforces

AtCoder Beginner Contest 141

AtCoder Beginner Contest 141 D - Powerful Discount Tickets 贪心 + 堆 #include <bits/stdc++.h> #define ll long long using namespace std; const int N = 1e5 ......
Beginner AtCoder Contest 141

AtCoder Beginner Contest 294

题解报告 基本的一些理解和问题都在注释中 A:Filter //水题 #include <cstdio> #include <algorithm> #include <cstring> #include <iostream> using namespace std; int main(void) { ......
Beginner AtCoder Contest 294
共798篇  :27/27页 首页上一页27下一页尾页