ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2035. Another Dress Rehearsal

What is test 1?
Posted by novopashinwm 6 Mar 2015 12:48
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _2035
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] arrS = Console.ReadLine().Split(' ');
            long a = long.Parse(arrS[0]);
            long b = long.Parse(arrS[1]);
            long c = long.Parse(arrS[2]);
//10^9 =1 000 000 000

            if (((c - b) > a && (c-b)>0))
                Console.WriteLine("Impossible");
            else if (((c - a) > b && (c-a)>0))
                Console.WriteLine("Impossible");
            else if ((c - b) > 0 )
                Console.WriteLine("{0} {1}", (c - b), b);
            else
                Console.WriteLine("{0} {1}", (c - a), a);

        }
    }
}

Edited by author 06.03.2015 12:54