A tutorial on ACM/ICPC related mathematics