Example #1
0
        static void Main(string[] args)
        {
            var output = CandidateCode.sequences("1,2,3,4,5");

            Console.WriteLine(output);


            output = CandidateCode.sequences("1,5,9,2,3,5,6");
            Console.WriteLine(output);
        }
Example #2
0
        static void Main(string[] args)
        {
            string[] input = { "1#2", "2#3", "1#11", "3#11", "4#11" };
            int      cnt   = CandidateCode.maxno_city(input);

            string[] input1 = { "1#2", "2#3", "1#11", "3#11", "4#11", "4#5", "5#6", }; // 7
            cnt = CandidateCode.maxno_city(input1);

            string[] input2 = { "1#2", "2#3", "1#11", "3#11", "4#11", "4#5", "5#6", "5#7" }; // 7
            cnt = CandidateCode.maxno_city(input2);


            string[] input3 = { "1#2", "2#3", "1#11", "3#11", "4#11", "4#5", "5#6", "5#7", "6#7", "4#12", "8#12", "9#12", "8#10", "9#10", "8#9" }; // 7
            cnt = CandidateCode.maxno_city(input3);
            Console.WriteLine(cnt);
        }