vj1120 &egrave;Š&plusmn;&ccedil;”Ÿ&eacute;‡‡&aelig;‘˜

# Vj1120 èŠ±ç”Ÿé‡‡æ‘˜

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

//±ÉÈËµÄ·½·¨ //¿ìÅÅ+Ä£Äâ //Èç¹ûÄÜµ½ÏÂÒ»¸öµã²ÉÕª²¢ÄÜ»Øµ½Â·±ß Ôòµ½ÏÂÒ»¸öµã ² ¢½«×ÜÊ±¼ä¼õÈ¥¹ýÈ¥µÄÊ±¼äºÍ²ÉÕªµÄÊ±¼ä ¢ //×¢ÒâÊ±¼äÊÇ×ø±ê²îµÄ¾ø¶ÔÖµ ¼õÈ¥µÄÊ±¼äÊÇ¹ýÈ¥µÄÊ±¼äºÍ²ÉÕªµÄÊ±¼ä / const maxn=400; type node=record x,y,s:integer; end; var n,m,time:integer; ans:longint; a:array[0. .maxn] of node; procedure qs(l,r:integer); var i,j,mid:integer; t:node; begin i:=l; j:=r; mid:=a[(i+j) >> 1].s; repeat while a[i].s>mid do inc(i); while a[j].s<mid do dec(j); if i<=j then begin t:=a[i]; a[i]:=a[j]; a[j]:=t;

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 02/21/2011 for the course CS 001 taught by Professor 001 during the Spring '11 term at Shandong University.

### Page1 / 2

Vj1120 èŠ±ç”Ÿé‡‡æ‘˜

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

View Full Document
Ask a homework question - tutors are online