题目: http://acm.timus.ru/problem.aspx?space=1&num=1181 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=27048#problem/A 1181. Cutting a Painted Polygon Time limit: 1.0 second Memory limit: 64 MB There is a convex polygon with vertices painted in…
QuickSort 参考<算法导论>,<C程序设计语言> #include<stdio.h> void swap(int v[], int i, int j); void view(int v[]); //主元为A[r] //partition后,A[p..i]<=A[r] //A[i+1]=A[r] //A[i+2..r]>A[r] int partition(int A[], int p, int r) { int x = A[r]; ; for(int…