static void Main(string[] args)
        {
            MaxTaxTester tests = new MaxTaxTester();

            tests.PrepareTestSets();
            foreach (var ts in tests.TestSets)
            {
                ts.Value.PerformTests(false);
            }
        }
Пример #2
0
        static void Main(string[] args)
        {
            var a = new TaxCollectorManager();


            //var money = new int[] { 1, 2, 3 };
            //var carrots = new int[] { 1, 2, 3 };
            //var dist = new int[] { 0, 1, 1 };
            //var startingCarrots = 1;
            //var maxCarrots = 5;

            //var money = new int[] { 2, 2, 3 };
            //var carrots = new int[] { 5, 3, 1 };
            //var dist = new int[] { 0, 1, 1 };
            //var startingCarrots = 0;
            //var maxCarrots = 3;

            var money           = new int[] { 100, 100, 100, 100, 100, 100, 100, 100, 0 };
            var carrots         = new int[] { 10, 10, 10, 10, 10, 10, 10, 10, 4 };
            var dist            = new int[] { 0, 5, 1, 5, 1, 4, 1, 4, 2 };
            var startingCarrots = 4;
            var maxCarrots      = 5;
            var expectedResult  = 200;

            //var money = new int[] { 10, 5, 15, 12, 6, 13, 5, 4, 10 };
            //var carrots = new int[] { 5, 2, 3, 6, 3, 2, 6, 3, 1 };
            //var dist = new int[] { 0, 2, 4, 2, 1, 4, 3, 2, 3 };
            //var startingCarrots = 0;
            //var maxCarrots = 6;
            //var expectedResult = 20;


            //8
            //var money = new int[] { 5, 3, 6, 7, 8, 2, 1, 1, 6, 7, 3, 2, 4, 1, 9, 6, 2, 8, 9, 1, 6, 2, 3 };
            //var carrots = new int[] { 3, 2, 5, 1, 6, 4, 2, 6, 5, 3, 7, 1, 5, 3, 8, 7, 6, 1, 5, 3, 5, 5, 0 };
            //var dist = new int[] { 0, 6, 5, 3, 6, 2, 3, 1, 2, 3, 4, 1, 1, 1, 5, 3, 6, 2, 5, 1, 8, 2, 6 };
            //var startingCarrots = 11;
            //var maxCarrots = 11;
            //var expectedResult = -1;


            //5
            //var money = new int[] { 10, 5, 15, 12, 6, 13, 5, 4, 10 };
            //var carrots = new int[] { 5, 2, 3, 6, 3, 2, 6, 3, 5 };
            //var dist = new int[] { 0, 2, 4, 2, 1, 10, 3, 2, 4 };
            //var startingCarrots = 10;
            //var maxCarrots = 100;
            //var expectedResult = 33;

            //2
            //var money = new int[] { 100, 100, 100, 100, 0 };
            //var carrots = new int[] { 10, 10, 10, 10, 10 };
            //var dist = new int[] { 0, 1, 1, 1, 37 };
            //var startingCarrots = 0;
            //var maxCarrots = 50;
            //var expectedResult = 0;

            //a.CollectMaxTax(dist, money, carrots, maxCarrots, startingCarrots, out TaxAction[] b);



            MaxTaxTester tests = new MaxTaxTester();

            tests.PrepareTestSets();
            foreach (var ts in tests.TestSets)
            {
                ts.Value.PerformTests(false);
            }
        }