You are not logged in. Please login at www.codechef.com to post your questions!

×

# please tell me the algorithm of H1 code.

 0 1 Hi. I am new to codechef. I want to code the problem named " A puzzle game". It is the first problem in beginner level. But I cant understand how to approach. Please anyone give me a hint so that I can approach the problem. asked 08 Jun, 21:55 1 accept rate: 0%

 0 Okay this problem is a little bit hard for beginners so don't worry if you don't understand I will give hints one by one read one by one and as soon as you get something that you have missed go back to the problem to solve it if even then you can't solve then read further hints View Content View Content View Content View Content View Content View Content answered 09 Jun, 16:08 4★ssp547 307●7 accept rate: 25%
 0 I wonder how did you save the step for each state. I stored states in a truct like this  struct cube_t{ int X11 , X12 , X13; int X21 , X22 , X23; int X31 , X32 , X33; bool operator ==(const cube_t& cb) const {} bool operator <(const cube_t& cb) const{} void operator =(cube_t& cb) const{} };  and i tried to store step with a map map m_Cube;  but that was not work correctly, the map cannot compare correctly bettween 2 the same cube_t and i have to changed to this map m_Cube;  and it work correctly. answered 06 Dec, 10:38 0★binhla 1 accept rate: 0%
 toggle preview community wiki:
Preview

### Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×138
×20
×9
×7

question asked: 08 Jun, 21:55

question was seen: 402 times

last updated: 06 Dec, 10:38