http://www.usaco.org/index.php?page=viewproblem2&cpid=891
Is the starting case always 1 2 3, or do I have to loop through all of the combinations of 1,2, and 3? And, does the “g” equal the index of the changing sequence, or the set cup numbers?
http://www.usaco.org/index.php?page=viewproblem2&cpid=891
Is the starting case always 1 2 3, or do I have to loop through all of the combinations of 1,2, and 3? And, does the “g” equal the index of the changing sequence, or the set cup numbers?
You don’t know what order the shells are initially in, so yes, you have to loop through all the combinations.
Also, g indicates the position guessed by Elsie.