优化
文章平均质量分 88
FinkyS
finding my own sky
展开
-
POJ - 2299 Ultra-QuickSort【归并排序】
描述: 求逆序对 思路: 归并排序 实现代码: #include int is1[500001],is2[500001]; long long sum=0; void merge(int low,int mid,int high) { int i=low,j=mid+1,k=low; while(i<=mid&&j<=high) if(is1[i]<=is1[j])原创 2013-07-17 17:05:39 · 512 阅读 · 0 评论 -
SPOJ - 2325 【String Distance】 【dp、剪枝】
Description Let A = a1a2...ak and B = b1b2...bl be strings of lengths k and l, respectively. The string distance between A and B is defined in the following way (d[i,j] is the distance of substring原创 2013-07-22 18:16:26 · 428 阅读 · 0 评论