二分+前缀和法
满足条件的子序列长度在(0,n)之间,sum[x+i]-sum[i]为从从第i个元素开始序列长度为x的元素的和。前缀和可在O(n)的时间内统计
sum[i]的值。再用二分找出满足条件的最小的子序列长度。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#inclu...
分类:
其他好文 时间:
2014-10-15 00:09:19
阅读次数:
251
/common/css/mainStyle.css"type="text/css" /> /user!add.action" name="form...
分类:
其他好文 时间:
2014-10-14 21:48:31
阅读次数:
237
一、Tachyon配置说明Tachyon配置参数分为4类:Master,Worker,Common(MasterandWorker),andUserconfigurations。环境变量配置文件在$TACHYON_HOME/conf/tachyon-env.sh,这些变量将会被TACHYON_JAVA_OPTS调用,这个文件的配置模版为$TACHYON_HOME/conf/tachyon-env.sh.template..
分类:
其他好文 时间:
2014-10-14 20:55:19
阅读次数:
242
最近学习水晶报表,发现编译后报如下错误:未能加载文件或程序集“file:///C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterpri...
分类:
其他好文 时间:
2014-10-14 20:49:09
阅读次数:
218
openssl使用的是macos系统自带的版本,关键点是不同直接使用ios设备打开https的链接,需要将证书发到系统的mail里,安装到设备,如果命令执行不成功,用sudo执行。1.生成服务器的私钥opensslgenrsa-outserver.key10242.生成签署申请(注意除Common ...
分类:
移动开发 时间:
2014-10-14 15:00:28
阅读次数:
189
Source:https://oj.leetcode.com/problems/longest-common-prefix/Write a function to find the longest common prefix string amongst an array of strings.Hi...
分类:
编程语言 时间:
2014-10-14 00:46:47
阅读次数:
306
using System;using System.Collections;using System.Collections.Generic;using System.Configuration;using System.Data;using System.Data.Common;using Sys...
分类:
Web程序 时间:
2014-10-14 00:08:17
阅读次数:
323
鏈接: http://poj.org/problem?id=1458
Description:
A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another sequence Z =...
分类:
其他好文 时间:
2014-10-13 16:43:09
阅读次数:
257
请在Config.ftbl.flashlight.h (mediatek\custom\common\hal\flashlight\src)中,
将所有的两处注释掉的code:
//CameraParameters::FLASH_MODE_AUTO,
都打开为:
CameraParameters::FLASH_MODE_AUTO,...
分类:
移动开发 时间:
2014-10-13 15:11:49
阅读次数:
239
1、mediatek\config\common下的custom.conf中的bluetooth.HostName = ANDROID BT修改为客制化名称;
2、检查 mediatek/external/bluetooth/bt_cust/bt_cust_table.h以下value必须为0。
{
.name = "LocalNameCustPermission",...
分类:
移动开发 时间:
2014-10-13 13:31:19
阅读次数:
190