随笔分类 -  数据结构

摘要:1.归并排序#include using namespace std;const int maxn = 1000;int a[maxn],b[maxn];int ans;void merge_sort(int x,int y){ if(y-x>1) { int m = x+... 阅读全文
posted @ 2015-05-02 00:37 Bug_Clearlove 阅读(897) 评论(0) 推荐(0)
摘要:第一种方法是kmp:将一个数组复制一次,然后再用另一个进行匹配。#include #include #include #include using namespace std;const int N = 200005;const int MOD = 360000;int a[N],b[N],c[2*... 阅读全文
posted @ 2015-04-20 22:24 Bug_Clearlove 阅读(233) 评论(0) 推荐(0)
摘要:G -Awesome Backup SystemTime Limit:2000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeURAL 2030DescriptionIt is known that all... 阅读全文
posted @ 2015-04-10 11:04 Bug_Clearlove 阅读(233) 评论(0) 推荐(0)