|
|
вернуться в форумHelp me, please! Послано Giorgi 7 фев 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(+) 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. |
|
|