
思维题
文章平均质量分 66
G-Howe
这个作者很懒,什么都没留下…
展开
-
Sonya and Robots
http://codeforces.com/problemset/problem/1004/CSince Sonya is interested in robotics too, she decided to construct robots that will read and recognize numbers.Sonya has drawn nnumbers in a row, ...原创 2018-08-10 09:57:49 · 567 阅读 · 0 评论 -
Segment Occurrences
http://codeforces.com/problemset/problem/1016/B在网上找了一个题解,感觉有点东西,用substr不断取出长度为m的子串,并记录下来,查询的时候直接枚举查询的区间。用substr的时候定义字符串要用string,输入字符串的时候要用cin,否则会出现错误,不知道为啥,还是记下吧You are given two strings s and t...原创 2018-08-10 11:20:23 · 582 阅读 · 0 评论 -
Pythagorean Triples
http://codeforces.com/problemset/problem/707/CKatya studies in a fifth grade. Recently her class studied right triangles and the Pythagorean theorem. It appeared, that there are triples of positive ...原创 2018-10-07 12:18:33 · 1620 阅读 · 0 评论 -
Minimum Ternary String
解题思路:先找到第一个2出现之前0的个数并标记第一个二所在位置(0和2不能交换),找到字符串中所有1的个数(1可以和0,2交换),把找到的0和1按先后顺序输出,此时就剩下2和其后面的0了,再从第一个二的位置把2和0按顺序输出,此时就是所求的最小字符串(2越靠后越好)You are given a ternary string (it is a string which consists onl...原创 2018-10-01 17:10:51 · 258 阅读 · 0 评论 -
Karen and Game
To stay woke and attentive during classes, Karen needs some coffee!Karen, a coffee aficionado, wants to know the optimal temperature for brewing the perfect cup of coffee. Indeed, she has spent so...原创 2018-10-05 09:57:40 · 190 阅读 · 0 评论 -
Meeting of Old Friends
题挺简单的,就是看细心不细心,考虑的全不全,我就是少考虑个条件,一直错,必须记下来Today an outstanding event is going to happen in the forest — hedgehog Filya will come to his old fried Sonya!Sonya is an owl and she sleeps during the day...原创 2018-10-07 11:48:29 · 235 阅读 · 0 评论 -
Forgery
题意大致为把 xxxx.xxxx看作一个整体,刚开始字符全为'.',看是否可以组成给出的图像。做法事用一个数组输入,另一个数组刚开始全赋为.........................................,当三行三列一周全为#时,把另一个数组相应位置上的点改为#,最后比较两个数组是否一模一样Student Andrey has been skipping ph...原创 2018-10-07 12:17:42 · 945 阅读 · 0 评论 -
7295 Positive Con Sequences
https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=5307题解:先用等差和等比性质算出缺的一项值应为多少,然后先等差检测,检测是否为上升序列,每一项都要大于0小于1000000,如果不行标记,进行等比检测,检测是...原创 2018-11-19 19:31:25 · 1963 阅读 · 0 评论 -
简单数学题
这道题关键是怎麽解决超时问题,通过找规律或者计算公式可以得到结果为:(n-1)*(2^n)+1。我是通过找2^1,2^10,2^100,……,2^1e18来解决的,看代码已知F(n)=n∑i=1(i×n∑j=iCij)求 F(n) mod 1000000007Input多组输入,每组输入占一行,包含一个整数n(1 <= n <= 1e18)。数据不超过3000...原创 2019-03-18 20:19:54 · 616 阅读 · 0 评论