随笔分类 -  算法基础—前缀和/差分

摘要:Phoenix has decided to become a scientist! He is currently investigating the growth of bacteria. Initially, on day 11, there is one bacterium with mas 阅读全文
posted @ 2020-05-02 16:55 脂环 阅读(325) 评论(0) 推荐(1) 编辑
摘要:You are given an array aa consisting of nn integers (it is guaranteed that nn is even, i.e. divisible by 22 ). All aiai does not exceed some integer k 阅读全文
posted @ 2020-04-22 16:50 脂环 阅读(241) 评论(0) 推荐(0) 编辑
摘要:题目描述 The only difference between easy and hard versions is constraints. You are given a sequence a a a consisting of n n n positive integers. Let's de 阅读全文
posted @ 2020-04-14 18:34 脂环 阅读(380) 评论(0) 推荐(0) 编辑
摘要:Eugene likes working with arrays. And today he needs your help in solving one challenging task. An array cc is a subarray of an array bb if cc can be 阅读全文
posted @ 2020-04-09 19:43 脂环 阅读(292) 评论(0) 推荐(0) 编辑
摘要:题目描述 对一个给定的自然数MMM,求出所有的连续的自然数段,这些连续的自然数段中的全部数之和为MMM。 例子:1998+1999+2000+2001+2002=100001998+1999+2000+2001+2002 = 100001998+1999+2000+2001+2002=10000,所 阅读全文
posted @ 2020-03-05 00:03 脂环 阅读(285) 评论(0) 推荐(0) 编辑
摘要:Tanya wants to go on a journey across the cities of Berland. There are nn cities situated along the main railroad line of Berland, and these cities ar 阅读全文
posted @ 2020-03-03 00:53 脂环 阅读(213) 评论(0) 推荐(0) 编辑
摘要:You want to perform the combo on your opponent in one popular fighting game. The combo is the string ss consisting of nn lowercase Latin letters. To p 阅读全文
posted @ 2020-02-27 22:37 脂环 阅读(222) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示
主题色彩