Sure, but why? The solution is n%3. DP will by more complex and
slower.

On Jan 16, 11:43 am, siva <sivavikne...@gmail.com> 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 <danhnguyen0...@gmail.com>
> > wrote:
> > > Can you please explain by which theorem you use to find out that?
>
> > > On Sat, Jan 12, 2013 at 11:41 AM, Lucifer <sourabhd2...@gmail.com>
> > 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