package math.entropia;

import math.utils.MathUtil;

import java.util.*;

public class Rozmieszczenie8_4_1{
	private static final String[] str = {"[3, 0, 0]", "[0, 3, 0]", "[0, 0, 3]",
			"[2, 1, 0]", "[2, 0, 1]", "[1, 2, 0]", "[0, 2, 1]", "[0, 1, 2]",
			"[1, 0, 2]", "[1, 1, 1]"};

	public static void main(String[] args) {
		int[] tabl = new int[3];
		int[] str2 = new int[10];
		for(int j = 0; j < 2700000; j++){
			Arrays.fill(tabl, 0);
			for(int i = 0; i < tabl.length; i++){
				int a = MathUtil.randomInRange(1, 3);
				tabl[a - 1]++;
			}
			for(int k = 0; k < str.length; k++){
				if(str[k].equals(Arrays.toString(tabl))){
					str2[k]++;
					break;
				}
			}
		}
		System.out.println(Arrays.toString(str2));
	}
}
