示例#1
0
        public static void Test()
        {
            var X = 4;
            var A = new int[] { 1, 2, 3, 4, 2, 3 };
            var R = new FrogRiverOne().Solution(X, A);

            Console.WriteLine("Result: " + R);

            X = 4;
            A = new int[] { 1, 4, 1, 2, 3, 4, 2, 3 };
            R = new FrogRiverOne().Solution(X, A);
            Console.WriteLine("Result: " + R);

            X = 4;
            A = new int[] { 1, 2, 1, 2, 3, 3, 2, 3 };
            R = new FrogRiverOne().Solution(X, A);
            Console.WriteLine("Result: " + R);

            var N = new Random().Next(1, 100000);

            X = new Random().Next(1, 100000);
            A = CreateArray(N, 1, X);
            TestBuddy.PrintArray(A);
            Console.WriteLine("X: " + X);
            R = new FrogRiverOne().Solution(X, A);
            Console.WriteLine("result: " + R);
            var E = new FrogRiverOne().Check(X, A);

            Console.WriteLine("expected: " + E);
        }
示例#2
0
 static void Main(string[] args)
 {
     BinaryGap.Test();
     CyclicRotation.Test();
     OddOccurrencesInArray.Test();
     TapeEquilibrium.Test();
     PermCheck.Test();
     FrogRiverOne.Test();
     MissingInteger.Test();
 }