A - Colorful Subsequence
简化版题意:输入一个字符串,输出每种字母的个数+1" role="presentation" style="position: relative;">+1+1+1的乘积的结果−1" role="presentation" style="position: relative;">−1−1-1。 |S|≤105" role="presentation" style="position: relative;">|S|≤105|S|≤105|S| \le 10^5
题解:按照题意模拟就
A Digits Sum
for" role="presentation" style="position: relative;">forforfor循环题目,就不翻译了。
B RGB Coloring
题意:一个长度为n" role="presentation" style="position: relative;">nnn的序列,可以染成三种颜色或者不染,得分分别为A,B,A+B,0" role="presentation" style="position: relative;">A,B,A+B,0A,B,A+B,0A,B,A+B,0。问有多少种本质不同的
A Fairness
题意:三个人做游戏,每个人开始有一个数A,B,C" role="presentation" style="position: relative;">A,B,CA,B,CA,B,C。每一次一个人会用其它两个人的数的和替换自己的数,做k" role="presentation" style="position: relative;">kkk次操作,问最后A" role="presentation" style="position: relative;">AAA的减去B" role="presentation" style="position: relati
A Colorful Slimes 2
题意:n" role="presentation" style="position: relative;">nnn只史莱姆排成一行,每种史莱姆有个颜色c(1≤c≤n)" role="presentation" style="position: relative;">c(1≤c≤n)c(1≤c≤n)c(1\le c\le n)。两个相邻的同色史莱姆会合体,你可以把一只史莱姆的颜色修改成[1,10000]" role="presentation" style="position: relative;"
A Candy Distribution Again
签到贪心,就不翻译了。
B Garbage Collector
题意:有n" role="presentation" style="position: relative;">nnn个垃圾排在线上,0" role="presentation" style="position: relative;">000处是垃圾桶,你要把n" role="presentation" style="position: relative;">nnn个垃圾捡到垃圾桶里面。拿着k" role="presentation" style
A Two Abbreviations
签到题,就不翻译了
找两个串一段长度的gcd" role="presentation" style="position: relative;">gcdgcdgcd,判一判对应位置一不一样就可以了。
B Removing Blocks
题意:给你一个长度为N" role="presentation" style="position: relative;">NNN的序列,将N" role="presentation" style="position: relative;">NNN个数依次删掉。每一次删掉一个数的代价是这个数
A Irreversible operation
签到题,直接for" role="presentation" style="position: relative;">forforfor一遍就好了
B Powers of two
题意:给n" role="presentation" style="position: relative;">nnn个数字,要两两配对凑成和为2i" role="presentation" style="position: relative;">2i2i2^i的数对,问最多凑多少个。
题解:感觉上排个序从大往小匹配卡不掉,也不会证
A Poisonous Cookies
没什么写头,纯贪心,随便贪贪心就行了。
B Tree Burning
题意:在一个长为L的环上,你一开始在0处。给定一些关键点的坐标。你可以重复做如下事情:选择一个方向,走到方向上第一个关键点停下并标记。当所有关键点都被标记时停止。问你最长能走多远。点数2×105" role="presentation" style="position: relative;">2×1052×1052\times 10^5
题解:直接考虑每一段被经过多少次不好考虑。可以把到一个关键点再回到0的过程看成一次操作。这样每一条路径
Problem StatementThere is a string s consisting of a and b. Snuke can perform the following two kinds of operation any number of times in any order: Choose an occurrence of aa as a substring, and replace it with b.Choose an occurrence of bb as a subs
Problem StatementWe have a grid with H rows and W columns of squares. We will represent the square at the i-th row from the top and j-th column from the left as (i, j). Also, we will define the distance between the squares (i1, j1) and (i2,