上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 57 下一页
摘要: 题目链接:https://www.luogu.com.cn/problem/P6218 题目大意: 求 \([l,r]\) 范围内有多少数满足二进制表示中的 \(0\) 的数量大于等于 \(1\) 的数量。 解题思路: 数位DP,定义状态 \(f[p][z][x]\) 表示: 当前在第 \(p\) 阅读全文
posted @ 2021-03-17 16:27 quanjun 阅读(91) 评论(0) 推荐(0)
摘要: 示例程序: #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 阅读全文
posted @ 2021-03-16 07:34 quanjun 阅读(538) 评论(0) 推荐(0)
摘要: 比赛链接:https://atcoder.jp/contests/abc049 A - UOIAUAI 题目大意: 判断一个字符是不是元音字母。 示例程序: #include <bits/stdc++.h> using namespace std; int main() { char c = get 阅读全文
posted @ 2021-03-05 13:31 quanjun 阅读(172) 评论(0) 推荐(0)
摘要: 比赛链接:https://atcoder.jp/contests/abc048 A - AtCoder *** Contest 题目大意: 输入三个字符串,输出 'A' + 第二个字符串的首字母 + 'C'。 示例程序: #include <bits/stdc++.h> using namespac 阅读全文
posted @ 2021-03-04 16:01 quanjun 阅读(111) 评论(0) 推荐(0)
摘要: 比赛链接:https://atcoder.jp/contests/abc047 A - Fighting over Candies 题目大意: 三个数,问其中两个数之和能否等于剩下那个数。 示例程序: #include <bits/stdc++.h> using namespace std; int 阅读全文
posted @ 2021-03-03 14:54 quanjun 阅读(135) 评论(0) 推荐(0)
摘要: 比赛链接:https://atcoder.jp/contests/abc046 A - AtCoDeer and Paint Cans 题目大意: 问 \(3\) 个数中有多少个不同的数。 解题思路: 很多种解法,我是把数放到 set 里面去的。 示例程序: #include <bits/stdc+ 阅读全文
posted @ 2021-03-03 13:38 quanjun 阅读(264) 评论(0) 推荐(0)
摘要: 比赛链接:https://atcoder.jp/contests/abc045 A - Trapezoids 题目大意: 告诉你题型的上底、下底、高,求面积。 解题思路: \(S = \frac{(a+b) \cdot h}{2}\) 示例程序: #include <bits/stdc++.h> u 阅读全文
posted @ 2021-03-03 11:51 quanjun 阅读(172) 评论(0) 推荐(0)
摘要: 比赛链接:https://atcoder.jp/contests/abc044 A - Tak and Hotels (ABC Edit) 题目大意: 住 \(N\) 天旅馆,前 \(K\) 天每晚 \(X\) 元,接下来每晚 \(Y\) 元。问:一共花多少钱? 解题思路: 直接一个if判断即可。 阅读全文
posted @ 2021-03-02 21:02 quanjun 阅读(145) 评论(0) 推荐(0)
摘要: 比赛链接:https://atcoder.jp/contests/abc043 A - Children and Candies (ABC Edit) 题目大意: 求 \(1+2+\ldots+n\)。 答案:\(\frac{n \cdot (n+1)}{2}\)。 示例程序: #include < 阅读全文
posted @ 2021-03-02 17:04 quanjun 阅读(115) 评论(0) 推荐(0)
摘要: 比赛链接:https://atcoder.jp/contests/abc042 A - Iroha and Haiku (ABC Edition) 题目大意: 给你三个数,判断能否组成一个 \(5,7,5\) 的排列。 示例程序: #include <bits/stdc++.h> using nam 阅读全文
posted @ 2021-03-02 14:04 quanjun 阅读(159) 评论(0) 推荐(0)
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 57 下一页