% 血液型分布の初期値
% nc:男性人口，女性人口の1/100
% dist:分布を%で与える
% f:父親の血液型  m:母親の血液型

function [f,m] = blood_type_init (nc, dist)
    
    for k=1:6
        cum(k) = sum(dist(1:k));
    end
    
    f(          1:cum(1)*nc) = "AA";
    f(cum(1)*nc+1:cum(2)*nc) = "AO";
    f(cum(2)*nc+1:cum(3)*nc) = "OO";
    f(cum(3)*nc+1:cum(4)*nc) = "BB";
    f(cum(4)*nc+1:cum(5)*nc) = "BO";
    f(cum(5)*nc+1:cum(6)*nc) = "AB";
    
    m(          1:cum(1)*nc) = "AA";
    m(cum(1)*nc+1:cum(2)*nc) = "AO";
    m(cum(2)*nc+1:cum(3)*nc) = "OO";
    m(cum(3)*nc+1:cum(4)*nc) = "BB";
    m(cum(4)*nc+1:cum(5)*nc) = "BO";
    m(cum(5)*nc+1:cum(6)*nc) = "AB";

end
