kZjPBD.jpg
上一页 1 2 3 4 5 6 7 8 9 10 ··· 23 下一页
摘要: 题意翻译 Description 已知一个长度为n的序列a1,a2,…,an。 对于每个1<=i<=n,找到最小的非负整数p满足 对于任意的j, aj < = ai + p – sqrt(abs(i-j)) Input 第一行n,(1<=n<=500000) 下面每行一个整数,其中第i行是ai。(0 阅读全文
posted @ 2019-07-27 10:06 Through_The_Night 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 题目大意:中文题目 具体思路:通过两棵线段树来维护,第一棵线段树来维护当前坐标的点的日增长速度(默认每一年的增长速度都是当前年份的增长速度),对于第一棵线段树,肯定会存在多算的情况,那么我们第二棵线段树就维护每一个点的多算的情况就可以了。 举个例子:当前的n只有1,初始值也是1, 三个操作,第一年加 阅读全文
posted @ 2019-07-25 19:04 Through_The_Night 阅读(213) 评论(0) 推荐(0) 编辑
摘要: E. Gosha is hunting time limit per test 5 seconds memory limit per test 256 megabytes input standard input output standard output E. Gosha is hunting 阅读全文
posted @ 2019-07-25 10:01 Through_The_Night 阅读(167) 评论(0) 推荐(0) 编辑
摘要: D2. RGB Substring (hard version) time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output D2. RGB 阅读全文
posted @ 2019-07-25 09:03 Through_The_Night 阅读(345) 评论(0) 推荐(0) 编辑
摘要: Define S[n] as the number of subsets of {1, 2, ..., n} that contain no consecutive integers. For each S[n], if for all i (1 ≤ i < n) gcd(S[i], S[n]) i 阅读全文
posted @ 2019-07-24 19:58 Through_The_Night 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 题意 有p个邮局,n个村庄,邮局只能建在村庄里, 求令所有寄信距离之和最短的值。、 SOLUTION: 首先可以n3的dp dp i ,j 表示前 i 个地方建立 j 个邮局的最小花费, 在处理出在任意一个区间建立一个邮局是的最小花费(一个区间放一个邮局的话,放在中位数的位置最有) 在想如何优化dp 阅读全文
posted @ 2019-07-24 10:28 Through_The_Night 阅读(157) 评论(0) 推荐(0) 编辑
摘要: There are nnn heroes and mmm monsters living in an island. The monsters became very vicious these days, so the heroes decided to diminish the monsters 阅读全文
posted @ 2019-07-23 14:42 Through_The_Night 阅读(372) 评论(0) 推荐(0) 编辑
摘要: Your friend has made a computer video game called "Kangaroo Puzzle" and wants you to give it a try for him. As the name of this game indicates, there 阅读全文
posted @ 2019-07-23 12:53 Through_The_Night 阅读(673) 评论(0) 推荐(0) 编辑
摘要: In the 24th24^{\text{th}}24th century, there is a country somewhere in the universe, namely Country Meow. Due to advanced technology, people can easil 阅读全文
posted @ 2019-07-22 19:50 Through_The_Night 阅读(363) 评论(0) 推荐(0) 编辑
摘要: You ye Jiu yuan is the daughter of the Great GOD Emancipator. And when she becomes an adult, she will be queen of Tusikur, so she wanted to travel the 阅读全文
posted @ 2019-07-21 18:22 Through_The_Night 阅读(317) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 23 下一页