Initial commit: Adapted from hc2problems-2014