|
|
back to boardAC TEST 19 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. |
|
|