https://code.google.com/codejam/contest/8264486/dashboard
Simple. For each position, check how many letter can it spell.
Simple. For each number a in A and each number b in B, calculate
a^b and rememeber into a HashMap.
Then for each number c in C and each number d in D, calculate
how many pairs are there in HashMap where a^b=K^c^d.
Another HashMap problem.
For each loop, calculate all possible values generated and its possibility.
Hard, extremely hard problem.
Please read this Quora Explanation
if you don't have any idea.
Check D.java for my implementation.