D. Petya and Array time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Petya has an array aa ...
分类:
编程语言 时间:
2018-10-08 15:03:00
阅读次数:
156
Lucky Sum Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky dig ...
分类:
其他好文 时间:
2018-10-04 19:28:52
阅读次数:
204
思路: 离散化+树状数组(或权值线段树)。bit数组一定要开够。和求逆序对数量很像。 实现: ...
分类:
其他好文 时间:
2018-09-23 14:56:39
阅读次数:
135
题目地址:http://codeforces.com/contest/1042/problem/D 题意:给你n个数,问有多少个区间的和的值小于t 分析:区间和问题,常常用到前缀和来进行预处理,所以先预处理出前缀和数组sum sum[i]代表前i个数的和,那么sum[i]的贡献就是, 当i<k<=n ...
分类:
其他好文 时间:
2018-09-17 21:30:35
阅读次数:
315
Little Petya likes to draw. He drew N red and M blue points on the plane in such a way that no three points lie on the same line. Now he wonders what ...
分类:
其他好文 时间:
2018-09-11 12:19:40
阅读次数:
281
A very brave explorer Petya once decided to explore Paris catacombs. Since Petya is not really experienced, his exploration is just walking through th ...
分类:
其他好文 时间:
2018-07-22 00:33:12
阅读次数:
164
Problem description Little Petya very much likes arrays consisting of n integers, where each of them is in the range from 1 to 109, inclusive. Recentl ...
分类:
其他好文 时间:
2018-06-19 00:11:46
阅读次数:
211
Problem description Petya loves lucky numbers. We all know that lucky numbers are the positive integers whose decimal representations contain only the ...
分类:
其他好文 时间:
2018-06-04 23:24:30
阅读次数:
294
Problem description Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the ...
分类:
其他好文 时间:
2018-06-02 13:27:10
阅读次数:
218
Problem description Petya loves lucky numbers. Everybody knows that positive integers are lucky if their decimal representation doesn't contain digits ...
分类:
其他好文 时间:
2018-06-01 20:41:17
阅读次数:
237