上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 23 下一页
摘要: 比赛链接:https://ac.nowcoder.com/acm/contest/7412 A - 牛牛和牛可乐的赌约 题解 计算模意义下的 $1 - \frac{1}{n^m}$ 即可。 代码 #include <bits/stdc++.h> using namespace std; const 阅读全文
posted @ 2020-09-20 23:30 Kanoon 阅读(271) 评论(0) 推荐(2) 编辑
摘要: 比赛链接:https://atcoder.jp/contests/abc179/tasks A - Plural Form 题意 给出一个由小写字母组成的单词,如果单词以 $s$ 结尾,在单词的末尾加上 $es$,否则在单词的末尾加上 $s$ 。 代码 #include <bits/stdc++.h 阅读全文
posted @ 2020-09-20 21:00 Kanoon 阅读(335) 评论(0) 推荐(0) 编辑
摘要: 比赛链接:https://atcoder.jp/contests/abc178/tasks A - not 题意 给出一个整数 $0 \le x \le 1$,如果 $x$ 是 $0$ 就输出 $1$,如果 $x$ 是 $1$ 就输出 $0$ 。 题解 输出 $x \oplus 1$ 或 $!x$ 阅读全文
posted @ 2020-09-14 15:00 Kanoon 阅读(365) 评论(0) 推荐(1) 编辑
摘要: 比赛链接:https://codeforces.com/contest/1405 A. Permutation Forgery 题意 给出一个大小为 $n$ 的排列 $p$,定义 \begin{equation} F(p)=\mathrm{sort}([p_1+p_2,p_2+p_3,\ldots, 阅读全文
posted @ 2020-09-12 19:05 Kanoon 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://lx.lanqiao.cn/problemset.page?code=BASIC BASIC-1 闰年判断 题解 模拟。 代码 #include <bits/stdc++.h> using namespace std; int main() { int y; cin >> y 阅读全文
posted @ 2020-09-11 23:26 Kanoon 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://lx.lanqiao.cn/problemset.page?code=BEGIN BEGIN-1 A+B问题 #include <bits/stdc++.h> using namespace std; int main() { int a, b; cin >> a >> b; 阅读全文
posted @ 2020-09-11 23:17 Kanoon 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 比赛链接:https://pintia.cn/market/item/1302816969611366400 7-1 多二了一点 (15分) 题解 模拟。 代码 #include <bits/stdc++.h> using namespace std; int sum(string s) { int 阅读全文
posted @ 2020-09-08 17:40 Kanoon 阅读(764) 评论(7) 推荐(0) 编辑
摘要: 比赛链接:https://codeforces.com/contest/1409 A. Yet Another Two Integers Problem 题意 给出两个数 $a$ 和 $b$,有以下两种操作: $a+=k$ $a-=k$ $k \in [1, 10]$ 问将 $a$ 变为 $b$ 最 阅读全文
posted @ 2020-09-06 00:00 Kanoon 阅读(221) 评论(0) 推荐(1) 编辑
摘要: 比赛链接:https://codeforces.com/contest/1400 A. String Similarity 题意 给出一个长 $2n-1$ 的二进制串 $s$,构造一个长 $n$ 的字符串,使其与 $s$ 的每个长 $n$ 的子串至少有一处字母相等。 题解 长 $n$ 的子串恰有 $ 阅读全文
posted @ 2020-09-03 00:15 Kanoon 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 比赛链接:https://codeforces.com/contest/1397 A. Juggling Letters 题意 给出 $n$ 个字符串,可在字符串间任意移动字母,问最终能否使这 $n$ 个字符串相同。 题解 如果可以,因为 $n$ 个字符串相同,所以每个字母的数量一定是 $n$ 的倍 阅读全文
posted @ 2020-09-01 21:40 Kanoon 阅读(213) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 23 下一页