竟然顺利地AK了,爽到( 传送门:https://atcoder.jp/contests/abc151 A 语法题 cpp #include<bits/stdc++.h>usingnamespacestd;intmain(){charch; cin>>ch;cout<<(char)(ch+1);return0;} B 简单的判断 cpp #pragmaGCC optimize("O3")#include<bits/stdc++.h>usingnamespacestd;#defineendl'\n'#def...
题目链接:https://atcoder.jp/contests/abc151/tasks/abc151_c 题目描述:Takahashi participatedina contestonAtCoder.The contest had N problems. Takahashi made M submissions during the contest.The i-th submission was madeforthe pi-th problemandreceived the verdict Si (ACorWA). The numberofTakahashi'...
AtCoder Beginner Contest 151的数学推导难不难? 组合数在AtCoder Beginner Contest 151中怎么运用? AtCoder Beginner Contest 151有哪些数论相关的题? 思路统计最大值出现的次数,和最小值出现的次数。虽然是每次都是MAX-MIN,我们先求MAX的和,然后再求MIN的和,做差。 这次代码写的真的很漂亮 题目地址: 代码语言...
#include <bits/stdc++.h> using namespace std; template <typename t> void read(t &x) { char ch = getchar(); x = 0; t f = 1; while (ch < '0' || ch > '9') f = (ch == '-' ? -1 : f), ch = getchar(); while (ch >= '0' && ch <= '9') x = x * 10 ...
·AtCoder Beginner Contest (ABC) 这是最频繁且最简单的入门赛,通常情况下每月至少举行2次。2019年4月27日(含)之前,每场比赛共4题,时长100分钟,满分1000分且Rating超过1199的选手不计Rating值。自2019年5月19日起改版升级为6道题目,时长不变,满分2100分且Rating值超过1999的选手不计Rating值。改版之后比赛质量...
AtCoder Beginner Contest 051(ABCD) A - Haiku 思路:直接模拟。 B - Sum of Three Integers 思路:暴力枚举。 C - Back and Forth 思路:按矩阵走一个来回后再围一层矩阵走即可。 D - Candidates of No Shortest Paths 思路:多源最短路判断路径,用s p f a spfaspfa记录存在的路径然后用m mm减即可,标答...
AtCoder Beginner Contest 153 花式打怪 F题 题目大意: 在一个2D模板游戏中,所有的怪物都是在X轴上的,每个怪物有两个属性X和HP,分别代表怪物的位置和生命值。 玩家控制的角色有一个技能,玩家每次释放技能可以选择一个位置x,技能会对[x - d, x + d]范围内的所有怪物造成a点伤害,请问,玩家最少需要使用多少...
题意:给两个长度为n的排列,a表示P这个排列是全排列的数组的字典序的第a小,b表示Q这个排列是全排列的数组的字典序的第a小。 由于n<=8 很容易可以想到stl。时间复杂度为O(n!) intmain(){intn=read();strings="";for(inti=1;i<=n;i++){s+=(i+'0');}stringa="",b="";for(inti=1;i<=n...
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(){ios::sync_with_stdio...
AtCoder Beginner Contest 155 - D - Pairs ,-E - Payment 题解 D - Pairs We have NN integers A1,A2,...,ANA1,A2,...,AN. There are N_牛客网_牛客在手,offer不愁