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 1793. Tray 2

WA21 with code
Posted by Conserj 23 Dec 2011 04:32
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Тарелки2
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] parampidn = Console.ReadLine().Split(' ');
            int a = int.Parse(parampidn[0]);
            int b = int.Parse(parampidn[1]);
            int d = int.Parse(parampidn[2]);
            string[] muska1 = Console.ReadLine().Split(' ');
            int r1 = int.Parse(muska1[0]);
            int r2 = int.Parse(muska1[1]);
            int minradmuska1 = 0, maxradmuska1 = 0;
            if (r1 > r2)
            {
                maxradmuska1=r1;
            }
            else r2 = maxradmuska1;
            if (r2 > r1)
            {
                minradmuska1 = r1;
            }
            else minradmuska1 = r2;
            string[] muska2 = Console.ReadLine().Split(' ');
            int R1 = int.Parse(muska2[0]);
            int R2 = int.Parse(muska2[1]);
            int minradmuska2=0, maxradmuska2=0;
            if (R1 > R2)
            {
                maxradmuska2 = R1;
            }
            else maxradmuska2 = R2;
            if (R2 > R1)
            {
                minradmuska2 = R1;
            }
            else minradmuska2 = R2;
            int h = int.Parse(Console.ReadLine());
            int minst=0, maxst=0, maxradvel12;
            if (maxradmuska1>maxradmuska2)
            {
                maxradvel12=maxradmuska1;
            }
            else maxradvel12=maxradmuska2;
            if (a>b)
            {
                minst=b;
            }
            else minst =a;
            if (a>b)
            {
                maxst=a;
            }
            else maxst=b;
            if (((2*maxradmuska1+2*maxradmuska2)<=maxst)&&(2*maxradvel12<=minst)&&(2*maxradmuska1+2*maxradmuska2<=
                Math.Sqrt((double)a*a+(double)b*b)))
            {
                Console.WriteLine("YES");
            }
            else
            {
                Console.WriteLine("NO");
            }
        }
    }
}
Re: WA21 with code
Posted by Conserj 23 Dec 2011 04:33
что не так-то?