Need Help

There are M students sitting in a circle and there ID is 1 to M.they started to play a game.Game goes in following manner-
There are R rounds.Each round starts with player of ID P and Coins C at the center of Circle.Each player in his turn can pick at most of K and minimum of 1 coins from it.Player who picks last coins wins the game.let if winner has ID W, Points are then awarded in the following manner :
player with ID W gets M points
player with ID W+1 gets M-1 points
Player with ID W+2 gets M-2 points
.
.
.
player with ID W-1 gets 1 point
(..because the juniors are sitting in a circle)
Assume that each player makes every move so as trying to maximize his/her own points.Output player with maximum points at the end of game.

Can you tell the approach too solve the problem?
Well, a first possible step can be to try to write some pseudo-code to solve the problem, outlining exactly what your program needs to do and the steps involved.
Topic archived. No new replies allowed.