function test(n,m,k)=[team]
% function test(n,m,k);
% n - number of questions
% m - number of people
% k - number of trials

res3=zeros(k,4);
res=zeros(m,1);
team=[0 0 0 0];

for j=1:k,
  for i=1:m,
    x=floor(rand(n,1)*4);
    y=floor(rand(n,1)*4);
    res(i)=sum(x==y);
  end;

  res=res*3+75;
  res2=rem(res,4);
  res3(j,:)=hist(res2,4);

  for i=1:4
 	 team(i)=team(i)+sum((res2==i-1));
  end;

end;

figure(3)
plot(team)
team

if (k==1)
  figure(1)
  plot(res3);
  figure(2)
  hist(x);
else
  figure(1)
  plot(std(res3));
  figure(2)
  plot(mean(res3));
end;


