传送门:https://atcoder.jp/contests/abc153/tasks A 向上取整 cpp #include<bits/stdc++.h>usingnamespacestd;intmain(){inta, b; cin>>a>>b;cout<<(a+b-1)/b;return0;} B 判断全部法术用一次能不能干掉 cpp #include<bits/stdc++.h>usingnamespacestd;intmain(){intk, n; cin>>k>>n;whil...
解法: 按题意模拟,考虑到循环减去时间会较长,故判断奇偶后除求解攻击次数 代码 intmain(){ LL h, a;RD(h, a);if(h%a ==0) cout << h/a <<'\n';elsecout << h/a+1<<'\n'; } B– COMMON RACCOON VS MONSTER 链接: B题 题意: 怪物有H滴血,有N种攻击方式,每种攻击方式能造成ai的伤害...
AtCoder Beginner Contest 153 花式打怪 F题 题目大意: 在一个2D模板游戏中,所有的怪物都是在X轴上的,每个怪物有两个属性X和HP,分别代表怪物的位置和生命值。 玩家控制的角色有一个技能,玩家每次释放技能可以选择一个位置x,技能会对[x - d, x + d]范围内的所有怪物造成a点伤害,请问,玩家最少需要使用多少...
AtCoder Beginner Contest 153 E.Crested Ibis vs Monster Problem Statement Ibis is fighting with a monster. The health of the monster is H.H. Ibis can cast NNkinds of spells. Casting the ii-th spell decreases the monster’s health by AiAi, at the cost of BiBiMagic Points. The ...
·AtCoder Beginner Contest (ABC) 这是最频繁且最简单的入门赛,通常情况下每月至少举行2次。2019年4月27日(含)之前,每场比赛共4题,时长100分钟,满分1000分且Rating超过1199的选手不计Rating值。自2019年5月19日起改版升级为6道题目,时长不变,满分2100分且Rating值超过1999的选手不计Rating值。改版之后比赛质量...
F - Transpose(递归) G - Mediator(启发式合并 + lca) A - Past ABCs #include<bits/stdc++.h>usingnamespacestd;voidsolve(){strings;cin>>s;if(s[3]>='4'||s.substr(3)=="316"||s.substr(3)=="000"||(s[3]=='3'&&s[4]>='5'))cout<<"No\n";elsecout<<"Yes\n";}intmain()...
AtCoder Beginner Contest 353A-E+G https://www.bilibili.com/video/BV1wt421M7Z5/ https://www.bilibili.com/video/BV1TZ421774X/ AtCoder Beginner Contest 353 CDEG讲解 https://www.bilibili.com/video/BV1rm421u7cs/ AtCoder Beginner Contest 353, f题写懵了 https://www.bilibili.com/video/...
判断图中存在闭环的常用方法——以Atcoder Beginner Contest 285(D - Change Usernames)为例 656 2 24:27 App AtCoder Beginner Contest 370(A ~ F 题讲解) 472 1 06:29 App AtCoder Beginner Contest 354(G 题讲解) 466 1 47:47 App AtCoder Beginner Contest 388(A ~ G 题讲解) 502 0 22:37 ...
AtCoder Beginner Contest 355A~E A - Who Ate the Cake?(模拟) 题意&思路 给的A和B如果不相等,那就是第三个人。否则推不出来 代码 #include<bits/stdc++.h>usingnamespacestd;voidsolve(){inta,b;cin>>a>>b;vector<int>v(4);v[a]=1;v[b]=1;if(a!=b){for(inti=1;i<=3;i++){if(!
AtCoder Beginner Contest 254 A~E 题解 待更…… ABC254 A~E [A - Last Two Digits](https://atcoder.jp/contests/abc254/tasks/abc254_a) 题目大意 输入格式 输出格式 样例 分析 代码 [B - Practical Computing](https://atcoder.jp/contests/abc254/tasks/abc254......