Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

为什么超时了?

Posted by 1993623 at 2008-11-08 20:07:15 on Problem 3250
program z;
Var
  n,i,j,k,v,count:Longint;
  a,ans:Array [1..80000] of Longint;
Begin
  Readln(n);
  v:=0;
  For i:=1 to n do Readln(a[i]);
  For i:=1 to n - 1 do begin
    k:=i + 1;
    count:=0;
    While (a[i]>a[k])and(k<=n) do begin Inc(count);Inc(k);end;
    v:=v+count;
  end;
  Writeln(v);
End.

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator