On these both problems http://mirror.codeforces.com/contest/479/submission/8334344 and http://mirror.codeforces.com/contest/478/submission/8345538 it gives me only "Denial of Judjement." Is the problem in my code or where it is?
Thank you in advance!!!
Seems there were some problems with judgement. I've rejudged your submit. 8334344
In submission 8345538, the array dp is too large. It has about 4*10^8 ints and uses about 1.6GB memory.