Description 一棵树,问至少有 \(k\) 个黑点的路径最大异或和. Sol 点分治. 用点分治找重心控制树高就不说了,主要是对答案的统计的地方. 将所有路径按点的个数排序. 可以发现当左端点递增的时候右端点单调递减,时刻满足Trie树里的所有元素都是合法的即可,不断把右端点丢进去,用左端 ...
分类:
其他好文 时间:
2016-12-24 17:01:00
阅读次数:
224
几个月前接触过scala,当时下载一个库用maven引入,弄了很久,后来觉得没起一个项目有点重量级,一次偶然机会在升级idea的时候,发现jetbrains官网出了一门新的jvm编程语言kotlin,官网介绍100%兼容java,于是就找官网的demo体验了下,发觉真的很不错,语言简洁,功能强大. ...
分类:
其他好文 时间:
2016-12-24 11:12:28
阅读次数:
201
简单来将,仿函数(functor)就是一个重载了"()"运算符的struct或class,利用对象支持operator()的特性,来达到模拟函数调用效果的技术。 我们平时对一个集合类遍历的时候,例如vector,是这样做的: for(vector<int>::const_iterator iter ...
分类:
编程语言 时间:
2016-12-24 01:14:07
阅读次数:
213
http://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_in The number of values in the IN list is only limited by the max_allowed_pa ...
分类:
其他好文 时间:
2016-12-23 14:14:48
阅读次数:
192
注:本篇博客系转载,出处不可考(至少对我来说不可考...) 双冒号操作符即作用域限定操作符Scope Resolution Operator可以访问静态、const和类中重写的属性与方法。 在类定义外使用的话,使用类名调用。在PHP 5.3.0,可以使用变量代替类名。 Program List:用变 ...
分类:
Web程序 时间:
2016-12-23 11:46:27
阅读次数:
210
groupBy() is another RxJS operator to create higher order observables. In this lesson we will learn how groupBy works for routing source values into d ...
分类:
Web程序 时间:
2016-12-23 07:46:56
阅读次数:
163
There are variants of the window operator that allow you to split RxJS observables in different ways. In this lesson we will explore the windowToggle ...
1.安装docker后启动显示内核太低(升级内核): 网上太多方案 2.升级内核后还是启动不了docker:执行下面语句 ...
分类:
其他好文 时间:
2016-12-21 21:16:19
阅读次数:
127
FFT 做 高精度乘法 @Author: YouSiki ...
分类:
其他好文 时间:
2016-12-21 18:35:21
阅读次数:
232
传送门 Heavy Transportation Time Limit: 3000MS Memory Limit: 30000K Total Submissions: 31882 Accepted: 8445 Description Background Hugo Heavy is happy. A ...
分类:
其他好文 时间:
2016-12-21 11:54:53
阅读次数:
196