Atcoder Beginner Contest 450题解
Atcoder Beginner Contest 449
A:3,2,1,GO
直接按题意输出即可。
Code:
123456789101112131415#include<bits/stdc++.h>using namespace std;#define int long longint n;signed main(){ cin>>n; for(int i=n;i>=1;i--) { if(i!=1) cout<<i<<","; else cout<<i; } return 0;}
B:Split
Ticketing
输入的时候注意不要输入i = 0的情况,随后按题意枚举即可(记得从西向东,因此吃了罚时)。
123456789101112131415161718192021222324252627282930#include<bits/stdc++.h>using namespace std;#define int long l...
Atcoder Beginner Contest 449题解
Atcoder Beginner Contest 449
A:π
直接输出
Code:
12345678910111213#include<bits/stdc++.h>using namespace std;#define int long longconst int maxn=100002;double n;double pi=3.141592653589793;signed main(){ scanf("%lf",&n); n/=2; printf("%lf",pi*n*n); return 0;}
B:Deconstruct
Chocolate
观察可知巧克力块永远保持矩形的形状,故只需要定义两个变量维护矩形的长宽即可。
Code:
123456789101112131415161718192021222324252627#include<bits/stdc++.h>using namespace std;#define int long longconst int maxn=1002;int h,w,q,op,tmp;i...
Atcoder Beginner Contest 448题解
Atcoder Beginner Contest 448
该题解即将成为本博客的第一篇文章,应值得纪念。
不论是代码/算法能力的不足,或是秉持着开源的精神,我的ABC题解写作工作从现在算是正式开始了。我会尽量做到不缺席每周的ABC以及补全能力之内的题,且在周末更新题解。私以为想提高算法能力,不论是为了面试或是其他,Atcoder
Beginner
Contest会是对初学者/有些许基础的学习者一个很好的帮助。其在每场都会有套路模板题的情况下,也会出一些类“脑筋急转弯”的题锻炼思维。它既可以帮到LeetCode选手去补足练习纯面试题时练不到的思维能力,也为新手在Codeforces上练习觉得自己“学到的模板算法没有用”时,提供了一定的正反馈。在我记录/学习/巩固的过程中,若能有机会帮到和我一样在尝试进步的普通人,那再好不过。另:由于算法领域大神云云,而我水平远远未到,题解的写作难免出现纰漏,若有说的不清楚之处,还请大家感性理解qwq。
A:chmin
直接模拟,复杂度。
Code:
1234567891011121314151617#include<bits/...
Hello World
Welcome to Hexo! This is your very
first post. Check documentation for
more info. If you get any problems when using Hexo, you can find the
answer in troubleshooting or
you can ask me on GitHub.
Quick Start
Create a new post
1$ hexo new "My New Post"
More info: Writing
Run server
1$ hexo server
More info: Server
Generate static files
1$ hexo generate
More info: Generating
Deploy to remote sites
1$ hexo deploy
More info: Deployment
