Skip to content

Instantly share code, notes, and snippets.

View jlam55555's full-sized avatar
📚
Busy studenting

Jonathan Lam jlam55555

📚
Busy studenting
View GitHub Profile
#include <algorithm>
#include <cassert>
#include <climits>
#include <iostream>
#include <tuple>
#include <vector>
// m total lines, v + h = m
// O(v^2 * h*log(h))
//
{-# LANGUAGE DeriveGeneric, GADTs, OverloadedStrings, FlexibleContexts, FlexibleInstances, TypeFamilies, TypeApplications, DeriveAnyClass, StandaloneDeriving, TypeSynonymInstances, MultiParamTypeClasses, ImpredicativeTypes #-}
-- following tutorial from https://haskell-beam.github.io/beam/tutorials/tutorial1/
-- minimal example for https://stackoverflow.com/q/69319523/2397327
-- need to have beam-core and beam-sqlite packages installed
import Database.Beam.Sqlite
import Database.SQLite.Simple
-- version 1