zip is a built-in function that takes two or more sequence and ‘zips’ them into a list of tuples, where each tuple contains one element from each sequ...
分类:
其他好文 时间:
2014-07-22 22:53:14
阅读次数:
269
经典kmp 1 #include 2 #include 3 using namespace std; 4 5 int n,m; 6 int a[1000010],b[10010],next[10010]; 7 8 void getnext (int *s,int *next)...
分类:
其他好文 时间:
2014-07-22 22:52:33
阅读次数:
182
题目描述: Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1={11, 12, 13, 14} is...
分类:
其他好文 时间:
2014-07-22 22:48:53
阅读次数:
207
今天服务器cpu使用率一直很高,而且是nice高,说明是一些低优先级的进程占用了大量的cpu,经过排查发先了minerd这个进程以服务器的/tmp目录下找到了源头。。。。。一个简单的脚本: 1 Cpunum=`cat /proc/cpuinfo |grep 'processor'|wc -l`; 2...
分类:
其他好文 时间:
2014-07-21 09:00:58
阅读次数:
299
Problem Description
Whuacmers use coins.They have coins of value A1,A2,A3...An Silverland dollar. One day Hibix opened purse and found there were some coins. He decided to buy a very nice watch in...
分类:
其他好文 时间:
2014-07-20 23:01:28
阅读次数:
271
Problem Description
An equal sum partition of a sequence of numbers is a grouping of the numbers (in the same order as the original sequence) in such a way that each group has the same sum. For examp...
分类:
其他好文 时间:
2014-07-20 15:42:42
阅读次数:
256
Description
We give the following inductive definition of a “regular brackets” sequence:
the empty sequence is a regular brackets sequence,if s is a regular brackets sequence, then (s) and [s]...
分类:
其他好文 时间:
2014-07-19 23:42:40
阅读次数:
258
Consider an arbitrary sequence of integers. One can place + or - operators between integers in the sequence, thus deriving different arithmetical expr...
分类:
其他好文 时间:
2014-07-19 22:37:50
阅读次数:
243
Common Subsequence
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 37614
Accepted: 15058
Description
A subsequence of a given sequence is the given seque...
分类:
其他好文 时间:
2014-07-19 11:17:54
阅读次数:
218
Longest Ordered Subsequence
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 32192
Accepted: 14093
Description
A numeric sequence of ai is ordered if
a1 a2...
分类:
其他好文 时间:
2014-07-19 11:11:54
阅读次数:
159