Problem: http://www.spoj.com/problems/PARTY/
Solution: http://ideone.com/XWCBcI
I am using the recurrence relation given here but as you can see it's not giving the correct output for the second case. Please help me find the error.
Problem: http://www.spoj.com/problems/PARTY/
Solution: http://ideone.com/XWCBcI
I am using the recurrence relation given here but as you can see it's not giving the correct output for the second case. Please help me find the error.