ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Common Board

move to invert
Posted by bernoulli 13 Jun 2009 05:47
I need that anyone explain me me how to resolve this problem:

Can yo help with the resolution of the fallowing problem:
A triangle made of coins of height h is as follows:
It has h coins at the base and h-1 coins one level above base and so on.(Coins are placed as shown in the figure below)


And at the top most level there will be only one coin
Now given h the task is to invert this triangle by moving minimum number of coins. For example when h=4 triangle is

For h=4 atleast 3 coins must be moved to invert it

I appreciate any help or suggestione