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 1036. Lucky Tickets

What is "Compilation error"?
Posted by michael stoudemire 18 Aug 2007 20:15
What is "Compilation error"?
It seems that there's nothing wrong with my program.

type ac=array[1..100]of longint;
var a,c:array[0..1000]of ac;b,d,e,f,g,h,i,j,k,l,m,n:longint;
function add(a,c:ac):ac;
var i,j:longint;
begin
 j:=0;
 for i:=100 downto 1 do begin
  add[i]:=a[i]+c[i]+j;
  j:=add[i] div 10;
  add[i]:=add[i] mod 10;
 end;
end;
function times(a,c:ac):ac;
var i,j,l:longint;
begin
 fillchar(times,sizeof(times),0);
 for i:=100 downto 1 do begin
  l:=0;
  for j:=100 downto 1 do
   if i+j-100>0 then begin
    times[i+j-100]:=times[i+j-100]+a[i]*c[j]+l;
    l:=times[i+j-100] div 10;
    times[i+j-100]:=times[i+j-100] mod 10;
   end;
 end;
end;
procedure out(a:ac);
var i,j:longint;
begin
 for i:=1to 100 do
  if a[i]<>0 then break;
 for j:=i to 100 do
  write(a[j]);
 writeln;
end;
begin
 read(m,n);
 if (n mod 2=1)or(m*2*9<n) then
  writelN('0')
 else begin
  fillchar(a,sizeof(a),0);
  a[0,100]:=1;
  for i:=1to n do begin
   c:=a;
   fillchar(a,sizeof(a),0);
   for j:=1to m do
    for l:=0to 9 do
     if j>=l then a[j]:=add(a[j],c[j-l]);
  end;
  out(times(a[m],a[m]));
 end;
end.
Re: What is "Compilation error"?
Posted by Razdolbay from SIS 18 Aug 2007 21:12
My compiler says
"Error: Not enough actual parameters"

>> add[i]:=a[i]+c[i]+j;
>> fillchar(times,sizeof(times),0);