vj1237 &eacute;š&aring;&frac12;&cent;&ccedil;š„&ccedil;&iquest;…&egrave;†€

# Vj1237 éšå½¢çš„ç¿…è†€

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

//±¾ÌâÊý¾ÝÓÐ·ÇÕýÊý£¡ / //±ÉÈËµÄ·½·¨ //ÉèÍ·Î²Ö¸Õë·Ö±ðÎª l,r //µ±a[l]/a[r]<pft Ê± l ÔÙÔö¼Ó l Ã»ÓÐ²»»áÕÒµ½¸üÓÅµÄ½â ÕâÊ±ºò inc(r) //µ±a[l]/a[r]>prt Ê± ÔÙÔö¼Ó r ²»»áµÃµ½¸üÓÅ½â ÕâÊ±ºò inc(l) / //±ÉÈËµÄÎÊÌâ //ÓÃ real ¾«¶È²»¹» Ó¦ÓÃ double / const maxn=30000; pft=(sqrt(5)-1)/2; var n,p,q:longint; mini:double; a:array[0. .maxn] of longint; procedure qs(l,r:integer); var i,j,mid,t:longint; 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

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

Vj1237 éšå½¢çš„ç¿…è†€

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

View Full Document
Ask a homework question - tutors are online