摘要: You are given string ss of length nn consisting of 0-s and 1-s. You build an infinite string tt as a concatenation of an infinite number of strings ss 阅读全文
posted @ 2020-04-26 22:24 DeaL57 阅读(143) 评论(0) 推荐(0) 编辑
摘要: You are given two strings ss and tt consisting of lowercase Latin letters. Also you have a string zz which is initially empty. You want string zz to b 阅读全文
posted @ 2020-04-26 12:48 DeaL57 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 考虑全为0的串数。我们有m个1,相当于有m+1的空隙可以用来放0。那么显然我们把这n-m个0匀着放到这m+1个空隙,可以使得每个0的部分尽可能短,进而使得全为0的子串尽可能少。 所以每个空隙放b=(n-m)/(m+1)。因为不能整除,所有有(n-m) % (m+1)个空隙实际上还要再多一个0。 如果 阅读全文
posted @ 2020-04-26 11:18 DeaL57 阅读(122) 评论(0) 推荐(0) 编辑
摘要: To become the king of Codeforces, Kuroni has to solve the following problem. He is given nn numbers a1,a2,…,ana1,a2,…,an. Help Kuroni to calculate ∏1≤ 阅读全文
posted @ 2020-04-26 10:00 DeaL57 阅读(159) 评论(0) 推荐(0) 编辑
摘要: VK news recommendation system daily selects interesting publications of one of nn disjoint categories for each user. Each publication belongs to exact 阅读全文
posted @ 2020-04-26 00:23 DeaL57 阅读(200) 评论(0) 推荐(0) 编辑