Ya I'm aware, Just wanted to confirm. Suppose if the problem can't be 
reduced to a mathematical formulae , then DP must be the reliable solution 
for this kind of problems.
That's why wanted to know exact DP solution also..

On Wednesday, 16 January 2013 22:42:52 UTC+5:30, Don wrote:
>
> Sure, but why? The solution is n%3. DP will by more complex and 
> slower. 
>
>
> On Jan 16, 11:43 am, siva <[email protected]> wrote: 
> > Thanks all for solutions, but this problem can also be solved using DP 
> > right ??? 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > On Wednesday, 16 January 2013 01:57:26 UTC+5:30, Don wrote: 
> > 
> > > Sprague–Grundy theorem 
> > 
> > > On Jan 12, 6:28 pm, Nguyễn Thành Danh <[email protected]> 
> > > wrote: 
> > > > Can you please explain by which theorem you use to find out that? 
> > 
> > > > On Sat, Jan 12, 2013 at 11:41 AM, Lucifer <[email protected]> 
> > > wrote: 
> > > > > if (n%3 == 0) 
> > > > >       "Player 1 will lose" 
> > > > > else 
> > > > >       "Player 1 will win. The no. of balls picked in the first 
> turn 
> > > will 
> > > > > be n%3" 
>

-- 


Reply via email to