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 1028. Stars

Help me, please!
Posted by Giorgi 7 Feb 2002 20:23



var  n:integer;
     b:array [0..32000] of integer;

procedure inp;
 var i,j,k:integer;
 begin
  readln(n);
  fillchar(b,sizeof(b),0);
  for i:=1 to n do
   begin
    read(j,k);
    b[j]:=b[j]+1;
   end;
 end;

procedure ou;
 var i,j,k,p:integer;
 begin
  k:=-1;
  for i:=0 to 32000 do
   if b[i]<>0 then
    begin
     inc(k);
     writeln(b[i]);
    end;
  for i:=k+1 to n-1 do
   writeln(0);
 end;

begin
 inp;
 ou;
end.

Please give  me  test
Help for you(+)
Posted by Nazarov Denis (nsc2001@rambler.ru) 7 Feb 2002 20:51
See at this test:
5
1 1
5 1
7 1
3 3
7 5
Rigth Answer:
1
2
1
0
1
Picture for test:
------*
-------
--*----
-------
*---*-*
For more explaination e-mail me to nsc2001@rambler.
I give you full explaination of problem and(if you want)AC-program...
But I ask you to help me too.I saw that you have done problem 1065. I
work hardly at this problem but get WA.I don't know where I've
mistaken (may be in algorithm :-) ).So I ask you to give me
explaination of problem 1065 and AC-program(if i'll misunderstand you
explaination).

With best regrads, Nazarov Denis.