Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <algorithm>
- #include <iostream>
- using namespace std;
- inline void end() {
- cout << endl;
- system("pause");
- }
- int main() {
- int d, u, v, z, s;
- cin >> d >> u >> v >> z >> s;
- int res2 = d / (u + v) - (bool)(!(d % (u + v)));
- int res1 = -1;
- if (res2 >= s)
- res1 = res2 - s;
- else if (res2 >= z)
- res1 = 0;
- cout << res1 << " " << res2;
- end();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement