Hack Forums
[Java] Looking for insight on how to solve this contest problem - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Java] Looking for insight on how to solve this contest problem (/showthread.php?tid=4073138)



Looking for insight on how to solve this contest problem - fierypk - Feb 20, 2014

Following this thread, I am going to post a java contest problem as someone stated I should.

https://hackforums.net/showthread.php?tid=4058680

This is the problem if someone could walk me through how to solve it, I don't want to be spoonfed, I would really like it if someone can show me the steps you should take when approaching such a problem.

Thank you very much. Sorry the problem is really long as most contest problems are. Feel free to try solving it on your own.

[Image: 7440H.png]

[Image: 744aq.png]


* - Ben121 - Feb 21, 2014

Personally I would probably have a look at this game physically, i.e. playing it myself on my desk, and from there you need to try and identify an algorithm to solve the problem. Maybe try and think about different orders of solving this, is it better to try and place the highest coins first (as in the example), or will other ways work? What sort of situations are going to lead to you not being able to solve this?

This doesn't look like an "easy" problem, don't be disheartened if the solution doesn't jump out straight away.


* - fierypk - Feb 21, 2014

(Feb 21, 2014 08:26 AM)Ben121 Wrote:  Personally I would probably have a look at this game physically, i.e. playing it myself on my desk, and from there you need to try and identify an algorithm to solve the problem. Maybe try and think about different orders of solving this, is it better to try and place the highest coins first (as in the example), or will other ways work? What sort of situations are going to lead to you not being able to solve this?

This doesn't look like an "easy" problem, don't be disheartened if the solution doesn't jump out straight away.

Time management is also key to solving these problems.

You have 5 questions like this some are easier some are a lot harder in fact this was a medium type problem. (Grade 12 Contest). You only get 3 hours to solve all 5 questions. Therefore I should not spend more then an hour on this problem but I can never figure these out. Takes me days to find a solution sometimes, I really think I need some guidance.


* - Barinade - Feb 21, 2014

Tower of Hanoi, this made me chuckle.

http://en.wikipedia.org/wiki/Tower_of_Hanoi


* - Grand Pootis - Feb 22, 2014

(Feb 21, 2014 11:56 PM)Barinade Wrote:  Tower of Hanoi, this made me chuckle.

http://en.wikipedia.org/wiki/Tower_of_Hanoi

Not sure if trying to be incredibly annoying or just are


* - Aura 2.0 - Feb 22, 2014

Is that the CCC? :O I'm going to be writing that this Tuesday! You can find the solutions online. If you'd like I can provide you with a link.


* - emre_wolf - Feb 23, 2014

it is a big problem :S

This is the problem if someone could walk me through how to solve it, I don't want to be spoonfed, I would really like it if someone can show me the steps you should take when approaching such a problem.