Solution A - Blood Pressure 纯模拟。。 #include <iostream> #include <cstring> #include <algorithm> #include <cmath> using namespace
AtCoder Beginner Contest 211(A~E) 传送门A - Blood Pressure水题B - Cycle Hit水题C - chokudai题意:给你一个字符串SS,问你有多少子序列能构成chokudaichokudai,答案mod1e9+7mod1e9+7.题解:根据每个连续性,当遍历到某个字符时,状态一定只从它在模板串的上一个字符转移过来,设t=chokudait=chokudai...
Code inta,b;cin>>a>>b;if((a-b)%3)printf("%f\n",(a-b)/3.0+b);elsecout<<(a-b)/3+b<<endl; B - Cycle Hit Analysis 判断一下读入的四个串和给定四个串是不是能对上就行。 Code intsum=4;strings;map<string,int>mp;mp["3B"]=mp["HR"]=mp["2B"]=mp["H"]=1;for(inti=1...
int main() { cin.tie(nullptr)->sync_with_stdio(false); string s, t = " chokudai"; cin >> s; int n = s.length(); for (int i = 0; i < n; ++i) for (int j = 1; j <= 8; ++j) if (s[i] == t[j]) f[j] = (f[j] + f[j - 1]) % mod; cout << f[8...
AtCoder Beginner Contest 211(A~E) A - Blood Pressure 水题 B - Cycle Hit 水题 C - chokudai 题意:给你一个字符串\(S\),问你有多少子序列能构成\(chokudai\),答案\(\mod 1e9+7\). 题解:根据每个连续性,当遍历到某个字符时,状态一定只从它在模板串的上一个字符转移过来,设\(t=chokudai\...
·AtCoder Beginner Contest (ABC) 这是最频繁且最简单的入门赛,通常情况下每月至少举行2次。2019年4月27日(含)之前,每场比赛共4题,时长100分钟,满分1000分且Rating超过1199的选手不计Rating值。自2019年5月19日起改版升级为6道题目,时长不变,满分2100分且Rating值超过1999的选手不计Rating值。改版之后比赛质量...
1. AtCoder Beginner Contest (ABC) 定位:面向算法初学者,每周六北京时间20点举行,时长100-120分钟,题目数通常为7-8题(含扩展题Ex),覆盖从基础语法到中等算法的内容。比赛时间对中国用户友好(无需熬夜参赛)。 题目难度:A-C题:基础语法与模拟题,对标CSP-J复赛难度(洛谷评级红题~黄题)。D-F题:动态规划、图...
AtCoder Beginner Contest 172.F - Unfair Nim 传送门 思路:异或的性质+构造。 显然题目背景是 游戏,我们目的是让后手胜,显然 堆石子异或为 时,后手必胜。接下我们需要构造来使 堆石子异或和为 。 因为题目要求我们只能将移动第一堆石子给第二堆石子。
【感谢伟大的队友和伟大的STL】关于我D题没有思考就写出来这件事 AtCoder Beginner Contest 323 x_cauliflower 585 2 【中杯,大杯,超大杯的鸡蛋选择】AtCoder Beginner Contest 331 ABCE讲解 x_cauliflower 276 0 AtCoder Beginner Contest 318 A - C + d + e x_cauliflower 235 0 ...
数组的维度,因此,我们需要想办法将 个背包压缩到一个维度里;注意到 ,也就是说每个背包的容量至多是 ,不超过个位数能够表示的最大数 ,如此一来,我们便可以将这 个背包的状态压缩成一个十进制数的形式;具体地, 表示第一个背包已经装了 容量的物品,第二个背包已经装了 ...