题目:http://hzwer.com/3419.html题意:给你一个全是0的数列,有m种操作[Li,Ri],每次操作就将下标处于[Li,Ri]的元素取反。你可以选若干个操作来使这个数列最后变成别的样子,求最后的数列有多少种分析:容易知道如果每个操作都是不能被其他操作的组合替代,那么这个操作就对操...
分类:
其他好文 时间:
2015-03-06 23:29:13
阅读次数:
234
Problem Description
The counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bomb counts from 1 to N. If the curren...
分类:
其他好文 时间:
2015-03-06 19:15:02
阅读次数:
145
题意:N个数。a1...aN。对于每个数而言,每一步只能加一或减一。问最少总共需要多少步使得新序列是非递减序列。N(1?≤?N?≤?5000)思路:*一个还不知道怎么证明的结论(待证):最后的新序列b1...bN中的每一个数bi,一定是原a1..aN序列中的某个数。将a1..aN从小到大排列,得到c...
分类:
其他好文 时间:
2015-03-06 15:38:03
阅读次数:
108
Implement wildcard pattern matching with support for '?' and '*'.
'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).
The matching should cover t...
分类:
其他好文 时间:
2015-03-06 11:21:20
阅读次数:
168
题目大意:Wavio序列是关于整数的序列,有这样的性质:
1.长度为奇数,L=2*n+1
2.前n+1项严格递增
3.后n+1项严格递减
4.相邻的两个数不相等
给出n个数的序列,求出其中最长的Wavio子序列的长度。
依次对每个元素求以它为结束的最长上升子序列和以它为开始的最长下降子序列,b[i]为以i为最后一个元素的最长上升子序列,c[i]为以i为第一个元素的最长下降子序列...
分类:
其他好文 时间:
2015-03-06 01:03:40
阅读次数:
222
create table Sequence_OA_Merchants_EnterpriseBasic( -- ID列为自增列 SeqID int identity(1,1) primary key, -- Sequence值 SeqVal varchar(1)...
分类:
数据库 时间:
2015-03-05 20:49:04
阅读次数:
217
Max SumProblem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,...
分类:
其他好文 时间:
2015-03-05 19:19:15
阅读次数:
161
Data Frame一般被翻译为数据框,感觉就像是R中的表,由行和列组成,与Matrix不同的是,每个列可以是不同的数据类型,而Matrix是必须相同的。Data Frame每一列有列名,每一行也可以指定行名。如果不指定行名,那么就是从1开始自增的Sequence来标识每一行。初始化使用data.f...
分类:
编程语言 时间:
2015-03-05 18:40:46
阅读次数:
172
Sorting It All OutTime Limit:1000MSMemory Limit:10000KTotal Submissions:28762Accepted:9964DescriptionAn ascending sorted sequence of distinct values i...
分类:
其他好文 时间:
2015-03-05 14:16:42
阅读次数:
202