USACO: Section 1.3 -- PROB Mixing Milk
Source Code
Lesson Learned:
This program algorithm is simple. However, I still meet one problem: edge condition(N, M both are zero). After writting the pseudocode, I should always check algorithm for the edge conditions of the input parameters. This is just a small effect, but helps to eliminate high risk bugs!
Lesson Learned:
This program algorithm is simple. However, I still meet one problem: edge condition(N, M both are zero). After writting the pseudocode, I should always check algorithm for the edge conditions of the input parameters. This is just a small effect, but helps to eliminate high risk bugs!