Knuth Optimization - Preparation to IOI Part 6