This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.Ord (Down(..), comparing) | |
import Data.List (permutations, sortBy) | |
import Data.Maybe (listToMaybe) | |
import qualified Data.Set as Set | |
-- | A matrix of approval votes. @forall (a :: 'Approvals'). a !! i !! j@ | |
-- is the number of approval votes that person @i@ awarded to person @j@. | |
type Approvals = [[Int]] | |
-- | List of list of indices representing a partition of a list. Invariant: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Applicative | |
import Control.Monad | |
import Control.Concurrent | |
import Data.String | |
import Data.Char | |
import Data.List | |
import Data.Monoid | |
import Control.Monad.IO.Class |