匹配子串#include #include #include #include #include #include #include int a[1000005],b[10005];int Next[10005];int n,m;void setNext(){ int i=0,j=-1; ...
分类:
其他好文 时间:
2015-09-05 12:26:12
阅读次数:
154
1 class Solution { 2 public: 3 4 int lengthOfLongestSubstring(string s) { 5 // for ASCII char sequence, use this as a hashmap 6 vector...
分类:
其他好文 时间:
2015-09-05 12:17:57
阅读次数:
127
InnoDB: The log sequence number in ibdata files does not matchInnoDB的:在ibdata文件的日志序列号不匹配可能ibdata文件损坏了解决办法如下:在my.cny 的[mysqld]中加入 # Size of each log fi...
分类:
数据库 时间:
2015-09-04 14:10:36
阅读次数:
339
10.1.2.2容器的分类序列式容器(Sequence containers)每个元素都有固定位置--取决于插入时机和地点,和元素值无关。vector、deque、list 关联式容器(Associated containers)元素位置取决于特定的排序准则,和插入顺序无关set、multiset、...
分类:
其他好文 时间:
2015-09-04 09:51:36
阅读次数:
201
C. SequenceTime Limit: 1 SecMemory Limit: 256 MB题目连接http://codeforces.com/gym/100114DescriptionInteger sequences are very interesting mathematical obj...
分类:
其他好文 时间:
2015-09-03 20:27:15
阅读次数:
150
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1711Number SequenceTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Tota...
分类:
其他好文 时间:
2015-09-03 20:21:36
阅读次数:
150
题意为给一个只有1 2 3组成的序列,通过两两交换得到一个升序的数列,求两两交换的次数拿排序后的序列为标准,先找出交换一次能使两个数变为正确位置的一对数的数量(第一种交换),再找交换一次只能使一个数进入正确位置的三个数的数量(第二种交换)。做第一种交换的代价为需要交换位置的数的(对数),第二种交换的...
分类:
其他好文 时间:
2015-09-02 02:00:34
阅读次数:
125
Write a program to find the n-th ugly number.
Ugly numbers are positive numbers whose prime factors only include 2, 3, 5.
For example, 1, 2, 3, 4, 5, 6, 8, 9, 10, 12 is the sequence of the first ...
分类:
其他好文 时间:
2015-09-02 00:41:00
阅读次数:
224
The TAP controller is a synchronous finite state machine that respondsto changes at the TMS and TCK signals of the TAP and controls the sequence of op...
分类:
其他好文 时间:
2015-09-02 00:07:01
阅读次数:
532
题目:https://leetcode.com/problems/permutation-sequence/ 分析:康托编码 code: // LeetCode, Permutation Sequence // 康托编码,时间复杂度 O(n),空间复杂度 O(1) class Solution { ...
分类:
其他好文 时间:
2015-09-02 00:03:25
阅读次数:
169