|
|
вернуться в форумC++ AC Послано D4nick 2 янв 2019 08:00 #include <iostream> using namespace std; int main() { long x, y, c, a, b, MIN, MAX; cin >> x >> y >> c; if (x + y < c) { cout << "Impossible"; return 0; } if (x >= c) cout << c << " " << 0; else if (y >= c) cout << 0 << " " << c; else{ if (x < y) cout << x << " " << c - x; else cout << c - y << " " << y ; } } Re: C++ AC Please, do not publish your accepted solution code on forum. You disable other people to put their mind on the task in such a manner. Please respect other possibility to solve a task on their own. Re: C++ AC Послано D4nick 30 янв 2019 03:03 I think that if people don't need an answer they will not watch it. But if they need to see it, an answer is very useful to them, they can find their mistakes and to learn one more variant of programming. Also I watched answers of other people but it absolutely doesn't mean I answered the same on that problems and haven't put my own mind on the tasks. Please, do not publish your accepted solution code on forum. You disable other people to put their mind on the task in such a manner. Please respect other possibility to solve a task on their own. Edited by author 30.01.2019 03:06 |
|
|