码迷,mamicode.com
首页 >  
搜索关键字:c. dzy loves sequences    ( 1332个结果
[CF1030E]Vasya and Good Sequences
[CF1030E]Vasya and Good Sequences 题目大意: 给定一个长度为$n(n\le3\times10^5)$的数列$a_i(1\le a_i\le10^{18})$。可以任意对若干数进行操作,交换这个数的任意二进制位。求有多少区间,使得这个区间内的数经过操作使得异或和为$0 ...
分类:其他好文   时间:2018-10-04 10:23:57    阅读次数:145
CF444A DZY Loves Physics
以前的$C$题难度也不会写啊。 结论:答案一定是两个点一条边所构成的子图。 证明: 假设有点$x, y$由边权为$p$的边连接,点$y, z$由边权为$q$的两条边连接,只需证明在$\frac{x + y}{p},\frac{y + z}{q},\frac{x + y + z}{p + q}$中,$ ...
分类:其他好文   时间:2018-10-03 23:10:47    阅读次数:160
Codeforces 1053 B - Vasya and Good Sequences
B - Vasya and Good Sequences 思路: 满足异或值为0的区间,必须满足一下条件: 1.区间中二进制1的个数和为偶数个; 2.区间二进制1的个数最大值的两倍不超过区间和. 如果区间长度大于128,第二个条件肯定满足,所以我们只要暴力区间长度小于128的就可以了 代码: ...
分类:其他好文   时间:2018-10-02 20:12:07    阅读次数:186
Kotlin系列之序列(Sequences)源码完全解析
Kotlin系列之序列(Sequences)源码完全解析 2018年06月05日 22:04:50 mikyou 阅读数:179 标签: Kotlin序列(sequence)源码解析Androidjava 更多 个人分类: Kotlin Kotlin系列之序列(Sequences)源码完全解析 20 ...
分类:其他好文   时间:2018-10-02 17:58:24    阅读次数:190
1047A_Little C Loves 3 I(构造)
A. Little C Loves 3 I time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. Little C Loves 3 ...
分类:其他好文   时间:2018-10-02 13:58:07    阅读次数:158
[Codeforces 1058E] Vasya and Good Sequences
[题目链接] https://codeforces.com/contest/1058/problem/E [算法] 显然 , 我们只需考虑序列中每个数的二进制表示下1的个数即可。 不妨令Ai表示第i个数的二进制表示下1的个数。 一个子序列[L,R]是“好”的当且仅当 : 1. sigma{ Ai } ...
分类:其他好文   时间:2018-09-29 22:48:11    阅读次数:249
Codeforces Round #512 E - Vasya and Good Sequences
有时候觉得自己就是个思路搬运机,只会搬运思路 这个题首先说了求的是好区间的个数, 好区间满足条件: 1、二进制位1的数量和为偶数 2、w[i]表示a[i]的二进制上1的个数 ,sum[i] = w[1] + ... + w[i],对于l-r区间上任意一个位置j,w[j] < sum[r] - sum ...
分类:其他好文   时间:2018-09-29 22:43:34    阅读次数:151
D. Little C Loves 3 II
传送门 [http://codeforces.com/contest/1047/problem/D] 题意 给你n m得棋盘,让你找两点之间距离为3的点的个数,不能重复使用,距离定义,两坐标差绝对值之和 分析 自己动手找发现规律,1 6,2 4,2 5,3 4都可以用完所有格子,超过他们范围的都可由 ...
分类:其他好文   时间:2018-09-29 00:45:32    阅读次数:145
codeforces 1041 E.Vasya and Good Sequences(暴力?)
E. Vasya and Good Sequences time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vasya has a ...
分类:其他好文   时间:2018-09-27 19:17:36    阅读次数:370
17 Go Slices: usage and internals
Go Slices: usage and internals 5 January 2011 Introduction Go's slice type provides a convenient and efficient means of working with sequences of type ...
分类:其他好文   时间:2018-09-25 11:30:59    阅读次数:169
1332条   上一页 1 ... 22 23 24 25 26 ... 134 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!