只想到了朴素的n^2做法,然后发现可以用splay维护。于是调了几个小时的splay。。。 splay的元素是从第二个开始的!第一个是之前插入的头节点! ...
分类:
其他好文 时间:
2016-07-30 14:47:19
阅读次数:
204
The All-purpose Zero Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 947 Accepted Submission(s): ...
分类:
其他好文 时间:
2016-07-29 16:35:49
阅读次数:
273
题目链接:点击打开链接
思路:
首先一点:我们把所有0都用上是肯定不亏的。
接下来:我们把剩下的非0数求LIS, 但是, 这些0有可能不能全部插入LIS中, 那么势必要在LIS中剔出一些数。 一个很简单的方法, 我们把每一个数减去他前面的0的个数, 这样, 相当于先为0留出了空间, 因为是全都减小, 相对大小是不变的。
细节参见代码:
#include
#include
#inclu...
分类:
其他好文 时间:
2016-07-29 15:41:19
阅读次数:
158
GUIs are Dynamic C++ is a standarized, powerful and elaborate general-purpose language. It's the only language that is exploited on such a wide range ...
分类:
其他好文 时间:
2016-07-23 07:30:08
阅读次数:
160
catalogue 0. 引言 0x1: 键盘按键到显示的全过程 0x2: GPIO General Purpose Input Output(通用输入/输出)简称为GPIO,或总线扩展器,人们利用工业标准I2C、SMBus或SPI接口简化了I/O口的扩展。当微控制器或芯片组没有足够的I/O端口,或 ...
分类:
其他好文 时间:
2016-07-21 21:39:31
阅读次数:
1176
1、安装以下组件 # yum groupinstall -y "Desktop" "Desktop Platform" "Desktop Platform Development" "Fonts" "General Purpose Desktop" "Graphical Administration ...
分类:
其他好文 时间:
2016-07-13 01:31:00
阅读次数:
267
Setting up a database adapter zend-db provides a general purpose database abstraction layer. At its heart is the Adapter, which abstracts common datab ...
分类:
数据库 时间:
2016-07-05 12:14:00
阅读次数:
293
PouchDB and CouchDB were designed for one main purpose: sync. Jason Smith has a great quote about this: The way I like to think about CouchDB is this: ...
分类:
数据库 时间:
2016-06-12 13:55:48
阅读次数:
511
该脚本只在centos上测试过,测试OK,其他发行版自行测试#!/bin/bash#Purpose:一键安装lamp(apache+mysql+php)#Writer:www.linuser.com#Date:2015-10-08#定义软件下载目录:SoftDir=‘/usr/local/src‘#定义编译函数:functionMAKE(){if[`echo$?`-eq0];thenmakeelseexitfi}#定义安..
分类:
数据库 时间:
2016-06-05 01:13:12
阅读次数:
334
【Open-Drain与Push-Pull】GPIO的功能,简单说就是可以根据自己的需要去配置为输入或输出。(General Purpose Input Output,简称为GPIO或总线扩展器,利用工业标准I2C、SMBus?或SPI?接口简化了I/O口的扩展。当微控制器或芯片组没有足够的I/O端 ...
分类:
其他好文 时间:
2016-06-02 11:21:43
阅读次数:
388