dp / bit-masking / dp with profile / matrix exponentiation
How to approach this problem http://www.spoj.com/problems/AIRLINES/
ABC 356 Quick Solution Discussion (with myself)
Atcoder ABC #356 Solution Discussion