11892 - ENimEN
Moderator: Board moderators
11892 - ENimEN
Can you hint me how to solve it?
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.
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?
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?
Re: 11892-EnimEn
It is also improtant how many stacks are there with only 1 element, if all of them have 1 element.
-
- Learning poster
- Posts: 62
- Joined: Sat Nov 21, 2009 10:17 pm
- Location: CUET,Chittagong,Bangladesh
Re: 11892-EnimEn
Good knowledge on NIM will help you to solve this problem...
If you have determination, you can do anything you want....

Re: 11892-EnimEn
got ac......
Code: Select all
Last edited by receme on Sun Jun 05, 2011 9:04 pm, edited 1 time in total.
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)
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)

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.
-
- Experienced poster
- Posts: 147
- Joined: Mon Jun 07, 2010 11:43 am
- Location: University Of Dhaka,Bangladesh
- 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:
You should get ac if you can pass this.
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
UVa stats: http://felix-halim.net/uva/hunting.php?id=63448
My blog on programming: http://www.shafaetsplanet.com/planetcoding/
My blog on programming: http://www.shafaetsplanet.com/planetcoding/