10 2020 档案

摘要:B - B Polycarp loves lowercase letters and dislikes uppercase ones. Once he got a string s consisting only of lowercase and uppercase Latin letters. L 阅读全文
posted @ 2020-10-31 11:43 西瓜0 阅读(135) 评论(0) 推荐(0)
摘要: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 v 阅读全文
posted @ 2020-10-25 21:35 西瓜0 阅读(234) 评论(0) 推荐(0)
摘要:7-5敲笨钟 微博上有个自称“大笨钟V”的家伙,每天敲钟催促码农们爱惜身体早点睡觉。为了增加敲钟的趣味性,还会糟改几句古诗词。其糟改的方法为:去网上搜寻压“ong”韵的古诗词,把句尾的三个字换成“敲笨钟”。例如唐代诗人李贺有名句曰:“寻章摘句老雕虫,晓月当帘挂玉弓”,其中“虫”(chong)和“弓” 阅读全文
posted @ 2020-10-25 21:10 西瓜0 阅读(333) 评论(0) 推荐(0)
摘要:string &insert(int p0, const char *s);——在p0位置插入字符串s string &insert(int p0, const char *s, int n);——在p0位置插入字符串s的前n个字符 string &insert(int p0,const strin 阅读全文
posted @ 2020-10-22 19:33 西瓜0 阅读(863) 评论(0) 推荐(0)
摘要:7-3.N个数求和 本题的要求很简单,就是求N个数字的和。麻烦的是,这些数字是以有理数分子/分母的形式给出的,你输出的和也必须是有理数的形式。 输入格式: 输入第一行给出一个正整数N(≤100)。随后一行按格式a1/b1 a2/b2 ...给出N个有理数。题目保证所有分子和分母都在长整型范围内。另外 阅读全文
posted @ 2020-10-18 16:13 西瓜0 阅读(305) 评论(0) 推荐(0)
摘要:B - A Tide of Riverscape 题意:给出一组字符串,由‘0’,‘1’,‘ . ’组成,‘ . ’可以换成 0或1,判断第 i 个和第 i+p 个字符是否可以不相等,如果可以则输出满足条件的字符串 题解:先把所有的‘ . ’换成0或1,在判断 i 和i+p 以及i 和 i-p 是否 阅读全文
posted @ 2020-10-13 17:30 西瓜0 阅读(186) 评论(0) 推荐(0)
摘要:math.h 数学函数库,一些数学计算的公式的具体实现是放在math.h里,具体有:1 三角函数double sin (double);double cos (double);double tan (double);2 反三角函数double asin (double); 结果介于[-PI/2, P 阅读全文
posted @ 2020-10-11 15:57 西瓜0 阅读(264) 评论(0) 推荐(0)
摘要:7-1谁先倒 划拳是古老中国酒文化的一个有趣的组成部分。酒桌上两人划拳的方法为:每人口中喊出一个数字,同时用手比划出一个数字。如果谁比划出的数字正好等于两人喊出的数字之和,谁就输了,输家罚一杯酒。两人同赢或两人同输则继续下一轮,直到唯一的赢家出现。 下面给出甲、乙两人的酒量(最多能喝多少杯不倒)和划 阅读全文
posted @ 2020-10-10 22:27 西瓜0 阅读(138) 评论(0) 推荐(0)
摘要:E - Buying a TV Set Monocarp has decided to buy a new TV set and hang it on the wall in his flat. The wall has enough free space so Monocarp can buy a 阅读全文
posted @ 2020-10-06 22:21 西瓜0 阅读(145) 评论(0) 推荐(0)
摘要:C-Wandering Robot DreamGrid creates a programmable robot to explore an infinite two-dimension plane. The robot has a basic instruction sequence a1,a2, 阅读全文
posted @ 2020-10-02 00:34 西瓜0 阅读(133) 评论(0) 推荐(0)