i am trying to solve this spoj problem
http://www.spoj.pl/problems/ZUMA
i am unable to find a possible dp state .
can someone guide me what would be a possible dp state for this problem.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I already accepted that problem in SPOJ.
My state is, from position
itojwithpequals elements. For transition you should consider two case:ilike you need to exploit that piece, then we will have the same problem but consideri+1tojqis the position of an ahead element equal to the piece ini. We should consider solving the problem fromitoq-1and then fromqtojfor everyq.