コード例 #1
0
        public void TestPermCheck()
        {
            int[] A        = new int[] { 4, 1, 3, 2 };
            int   expected = 1;
            int   actual   = Lessons.PermCheck(A);

            Assert.AreEqual(expected, actual);

            A        = new int[] { 4, 1, 3 };
            expected = 0;
            actual   = Lessons.PermCheck(A);

            Assert.AreEqual(expected, actual);

            A        = new int[] { 4, 1, 3, 2, 2 };
            expected = 0;
            actual   = Lessons.PermCheck(A);

            Assert.AreEqual(expected, actual);
        }