Difficult icpc problem

Revision en1, by margaery, 2016-10-13 13:31:41

hey, can someone please help me with this problem? https://icpcarchive.ecs.baylor.edu/external/74/7401.pdf https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&category=691&page=show_problem&problem=5423

You are given an infinite binary indexed tree, where each node's value is its index. You're also given two integers, N and K. you're supposed to print a walk on this tree, where each node you visit, you either add or subtract it to your sum. The length of the walk must be K and the final sum must be N.

thanks.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English margaery 2016-10-13 13:31:41 648 Initial revision (published)