随笔分类 -  codeforces

摘要:codeforces 714 A 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 sh 阅读全文
posted @ 2018-10-09 18:59 我的秘密小屋 阅读(180) 评论(0) 推荐(0)
摘要:Codeforces 1060 b You are given a positive integer nn. Let S(x)S(x) be sum of digits in base 10 representation of xx, for example, S(123)=1+2+3=6S(123 阅读全文
posted @ 2018-10-06 10:32 我的秘密小屋 阅读(228) 评论(0) 推荐(0)
摘要:给你一个矩阵,一开始都是零,让你通过只能刷一行或者一列的方式,把开始的矩阵刷乘给你的矩阵: 考虑最优解: 例如: 3 4 4 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 阅读全文
posted @ 2018-10-04 17:08 我的秘密小屋 阅读(178) 评论(0) 推荐(0)
摘要:codeforces 1042 c 思路简单,但代码较复杂的贪心 分类讨论: 有0 负数有奇数个:将最大的负数和0全部乘到一起,最后删掉0 负数有偶数个:将0全部乘到一起,最后删掉0 没有0 负数有奇数个:将最大绝对值最小的负数删掉 负数有偶数个:不删 负数有奇数个:将最大的负数和0全部乘到一起,最 阅读全文
posted @ 2018-10-04 10:56 我的秘密小屋 阅读(153) 评论(0) 推荐(0)
摘要:You have a fraction . You need to find the first occurrence of digit c into decimal notation of the fraction after decimal point. The first contains t 阅读全文
posted @ 2018-08-14 14:28 我的秘密小屋 阅读(456) 评论(0) 推荐(0)
摘要:Katya studies in a fifth grade. Recently her class studied right triangles and the Pythagorean theorem. It appeared, that there are triples of positiv 阅读全文
posted @ 2018-08-11 08:38 我的秘密小屋 阅读(256) 评论(0) 推荐(0)