static void Main(string[] args) //테스트 환경
        {
            string   no     = "s";
            Solution solut1 = new Solution();

            int[,] name2;

            while (no != "")
            {
                no = Console.ReadLine();


                string[] name1 = no.Split('$');
                name2        = new int[name1.Length, no.Length / name1.Length];
                int[,] name3 = new int[name1.Length, no.Length / name1.Length];

                for (int i = 0; i < name1.Length; i++)
                {
                    string[] name12 = name1[i].Split(',');

                    for (int j = 0; j < name12.Length; j++)
                    {
                        name2[i, j] = int.Parse(name12[j]);
                    }
                }
                Console.WriteLine("Result" + solut1.solution(name2));
                solut1 = new Solution();
            }
        }
示例#2
0
      public static void Main(string[] args)
      {
          string der =
              @"00:01:07,400-234-090
 00:05:01,701-080-080
 00:05:00,400-234-090";
          Solution sol  = new Solution();
          int      cost = sol.solution(der);
      }
示例#3
0
        static void Main(string[] args)
        {
            Solution so = new Solution();

            int[] arr = new int[] { 3, 2, 6 };
            foreach (int i in so.solution(arr, 10))
            {
                Console.WriteLine(i);
            }
        }
示例#4
0
        static void Main(string[] args)
        {
            Solution test = new Solution();
            //test.solution(new int[] { -2, -5, 1, 3, 6, 4, 1, 2, 5, 22, 4, 15, 7 });

            //test.solution(new int[]{ 3, 8, 9, 7, 6 } , 3);
            //Console.WriteLine();
            //test.solution(new int[] {0,0,0}, 1);
            //Console.WriteLine();
            //test.solution(new int[] { 1,2,3,4 }, 4);

            //test.solution(new int[] {-7,-6 -5, -3, -1, 0, 3, 6});

            //test.solution(new int[] { -1, -3, 1, 3, 6, 4, 1, 2 });
            //test.solution(new int[] { -1, -3, 3, 6, 4, 2 });
            //test.solution(new int[] { 1,1,2,3,3}, 4);

            Tree t = new Tree();

            t.x = 0;
            t.l = new Tree()
            {
                x = 1,
                l = new Tree()
                {
                    x = 2,
                    l = null,
                    r = null,
                },
                r = new Tree()
                {
                    x = 5,
                    l = null,
                    r = null,
                }
            };
            t.r = new Tree()
            {
                x = 1,
                l = new Tree()
                {
                    x = 7,
                    l = null,
                    r = null,
                },
                r = new Tree()
                {
                    x = 1,
                    l = new Tree()
                    {
                        x = 9,
                        l = null,
                        r = null,
                    },
                    r = null,
                }
            };

            test.solution(t);

            Console.ReadLine();
        }
示例#5
0
        static void Main(string[] args)
        {
            Solution so = new Solution();

            Console.WriteLine(so.solution("abcde"));
        }