Exemplo n.º 1
0
        public void PostD4(int hour, string a, string b, string c, string d, string k)
        {
            var sol = MakeFinalFolds(D4Problem.D4(a, b, c, d), new Rational(1, 120), 3, 5, 8, 12).Pack();

            Console.WriteLine(sol.Facets.Length);
            Console.WriteLine(sol.Size());
            double time = (new DateTime(2016, 08, 07, hour, 0, 0) - new DateTime(1970, 1, 1)).TotalSeconds;

            Console.WriteLine();
            Console.WriteLine(sol);
            var ans = new ApiClient().PostProblem((int)time, sol);

            File.WriteAllText(Path.Combine(Paths.ProblemsDir(), $"{time}.problem.txt"), sol + "\r\n\r\n" + ans);
            Console.WriteLine(ans);
        }
Exemplo n.º 2
0
        public void DoSomething_WhenSomething()
        {
            var sol = D4Problem.D4("9/20", "19/40", "12/40", "13/40");
            //Console.WriteLine(Enumerable.Range(100, 100).AsParallel().Min(k => MakeFinalFolds(sol, new Rational(1, k), 3, 5, 8, 12).Pack().Size()));
            //return;
            var sol2 = MakeFinalFolds(sol, new Rational(1, 120), 3, 5, 8, 12).Pack();

            sol2.CreateVisualizerForm().ShowDialog();
            sol2.CreateVisualizerForm().ShowDialog();
            //Console.WriteLine(sol2.ToString());
            //var sol3 = MakeFinalFolds(sol, 999).Pack();
            ////sol2.CreateVisualizerForm(true).ShowDialog();
            ////Console.WriteLine(sol3.ToString());
            //Console.WriteLine(sol2.Size());
            //Console.WriteLine(sol3.Size());
            //Console.WriteLine(sol2.ToString());
        }