output :: Assignment -> IO ()
output a = do
  putStrLn $ "o " ++ show optimumValue
  mapM_ putVS a

  where
    optimumValue = length $ nub $ snd <$> a

    putVS (v,s) = putStrLn . concat $
      [ show (jobID v)
      , " "
      , show (vmIndex v)
      , " -> "
      , show (serverID s)
      ]
output :: Assignment -> IO ()
output a = do
  putStrLn $ "o " ++ show optimumValue
  mapM_ putVS a

  where
    optimumValue = length $ nub $ snd <$> a

    putVS (v,s) = putStrLn . concat $
      [ show (jobID v)
      , " "
      , show (vmIndex v)
      , " -> "
      , show (serverID s)
      ]
output a = do
  putStrLn $ "o " ++ show optimumValue
  mapM_ putVS a

  where
    optimumValue = length $ nub $ snd <$> a

    putVS (v,s) = putStrLn . concat $
      [ show (jobID v)
      , " "
      , show (vmIndex v)
      , " -> "
      , show (serverID s)
      ]