I'm starting to provide Chinese / English versions of some articles, switch with the Language menu above. 我开始提供部分文章的中文、英文翻译,请使用顶部语言菜单切换。

各种OIer的快排(Pascal语言)

OIer 1: procedure qsort(l,r:longint); var i,j,m,t:longint; begin i:=l; j:=r; m:=a[(l+r) div 2]; repeat while a[i]m do dec(j); if ij; if l <j then qsort(l,j); if i <r then qsort(i,r); end; OIer 2: Procedure QuickSort(Left, Right : Longint); Var LeftPointer, RightPointer, Medium, Temp : Longint; Begin LeftPointer := Left; RightPointer := Right; Medium :...