随笔分类 - atcoder
摘要:第一次 ak ABC,纪念一下。 比赛链接:https://atcoder.jp/contests/abc174 A - Air Conditioner #include <bits/stdc++.h> using namespace std; int main() { int n; cin >>
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc173/tasks A - Payment 题意 计算只用 $1000$ 元支付某个价格 $n$ 的找零是多少。 代码 #include <bits/stdc++.h> using namespace std; int main
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc152/tasks A - AC or WA 题意 有 $n$ 个测试样例,通过了 $m$ 个,判断是否 AC 。 代码 #include <bits/stdc++.h> using namespace std; int mai
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc172/tasks A - Calc 题意 给出一个正整数 $a$,计算 $a + a^2 + a^3$ 。($1 \le a \le 10$) 代码 #include <bits/stdc++.h> using namespa
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc171/tasks A - αlphabet 题意 给出一个字母,如果为大写输出 'A',如果为小写输出 'a' 。 代码 #include <bits/stdc++.h> using namespace std; int ma
阅读全文
摘要:打怪兽专场:https://atcoder.jp/contests/abc153 下文中出现的怪兽被杀死指生命值降至 $0$ 或以下。 A - Serval vs Monster 题意 怪兽生命值为 $h$,每次攻击伤害为 $a$,问怪兽被杀死至少需要攻击多少次。 题解 即计算 $\lceil \f
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc170 A - Five Variables 题意 $5$ 个数中有 $1$ 个 $0$,判断是第几个。 代码 #include <bits/stdc++.h> using namespace std; int main() {
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc169/tasks A - Multiplication 1 #include <bits/stdc++.h> using namespace std; int main() { int a, b; cin >> a >> b;
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc154/tasks A - Remaining Balls 题意 字符串 $s$、$t$ 分别有 $a$、$b$ 个,与字符串 $u$ 相等的字符串个数减一。 代码 #include <bits/stdc++.h> using
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc155/tasks A - Poor 题意 判断三个数中是否有两者相等且不等于第三者。 代码 #include <bits/stdc++.h> using namespace std; int main() { map<int,
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc156 A - Beginner 题意 如果 $n<10$,输出 $r+100\times(10-n)$,否则输出 $r$ 。 代码 #include <bits/stdc++.h> using namespace std; i
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc157 A - Duplex Printing 题意 计算 $n$ 页的文档双面打印要用多少张纸。 题解 答案即 $\lceil \frac{n}{2} \rceil$ 。 代码 #include <bits/stdc++.h>
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc168/tasks A - ∴ (Therefore) 题意 给出一个由数字组成的字符串 $s$,要求如下: 如果 $s$ 以 2,4,5,7,9 结尾,输出 "hon" 如果 $s$ 以 0,1,6,8 结尾,输出 "pon"
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc167/tasks A - Registration 题意 字符串 t 比字符串 s 长 1,除此外其余部分是否与 s 相同。 代码 #include <bits/stdc++.h> using namespace std; i
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc158/tasks A - Station and Bus 题意 给出一个由 'A','B' 组成的长为 3 的字符串,判断串中是否有 'A','B' 相邻。 代码 #include <bits/stdc++.h> using
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc166/tasks A - A?C 题意 AtCoder 会轮流举行 ABC,ARC 两种类型的比赛,已知上一次举行的比赛类型,问这一次会举行哪一种比赛。 代码 #include <bits/stdc++.h> using na
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc165/tasks A - We Love Golf 题意 区间 $[a, b]$ 中是否存在 $k$ 的倍数。 代码 #include <bits/stdc++.h> using namespace std; int main
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc164 A - Sheep and Wolves #include <bits/stdc++.h> using namespace std; int main() { int s, w; cin >> s >> w; cout
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc163/tasks A - Circle Pond 题意 由半径输出圆周长。 代码 #include <bits/stdc++.h> using namespace std; int main() { double r; cin
阅读全文
摘要:比赛链接:https://atcoder.jp/contests/abc162/tasks A - Lucky 7 #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << (to_stri
阅读全文

浙公网安备 33010602011771号