Spoj problem IPL1

I am trying to solve the SPOJ problem “Cricket Tournament

my solution :- uMkMgx - Online C++ Compiler & Debugging Tool - Ideone.com

i am using 3D dp for wickets, balls and required runs then memorising all possible states

i am not getting why WA… but according to me it is working fine for all test cases…

plz can someone help???

thank u