03 2021 档案
摘要:题目链接:http://poj.org/problem?id=2255 递归经典习题。具体见代码: #include <iostream> #include <cstring> using namespace std; char a[111], b[111]; void dfs(int L1, in
阅读全文
摘要:题目链接:https://www.luogu.com.cn/problem/P1406 解题思路: 搜索。但是要注意搜索过程中的剪枝,比如一行拼完了之后要检查这一行,最后一行的每一列拼完了之后要检查每一列。然后就是最终要检查两条对角线。每一条线上 个数之和为所有数之和除以 。
阅读全文
摘要:题目链接:https://www.luogu.com.cn/problem/P6218 题目大意: 求 范围内有多少数满足二进制表示中的 的数量大于等于 的数量。 解题思路: 数位DP,定义状态 表示: 当前在第
阅读全文
摘要:示例程序: #include <stdio.h> #include <math.h> #define EPSILON 1e-6 double f(double x) { return 2 * pow(x, 3) - 4 * pow(x, 2) + 3 * x - 6; } double f_prim
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc049 A - UOIAUAI 题目大意: 判断一个字符是不是元音字母。 示例程序: #include <bits/stdc++.h> using namespace std; int main() { char c = get
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc048 A - AtCoder *** Contest 题目大意: 输入三个字符串,输出 'A' + 第二个字符串的首字母 + 'C'。 示例程序: #include <bits/stdc++.h> using namespac
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc047 A - Fighting over Candies 题目大意: 三个数,问其中两个数之和能否等于剩下那个数。 示例程序: #include <bits/stdc++.h> using namespace std; int
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc046 A - AtCoDeer and Paint Cans 题目大意: 问 个数中有多少个不同的数。 解题思路: 很多种解法,我是把数放到 set 里面去的。 示例程序: #include <bits/stdc+
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc045 A - Trapezoids 题目大意: 告诉你题型的上底、下底、高,求面积。 解题思路: 示例程序: #include <bits/stdc++.h> u
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc044 A - Tak and Hotels (ABC Edit) 题目大意: 住 天旅馆,前 天每晚 元,接下来每晚 元。问:一共花多少钱? 解题思路: 直接一个if判断即可。
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc043 A - Children and Candies (ABC Edit) 题目大意: 求 。 答案:。 示例程序: #include <
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc042 A - Iroha and Haiku (ABC Edition) 题目大意: 给你三个数,判断能否组成一个 的排列。 示例程序: #include <bits/stdc++.h> using nam
阅读全文