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 |
ft~我刚才太死心眼了,想出来线段树了In Reply To:我似乎就是线形查找的构造.......而且似乎我这样都没法用线段树.....里面有程序~ Posted by:palmtenor at 2005-05-10 14:58:30 > const > maxn=8000; > var > seq:array[1..maxn] of longint; > i,j,k,l,m,n,t,s:longint; > begin > while not eof(input) do begin > readln(n); > fillchar(seq,sizeof(seq),0); > seq[1]:=1; > for i:=2 to n do begin > readln(seq[i]); > inc(seq[i]); > for j:=1 to i-1 do if seq[j]>=seq[i] then inc(seq[j]); > end; > for i:=1 to n do writeln(seq[i]); > end; > end. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator