AtCoder 先生创建了一个由N个小灯泡(从左到右排列成一排)和两个开关 A 和 B 组成的装置:0"(关)和 "1"(开)。按下每个开关会产生以下结果: 按下开关 A 会将最左边处于 "0 "状态的灯泡变成 "1"。 按下开关 B 会将处于 "1 "状态的最左边灯泡变为 "0"。 如果没有适用的灯泡,则无法按下开关。 ...
AtCoder题解—— AtCoder Beginner Contest 177 —— D - Friends 题目相关 题目链接 AtCoder Beginner Contest 177 D 题,https://atcoder.jp/contests/abc177/tasks/abc177_d。 Problem Statement There are N persons called Person 1 through Person N. You are given M facts that "P......
「赛后总结」AtCoder Beginner Contest 177 题意& 题解 A.Don't be late 题意: 给你路程,时间限制,速度,问你能不能在时间限制内走路程那么远。 题解: 数学题?物理题?签到题! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15#include <cstdio> #include <cstring> #include <string> #include <...
思路:由于数据范围比较小,所以暴力即可。数据大的话我们可以考虑KMP算法 代码语言:javascript 代码运行次数:0 运行 AI代码解释 #include<iostream>#include<algorithm>#define inf0x3f3f3f3fusing namespace std;intmain(){string s,t;cin>>s>>t;int lens=s.length();int lent=t.length();int ans=inf;for...
Tasks - AtCoder Beginner Contest 177atcoder.jp/contests/abc177/tasks B: 题意: 给定两个字符串S和T,T最长不超过S的长度,可以改变S的字符使得T成为S的子串,问最小的修改个数。 思路: 最长是1000,可以brute force,怎么暴力求解呢?竟然没有暴力的思路!
return 0; } 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. AtCoder Beginner Contest 177 The desire of his soul is the prophecy of his fate 你灵魂的欲望,是你命运的先知。
If everyone can solve ABCD by simply copy-pasting AI's code, what's the point of having AtCoder Beginner Contests? Why not just delete ABCD and add some new problems to make an AtCoder Regular Contest? You can leave your opinion in the comments....
AtCoder Regular Contest。简称 ARC。 AtCoder Grand Contest。简称 AGC,大师赛。 还会有一些企业竞赛。 已经完成的题目 AtCoder Beginner Contest ABC177 题号题目链接AC参考代码 A题 Don't be late https://atcoder.jp/contests/abc177/tasks/abc177_a https://github.com/zhouyium/AtCoder/blob/master/ABC...
Atcoder Regular Contest 096 D - Sweet Alchemy(贪心+多重背包),洛谷题面传送门&Atcoder题面传送门由于再过1h就是NOI笔试了所以题解写得会略有点简略。考虑差分,记\(b_i=c_i-c_{fa_i}\),那么根据题意有\(b_i\led,i=2,3,4,\cdots,n\),而\(b_1\)则没有任何约束条件。而
178 A - The Contest GNU C11 implementation *1100 Jun/25/2020 15:26 177 A - Prime Minister GNU C11 greedy *800 Jun/25/2020 00:16 176 A - Fox and Number Game GNU C11 greedy math *1000 Jun/24/2020 23:27 175 A - The Way to Home GNU C11 dfs and similar dp greedy implementation...