## 11892 - ENimEN

Moderator: Board moderators

jurong
New poster
Posts: 6
Joined: Wed Oct 06, 2010 1:05 pm

### 11892 - ENimEN

Can you hint me how to solve it?

Leonid
Experienced poster
Posts: 146
Joined: Thu Dec 22, 2005 5:50 pm
Contact:

### Re: 11892-EnimEn

If there is more than one element in any stack then the first player can choose to take the whole stack, or leave one element. Think about the difference and you should be able to solve this problem.

jurong
New poster
Posts: 6
Joined: Wed Oct 06, 2010 1:05 pm

### Re: 11892-EnimEn

I also think that if a stack has more than one element, we can consider it has 2 elements.
I call A is the number of stack has more than 1 element and B is the number of stack has 1 element.
But I dont know where i am wrong?

Leonid
Experienced poster
Posts: 146
Joined: Thu Dec 22, 2005 5:50 pm
Contact:

### Re: 11892-EnimEn

It is also improtant how many stacks are there with only 1 element, if all of them have 1 element.

naseef_07cuet
Learning poster
Posts: 62
Joined: Sat Nov 21, 2009 10:17 pm

### Re: 11892-EnimEn

If you have determination, you can do anything you want....

receme
New poster
Posts: 17
Joined: Thu Jul 01, 2010 11:55 am

### Re: 11892-EnimEn

got ac......
Last edited by receme on Sun Jun 05, 2011 9:04 pm, edited 1 time in total.

robot
New poster
Posts: 29
Joined: Sun May 24, 2009 8:39 pm

### Re: 11892-EnimEn

Hi receme..
I think ur process something wrong..
1
6
3 5 2 4 6 8
output:
poopi

my hints: u can use XOR concept..
ASU(SUST)

receme
New poster
Posts: 17
Joined: Thu Jul 01, 2010 11:55 am

### Re: 11892-EnimEn

Thank you. I have got ac now...actually I didn't understand the problem. I thought a player can take only one object. But it is wrong. It is possible to take any number of object. Thanks to maccy who opened my eyes. I was a fool.

Shafaet_du
Experienced poster
Posts: 147
Joined: Mon Jun 07, 2010 11:43 am
Contact:

### Re: 11892-EnimEn

You don't need XOR approach or any kind of knowledge on nim. Just do some thinking. Try this cases if you get wa:

Code: Select all

``````7
3 2 1 1
4 2 2 1 1
5 2 2 2 2 2
6 82 62 24 12 2 32
6 1 1 1 1 1 1
5 1 1 1 1 1
6 2 3 4 1 1 1
``````

Code: Select all

``````poopi
poopi
poopi
poopi
piloop
poopi
poopi
``````
You should get ac if you can pass this.

moon_du
New poster
Posts: 1
Joined: Tue Jun 14, 2011 5:25 am

nice one shafaet