2014年8月24日
摘要:
/** * Created by xie on 14-8-24. */ public class KMP { private String pat; private int M; private int R=256; private int dfa[][]; public KMP(String pa...
阅读全文
posted @ 2014-08-24 14:31
DLLEARNERBNU
阅读(170)
推荐(0)
摘要:
/** * Created by xie on 14-8-24. */public class KMP { private String pat; private int M; private int R=256; private int dfa[][]; public...
阅读全文
posted @ 2014-08-24 14:30
DLLEARNERBNU
阅读(151)
推荐(0)
2014年6月14日
摘要:
#include #include using namespace std;int getMoreHalfNumber(int a[],int n){ int m=a[0]; int times=1; for(int i=1;i<n;i++){ if(times==0){ m=a[i]; ...
阅读全文
posted @ 2014-06-14 23:56
DLLEARNERBNU
阅读(143)
推荐(0)
摘要:
#include #include #include using namespace std;const int MAX=65536;int a[MAX];int n; //pointervoid swap(int i,int j){ a[i]=a[i]^a[j]; a[j]=a[i]^a[j]; ...
阅读全文
posted @ 2014-06-14 23:21
DLLEARNERBNU
阅读(122)
推荐(0)
摘要:
#include #include using namespace std;int find(int a[],int n){ int maxValue=INT_MIN; int sum=0; for(int i=0;i<n;i++){ if(sum<0){ sum=a[i]; }else{ ...
阅读全文
posted @ 2014-06-14 20:15
DLLEARNERBNU
阅读(103)
推荐(0)
摘要:
#include #include #include using namespace std;const int MAXBIT=12;char* combine1=new char[MAXBIT*2+1];char* combine2=new char[MAXBIT*2+1];bool cmp(co...
阅读全文
posted @ 2014-06-14 20:09
DLLEARNERBNU
阅读(157)
推荐(0)
2014年6月13日
摘要:
void dfs(int k,int target,vector& candidates,vector& sol,vector >& res){ if(target==0){ vector temp(sol); res.push_back(temp); return; }else if(tar...
阅读全文
posted @ 2014-06-13 23:47
DLLEARNERBNU
阅读(114)
推荐(0)
2014年6月11日
摘要:
1 #include 2 #include 3 #include 4 using namespace std; 5 6 7 void findMaxDist(int a[],int n,int &s,int &e){ 8 vectorright_max_pos(n,0); 9 ...
阅读全文
posted @ 2014-06-11 22:46
DLLEARNERBNU
阅读(213)
推荐(0)