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 1263. Elections

pascal program!!!
Posted by luke415 30 Mar 2004 11:18
program cl;
var
  n,m,i,j:integer;
  l:array[1..10000]of integer;
  a:real;
begin
  readln(n,m);
  for i:=1 to m do
    begin
      readln(j);
      inc(l[j]);
    end;
  for i:=1 to n do
    begin
      a:=l[i]/m*100;
      writeln(a:4:2,'%');
    end;
end.
Who faster
Posted by BAHO & Dreik 9 Aug 2004 03:30
My program have on test 0.062cek and 457 КБ.
Var
N,M,i,N0:longint;
S:real;
A:array[1..10000] of real;

Begin
 Read(N);
 Readln(M); S:=100/m;
 fillchar(A,sizeof(A),0);
 For i:=1 to m do
 begin
   Readln(N0);
   A[N0]:=A[N0]+S;
 end;
 For i:=1 to N do
  Writeln(A[i]:0:2,'%');
End.
Re: Who faster
Posted by Eugene Shelepov 11 Aug 2005 03:23
I have 0,046
var arr:array[1..10000] of integer;
a:real;
i,n,m,tm:integer;
begin
{for i:=1 to 10000 do arr[i]:=0;}
read(n,m);
for i:=1 to m do begin read(tm); inc(arr[tm]); end;
a:=m;
for i:=1 to n do writeln(arr[i]/a*100:0:2,'%')
end.
Re: Who faster
Posted by famas 11 Aug 2005 04:32
daaaaaaa!!!!!!!!
It is not possible!!!
What ingenious decision!!!
sorry for ALL but I BEST!!
Posted by Tolstobrov_Anatoliy[Ivanovo SPU] 11 Aug 2005 05:05


BUT i FIRST on this solution!!
see aLL!
http://acm.timus.ru/rating.aspx?space=1&num=1263

Edited by author 11.08.2005 05:54
Re: CAN IT BE FASTER?? =))
Posted by Eugene Shelepov 11 Aug 2005 06:22
I'm the winner now!
Posted by Eugene Shelepov 11 Aug 2005 06:25