ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1510. Order

AC TEST 19
Posted by Iacob Vlad 31 Dec 2011 21:49
program order;
var n,ap,i,j:longint;
    x:array[1..10000] of real;
    begin
    readln(n);
    for i:=1 to n do
    readln(x[i]);
    i:=1;
    while i<=n do begin
    ap:=1;
    for j:=i+1 to n do
    if x[i]=x[j] then ap:=ap+1;
    if ap>(n div 2) then begin writeln(x[i]:0:0);
                         break;
                         end
              else i:=i+1;
              end;
              end.
Re: AC TEST 19
Posted by amirani 14 Jan 2012 14:14
my algo need less time but i got TLE on test 19 . Then i was interested and send your solution . At first your array size was very small and at second time  it got TLE on test 19.
So sorry, but it's not solution.