目录 G - Modulo Shortest Path H - King's Tour 因为偷懒就只写G和H的题解了. G - Modulo Shortest Path 首先可以观察到对于一条从点\(i\)到点\(j\)的边,权值只有两种:\(A_i+B_j\)和\(A_i+B_j-M\). 那么我们假如把点按照\(B\)升序排成一列,那么当中的一个点肯定只会向前半部分连权值为\(A_i+B_j\)的边,后半部分连权值\(A_i+B_j-M\)的边. 我们可以把一个点拆成入点和出点(此时仍旧按照…
A - Rating Goal Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement Takahashi is a user of a site that hosts programming contests.When a user competes in a contest, the rating of the user (not necessarily an integer) changes…
Tasks - Panasonic Programming Contest 2022(AtCoder Beginner Contest 251)\ D - At Most 3 (Contestant ver.) 题意: 每次给定一个n,求出一个序列,保证每次可以从序列中选取最多三个数,来构成1-n中的所有数字,序列最大长度300. 题解; 可以直接求一个构成1-1e6的序列,开始时思考的二进制,但感觉很难控制在300以内,所以可以分成三份,每份100个,其实100个的话会有重复的. 三份分别是…
A - Happy Birthday! Time limit : 2sec / Memory limit : 1000MB Score: 100 points Problem Statement E869120's and square1001's 16-th birthday is coming soon.Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan-shaped pieces. E869…
KYOCERA Programming Contest 2021(AtCoder Beginner Contest 200) 题解 哦淦我已经菜到被ABC吊打了. A - Century 首先把当前年份减去\(1\),对应的世纪也减去\(1\),然后我们就发现第\(0\)到\(99\)年对应第\(0\)世纪,第\(100\)到\(199\)年对应第\(1\)世纪,以此类推. 答案就是\(\lfloor \frac {N-1} {100} \rfloor\).这里\(\lfloor x \rflo…
AtCoder Beginner Contest 184 题解 目录 AtCoder Beginner Contest 184 题解 A - Determinant B - Quizzes C - Super Ryuma D - increment of coins E - Third Avenue F - Programming Contest 这把怎么感觉题目都比以往的ABC水啊,拜此所赐我只是程序写得慢就排名狂掉( A - Determinant 求二阶矩阵的行列式,是小学常见自定义题目(…
A - ABC/ARC Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement Smeke has decided to participate in AtCoder Beginner Contest (ABC) if his current rating is less than 1200, and participate in AtCoder Regular Contest (ARC) oth…
总的来说,这次的题目比较水,然而菜菜的我并没有把所有题目都做完,话不多说,直接来干货: A:Next Alphabet 题目链接:https://atcoder.jp/contests/abc151/tasks/abc151_a 题目描述:Given is a lowercase English letter C that is not z. Print the letter that follows C in alphabetical order. 大致解读:给你一个小写字母,输出这个小写字母…
A - ABCxxx Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement This contest, AtCoder Beginner Contest, is abbreviated as ABC. When we refer to a specific round of ABC, a three-digit number is appended after ABC. For example,…
人生第一场 AtCoder,纪念一下 话说年后的 AtCoder 比赛怎么这么少啊(大雾 AtCoder Beginner Contest 154 题解 A - Remaining Balls We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one…