vj1409 纪念品分组

Vj1409 纪念品分组

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//±ÉÈ˵ķ½·¨ //¿ìÅÅ+Ì°ÐÄ //°´´ÓСµ½´óÅÅÁÐ ÉèÁ½¸öÖ¸Õë Èç¹ûÊ×Ö¸ÕëºÍβָÕëµÄ¼Û¸ñ²»³¬¹ý w Ôò¿É·ÖΪһ×é ·ñÔòβָÕë¼Û¸ñµ¥¶ÀÒ»×é · const maxn=30000; var n,ans,l,r,w:integer; a:array[0. .maxn] of integer; procedure qs(l,r:integer); var i,j,t,mid:integer; begin i:=l; j:=r; mid:=a[(i+j) >> 1]; repeat while a[i]<mid do inc(i); while a[j]>mid do dec(j); if i<=j then begin t:=a[i]; a[i]:=a[j]; a[j]:=t;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

Vj1409 &ccedil;&ordm;&ordf;&aring;&iquest;&micro;&aring;“&aring;ˆ†&ccedil;&raquo;„

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online