Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
What wrong???var p:array[0..10000] of integer; var i,l,m,n,r,t,u:integer; begin {assign(input,'inp.1');reset(input);} read(n);p[0]:=0;u:=0; for i:=1 to n do begin l:=1; r:=u;read(t); repeat m:=(l+r)div 2;if t<p[m] then r:=m-1 else l:=m+1 until l>r; p[l]:=t;if l>u then u:=l; end; write(u); end. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator