Christine's Sense of Direction
Christine is on a hiking trip to a mountain. She decided to return to her town by a
canoe. She is good in canoeing, but not so good with directions. The river
originates from the glacier from where Christine will also start her trip. The river
flows a distance M kilometers before it splits into two smaller rivers. Each of these
rivers further travels another M kilometers distance before they split.
There are towns at the points where the riverS split. The towns are numbered.
The river first splits at town 1. Every town downstream from town v, is numbered
2°v (left) and 2*v+1 (right). Christine knows the location of her town is Q and has
started canoeing. After traveling a certain distance, she realized that she was on
the wrong route for the past K kilometers. If she is currently at town P, how much
distance does she have to row now to reach her town?
Note: The rivers only split and never merge.
Input Specification
input1: M the distance between adjacent towns
Answers
Answered by
1
Answer:
shawon Assoc Shahnoor J son ihxigdodigodtsfksgisigskgxtodigsivogditdigditsitdgdogdoydydkysyoigsitsoy
Explanation:
gif of forkrlydlydlkgdkhdkhdlhdkdkrkekgdgkshkdohdhldhkdkydhloyoydlhdyoduourupyod
Similar questions