Constant aoc::year2021::day21::DIRAC

source ยท
const DIRAC: [(usize, usize); 7];
Expand description

Rolling the Dirac dice 3 times results in 27 quantum universes. However the dice total is one of only 7 possible values. Instead of handling 27 values, we encode the possible dice totals with the number of times that they occur. For example a score of 3 (1 + 1 + 1) only happens once in the 27 rolls, but a score of 6 happens a total of 7 times.