diff options
author | Ta180m | 2019-05-08 08:49:21 -0500 |
---|---|---|
committer | GitHub | 2019-05-08 08:49:21 -0500 |
commit | 4052f6151004695788f360209964f56f217e9a4d (patch) | |
tree | e4d2a99fc433bc8b2348d99a27f859d23faca4d9 | |
parent | c765a90e8a1ae2c621283610a52a1a208def978e (diff) |
Update dp_solver.cpp
Output formatting
-rw-r--r-- | dp_solver.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dp_solver.cpp b/dp_solver.cpp index 3bbb1c2..a5d4711 100644 --- a/dp_solver.cpp +++ b/dp_solver.cpp @@ -161,7 +161,7 @@ int main() { vector<int> output; for (int i = sol; i != s; i = pre[i]) output.push_back(i); reverse(output.begin(), output.end()); - cout << "Iterations: " << sol / 36000 << endl; + cout << "Optimal strategy to reach $" << format(goal) << " from $" << format(start) << " in " << sol / 36000 << " iterations:" << endl; for (int i = 0; i < output.size(); i++) { int it = output[i] / 36000; int MPQ = (output[i] / 3600) % 10, SB = (output[i] / 360) % 10, M = (output[i] / 36) % 10; @@ -230,5 +230,5 @@ int main() { else cout << "Error: Something went wrong" << endl; } } - else cout << "No strategy to reach $" << goal << " from $" << start << " in " << max_it << " iterations could be found" << endl; + else cout << "No strategy to reach $" << format(goal) << " from $" << format(start) << " in " << max_it << " iterations could be found" << endl; } |