摘要: 前情:因平常写代码是常将比较函数弄混(写好了排序还要确认一下-.-!),还是写篇博客,方便以后查阅C语言qsort函数对int类型数组排序: 1 #include "stdio.h" 2 #include "stdlib.h" 3 #define N 1005 4 int a[N]; 5 6 //... 阅读全文
posted @ 2015-04-10 21:14 ruo_yu 阅读(244) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1711问题描述:给两个序列a,b,长度分别为n,m(1<=n<=1000000,1<=m<=10000),问序列b是否为序列a的子序列,若是:返回a中最左边的与b相等的子序列的首元素下标;若不是,输出-1... 阅读全文
posted @ 2015-04-10 11:21 ruo_yu 阅读(406) 评论(0) 推荐(0)