00:01
Hello students, so let us look at this question.
00:04
So the program that initializes the starting phase of the rubik's cube, starts the timer, solves the rubik's cube, stops the timer and prints the time it took to solve the rubik's cube and prints the starting phases of the rubik's cube is as follows.
00:18
So the first thing that we have to write the c+ + program is that we have to start with the hashtag include, hashtag include iostream, then hashtag include chrono, hashtag include chrono, then using namespace std, that is standard header file, using namespace std and then int main, that will cover the main part of the program.
01:09
Then first that we have to initialize the starting phases of the rubik's cube.
01:14
So to initialize the starting phases of the rubik's cube, we can write char, that is a character variable starting, starting underscore phases of 6 and 3 which is equal to, so it would be blue, blue and white, then it could be green, white and yellow, it could be red, green and it could be orange, it could be white, yellow or it could be red and at the end it could be blue, orange or it can be green.
02:41
After that closing this line of code.
02:46
Now the second thing is that we have to set the timer, to set the timer we can use the variable autostart, so autostart is equal to chrono, high performance or high resolution, underscore resolution clock now and it will solve the rubik's cube...