using System;
using System.IO;
using System.Linq;
namespace DoubleChecker
{
class Program
{
/*
* args[0] - test input file name (in.txt)
* args[1] - user output file name (stdout.txt)
* args[2] - test output file name (out.txt)
*/
private const double Eps = 1e-4;
static private double[] GetTokens(String fileName)
{
var tokens = File.ReadAllText(fileName).Split(null as char[], StringSplitOptions.RemoveEmptyEntries);
var res = new double[tokens.Length];
return tokens.Where((t, i) => !double.TryParse(t, out res[i])).Any() ? null : res;
}
static private bool AreEqual(double[] arr1, double[] arr2)
{
if (arr1 == null || arr2 == null)
return false;
if (arr1.Length != arr2.Length)
return false;
return !arr1.Where((t, i) => Math.Abs(t - arr2[i])/Math.Max(1.0, Math.Abs(arr2[i])) > Eps).Any();
}
static void Main(string[] args)
{
if(!AreEqual(GetTokens(args[1]), GetTokens(args[2])))
Console.WriteLine("Wrong Answer");
}
}
}