2020.12.3--vj个人赛补题】的更多相关文章

B - Escape The princess is going to escape the dragon's cave, and she needs to plan it carefully. The princess runs at vp miles per hour, and the dragon flies at vd miles per hour. The dragon will discover the escape after t hours and will chase the…
A Vasya studies music.He has learned lots of interesting stuff. For example, he knows that there are 12 notes: C, C#, D, D#, E, F, F#, G, G#, A, B, H. He also knows that the notes are repeated cyclically: after H goes C again, and before C stands H. …
A.CodeForces-124A (简单数学题) #include<cstdio> #include<algorithm> #include<iostream> #include<cmath> using namespace std; int main(){ int a,b,n; scanf("%d %d %d",&n,&a,&b); if((n-a)>b){ printf("%d",b…
D - D CodeForces - 743A Vladik is a competitive programmer. This year he is going to win the International Olympiad in Informatics. But it is not as easy as it sounds: the question Vladik face now is to find the cheapest way to get to the olympiad. V…
B - B Polycarp loves lowercase letters and dislikes uppercase ones. Once he got a string s consisting only of lowercase and uppercase Latin letters. Let A be a set of positions in the string. Let's call it pretty if following conditions are met: lett…
D - Drinks Choosing Old timers of Summer Informatics School can remember previous camps in which each student was given a drink of his choice on the vechorka (late-evening meal). Or may be the story was more complicated? There are nn students living…
B - A Tide of Riverscape 题意:给出一组字符串,由'0','1',' . '组成,' . '可以换成 0或1,判断第 i  个和第 i+p 个字符是否可以不相等,如果可以则输出满足条件的字符串 题解:先把所有的' . '换成0或1,在判断 i 和i+p 以及i 和 i-p 是否一样,一样则把原来的' . '换成相反的1 或0 ,最后判断是否有一组周期为p的点不同 #include<bits/stdc++.h> using namespace std; int main(…
7-5敲笨钟 微博上有个自称"大笨钟V"的家伙,每天敲钟催促码农们爱惜身体早点睡觉.为了增加敲钟的趣味性,还会糟改几句古诗词.其糟改的方法为:去网上搜寻压"ong"韵的古诗词,把句尾的三个字换成"敲笨钟".例如唐代诗人李贺有名句曰:"寻章摘句老雕虫,晓月当帘挂玉弓",其中"虫"(chong)和"弓"(gong)都压了"ong"韵.于是这句诗就被糟改为"寻章摘…
7-7 矩阵A乘以B 给定两个矩阵A和B,要求你计算它们的乘积矩阵AB.需要注意的是,只有规模匹配的矩阵才可以相乘.即若A有R​a​​行.C​a​​列,B有R​b​​行.C​b​​列,则只有C​a​​与R​b​​相等时,两个矩阵才能相乘. 输入格式: 输入先后给出两个矩阵A和B.对于每个矩阵,首先在一行中给出其行数R和列数C,随后R行,每行给出C个整数,以1个空格分隔,且行首尾没有多余的空格.输入保证两个矩阵的R和C都是正数,并且所有整数的绝对值不超过100. 输出格式: 若输入的两个矩阵的规模…
7-5 古风排版 中国的古人写文字,是从右向左竖向排版的.本题就请你编写程序,把一段文字按古风排版. 输入格式: 输入在第一行给出一个正整数N(<),是每一列的字符数.第二行给出一个长度不超过1000的非空字符串,以回车结束. 输出格式: 按古风格式排版给定的字符串,每列N个字符(除了最后一列可能不足N个). 输入样例: 4 This is a test case   输出样例: asa T st ih e tsi ce s 题解:输入字符串后,再设一个二维字符数组,因为第一列可能不够n个要用空…