ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 2035. Очередной пробный тур

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
Послано Smilodon_am [Obninsk INPE] 2 янв 2019 12:33
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.
Smilodon_am [Obninsk INPE] писал(a) 2 января 2019 12:33
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