随笔分类 -  atcoder

摘要:比赛链接:https://atcoder.jp/contests/abc222/tasks A - Four Digits 题意 给出一个整数 \(n\) ,以宽度为 4 补前导 0 的格式输出。 \(0 \le n \le 9999\) 题解 即 printf("%04d", n) 。 代码 #i 阅读全文
posted @ 2021-10-13 18:50 Kanoon 阅读(244) 评论(0) 推荐(0)
摘要:比赛链接:https://atcoder.jp/contests/abc221/tasks A - Seismic magnitude scales 题意 给出两个正整数 \(a, b\) ,计算 \(32^{a - b}\) 。 \(3 \le b \le a \le 9\) 题解 \(32^{a 阅读全文
posted @ 2021-10-08 17:00 Kanoon 阅读(352) 评论(0) 推荐(0)
摘要:比赛链接:https://atcoder.jp/contests/abc220/tasks A - Find Multiple 题意 判断 \([a, b]\) 中是否有 \(c\) 的倍数。 \(1 \le a \le b \le 1000\) \(1 \le c \le 1000\) 题解 模拟 阅读全文
posted @ 2021-09-27 18:40 Kanoon 阅读(228) 评论(0) 推荐(0)
摘要:比赛链接:https://atcoder.jp/contests/abc219/tasks A - AtCoder Quiz 2 题意 给出一个分数 \(x\) ,共分为四级: \(0 \le x \lt 40\) \(40 \le x \lt 70\) \(70 \le x \lt 90\) \( 阅读全文
posted @ 2021-09-19 17:30 Kanoon 阅读(402) 评论(0) 推荐(1)
摘要:比赛链接:https://atcoder.jp/contests/abc218/tasks A - Weather Forecast 题意 判断一个字符串的第 \(n\) 个字符是否为 o 。 题解 模拟。 代码 #include <bits/stdc++.h> using namespace st 阅读全文
posted @ 2021-09-13 16:15 Kanoon 阅读(292) 评论(2) 推荐(0)
摘要:比赛链接:https://atcoder.jp/contests/abc217/tasks A - Lexicographic Order 题意 给出两个字符串 \(s,t\) ,若 \(s\) 字典序小于 \(t\) 输出 Yes ,否则输出 No 。 题解 模拟。 代码 #include <bi 阅读全文
posted @ 2021-09-06 18:30 Kanoon 阅读(188) 评论(0) 推荐(0)
摘要:比赛链接:https://atcoder.jp/contests/abc216/tasks A - Signed Difficulty 题意 给出一个 x.y 形式的实数,按以下格式转换: \(0 \le y \le 2\) ,输出 x- \(3 \le y \le 6\) ,输出 x \(7 \l 阅读全文
posted @ 2021-08-30 23:30 Kanoon 阅读(209) 评论(2) 推荐(2)
摘要:比赛链接:https://atcoder.jp/contests/abc215/tasks A - Your First Judge 题意 如果一个字符串是 Hello,World! ,输出 AC ,否则输出 WA 。 题解 模拟。 代码 #include <bits/stdc++.h> using 阅读全文
posted @ 2021-08-22 01:15 Kanoon 阅读(184) 评论(2) 推荐(0)
摘要:比赛链接:https://atcoder.jp/contests/abc213/tasks A - Bitwise Exclusive Or 题意 给出两个值在 \([0, 255]\) 间的数 \(a,b\) ,找到一个非负数 \(c\) 使得 \(a \oplus c = b\) 。 题解 由异 阅读全文
posted @ 2021-08-08 22:00 Kanoon 阅读(175) 评论(0) 推荐(0)
摘要:比赛链接:https://atcoder.jp/contests/abc212/tasks A - Alloy 代码 #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin 阅读全文
posted @ 2021-08-01 01:16 Kanoon 阅读(136) 评论(3) 推荐(0)
摘要:比赛链接:https://atcoder.jp/contests/abc205 A - kcal #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullp 阅读全文
posted @ 2021-06-17 22:00 Kanoon 阅读(139) 评论(0) 推荐(0)
摘要:比赛链接:https://atcoder.jp/contests/abc203/tasks A - Chinchirorin 题意 给出三个数,如果有两个数相同,输出剩下的那个数。 题解 模拟。 代码 #include <bits/stdc++.h> using namespace std; int 阅读全文
posted @ 2021-06-01 18:01 Kanoon 阅读(299) 评论(0) 推荐(0)
摘要:比赛链接:https://atcoder.jp/contests/abc202/tasks A - Three Dice #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); c 阅读全文
posted @ 2021-05-25 17:20 Kanoon 阅读(140) 评论(0) 推荐(0)
摘要:题目链接:https://atcoder.jp/contests/abc200/tasks/abc200_e E - Patisserie ABC 2 题意 \(n^3\) 个三元组 \((x,y,z)\ (1 \le x,y,z \le n)\) 按照以下三个关键字从小到大排序: \(x + y 阅读全文
posted @ 2021-05-11 18:30 Kanoon 阅读(205) 评论(0) 推荐(0)
摘要:第二次ak,纪念一下。 比赛链接:https://atcoder.jp/contests/abc183/tasks A - ReLU 题解 模拟。 代码 #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with 阅读全文
posted @ 2020-11-15 23:30 Kanoon 阅读(263) 评论(0) 推荐(1)
摘要:比赛链接:https://atcoder.jp/contests/hhkb2020/tasks #A - Keyboard ##代码 #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(fal 阅读全文
posted @ 2020-10-10 22:30 Kanoon 阅读(301) 评论(0) 推荐(0)
摘要:比赛链接:https://atcoder.jp/contests/abc179/tasks A - Plural Form 题意 给出一个由小写字母组成的单词,如果单词以 $s$ 结尾,在单词的末尾加上 $es$,否则在单词的末尾加上 $s$ 。 代码 #include <bits/stdc++.h 阅读全文
posted @ 2020-09-20 21:00 Kanoon 阅读(365) 评论(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 阅读(407) 评论(0) 推荐(1)
摘要:比赛链接:https://atcoder.jp/contests/abc177/tasks A - Don't be late #include <bits/stdc++.h> using namespace std; int main() { int d, t, s; cin >> d >> t 阅读全文
posted @ 2020-08-29 21:40 Kanoon 阅读(375) 评论(0) 推荐(0)
摘要:比赛链接:https://atcoder.jp/contests/abc176 A - Takoyaki #include <bits/stdc++.h> using namespace std; int main() { int n, x, t; cin >> n >> x >> t; cout 阅读全文
posted @ 2020-08-28 00:00 Kanoon 阅读(305) 评论(0) 推荐(0)