As a reminder, we went over DFS and floodfill this class. We saw how DFS can be used to travel through a graph and find which vertices are reachable from a given vertex, and floodfill has roughly the same concept. For your homework, try to complete at least one of the USACO practice problems that we started working on during class. Choose the problem that you feel best suits you, but of course, feel free to work on all of them. Here is the bronze problem: http://www.usaco.org/index.php?page=viewproblem2&cpid=940. Here is the silver problem: http://www.usaco.org/index.php?page=viewproblem2&cpid=668. Finally, if you are up for a challenge and have completed one of the previous two problems, try this silver problem: http://www.usaco.org/index.php?page=viewproblem2&cpid=716. To test your solutions on the USACO website, you will have to create a USACO account. This USACO account is also the same account that you will be using to compete in the USACO contests throughout the year. Once you make this account, you will be able to submit solutions for past contest problems and see how your code does against the test input. USACO also provides the test cases for the test inputs after the contest ends so that you can debug your code more effectively. Of course, make sure you read the guidelines and rules for USACO on USACO's website and make sure you follow these. If at any point you are having trouble with your code and do not know what is wrong, feel free to send it to me(through email, by comment on this post, or through chat next class) and I can take a look at it. Good luck and have fun solving the problems!
To see this working, head to your live site.
Jun 29, 2020· Edited: Jun 29, 2020
6/28 Weekly Post
6/28 Weekly Post