
-- IMPORTS

import List(sort)


-- TYPES

type Seat = [Int]
type Train = [Seat]
type Reservation = (Int,Int)


-- ONLINE FIRST-FIT

onlineFirstFit :: Int -> Int -> [Reservation] -> Train
onlineFirstFit n k requests = ...


-- OFFLINE LEFT-TO-RIGHT FIRST-FIT 

offlineLeftToRight :: Int -> Int -> [Reservation] -> Train
offlineLeftToRight n k requests = onlineFirstFit n k (sort requests)


-- STATISTICS

ratio :: Int -> Int -> [Reservation] -> Float
ratio n k requests = ...
