AtCoder Beginner Contest 187 ABCDE 题解】的更多相关文章

KYOCERA Programming Contest 2021(AtCoder Beginner Contest 200) 题解 哦淦我已经菜到被ABC吊打了. A - Century 首先把当前年份减去\(1\),对应的世纪也减去\(1\),然后我们就发现第\(0\)到\(99\)年对应第\(0\)世纪,第\(100\)到\(199\)年对应第\(1\)世纪,以此类推. 答案就是\(\lfloor \frac {N-1} {100} \rfloor\).这里\(\lfloor x \rflo…
A - Grouping 2 Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement There are N students in a school. We will divide these students into some groups, and in each group they will discuss some themes. You think that groups cons…
比赛传送门 水题大赛? 全是水题啊!!! T1 ABC333 就是判断是不是两个数都是奇数就行了. 代码: #include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; if(a%2&&b%2)cout<<"Yes"; else cout<<"No"; return 0; } T2 Shiritori…
D - Ki 题意:给一棵有根树,节点1为根,有$Q$次操作,每次操作将一个节点及其子树的所有节点的权值加上一个值,问最后每个节点的权值. 思路:dfs序再差分一下就行了. #include <bits/stdc++.h> using namespace std; ; vector<int> G[N]; int dfn[N], id, n, q, last[N], pos[N]; long long val[N], ans[N]; void dfs(int u, int fa) {…
题目链接 点我跳转 题目大意 给你一张完全图,你可以删除任意数量的边 要求删除完后剩余的所有子图必须是完全图 问完全子图数量最少是多少 解题思路 定义 \(ok[i]\) 表示状态为 \(i\) 时所对应的点构成的图是否为完全图 (\(1\) 为是 , \(0\) 为否) 判断完全图可直接暴力枚举任意两点检查是否有边 定义 \(dp[i]\) 表示状态为 \(i\) 时所对应的点构成的所有子图都为完全图,且子图数最小 其中 \(dp[0] = 0\) 那么不难得到当 \(ok[j] = 1\)…
A Large Digits int n; int main() { IOS; int a, b, resa = 0, resb = 0; cin >> a >> b; while(a) resa += a % 10, a /= 10; while(b) resb += b % 10, b /= 10; cout << max(resa, resb) << endl; return 0; } B Gentle Pairs int n; int x[N], y…
人生第一场 AtCoder,纪念一下 话说年后的 AtCoder 比赛怎么这么少啊(大雾 AtCoder Beginner Contest 154 题解 A - Remaining Balls We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one…
目录 AtCoder Beginner Contest 153 题解 A - Serval vs Monster 题意 做法 程序 B - Common Raccoon vs Monster 题意 做法 程序 C - Fennec vs Monster 做法 程序 D - Caracal vs Monster 做法 程序 E - Crested Ibis vs Monster 做法 程序 F - Silver Fox vs Monster 做法 程序 感谢 AtCoder Beginner Co…
AtCoder Beginner Contest 177 题解 目录 AtCoder Beginner Contest 177 题解 A - Don't be late B - Substring C - Sum of product of pairs D - Friends E - Coprime F - I hate Shortest Path Problem A - Don't be late 问你能不能在时间\(T\)内用不高于\(S\)的速度走过\(D\)的路程,转化为判断\(ST\)…
AtCoder Beginner Contest 184 题解 目录 AtCoder Beginner Contest 184 题解 A - Determinant B - Quizzes C - Super Ryuma D - increment of coins E - Third Avenue F - Programming Contest 这把怎么感觉题目都比以往的ABC水啊,拜此所赐我只是程序写得慢就排名狂掉( A - Determinant 求二阶矩阵的行列式,是小学常见自定义题目(…