aoc2020-0.1.0.0: Development environment for Advent of Code challenges
LicenseBSD3
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

AOC.Challenge.Day01

Description

Day 1. See AOC.Solver for the types used in this module!

Synopsis

Documentation

knapsack Source #

Arguments

:: forall n. SNatI n 
=> Int

goal sum

-> IntSet

set of options

-> Maybe (Vec ('S n) Int)

resulting n items that sum to the goal

Given a goal sum and a set of numbers to pick from, finds the n numbers in the set that add to the goal sum. The number of items desired is inferred from the desired length of the return type.