You are not logged in. Please login at www.codechef.com to post your questions!

×

Approach for problem GAMCOUNT

The problem link is: https://www.codechef.com/problems/GAMCOUNT Approach:

As we know Henry gonna win every game in which possible number of all valid moves is odd. So we calculate total number of valid moves of each of Xi(see NOTE) and sum them. More generally Henry wins if the sum of all these moves is odd ,also problem can be simplified if considering total moves of each number Xi as either even or odd, then just look if there are odd number of odds in initial given Xi set and count these games in answer. - Is this approach is correct? NOTE: we can simply get valid number of moves with Xi by just knowing how many times we can subtract 2^V(Xi) so that resulting number be >=0.

asked 17 Mar '17, 18:32

shubham_raj199's gravatar image

5★shubham_raj199
621
accept rate: 0%

edited 22 Mar '17, 09:03

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×1,657
×1,186
×631

question asked: 17 Mar '17, 18:32

question was seen: 288 times

last updated: 22 Mar '17, 09:03