Esempio n. 1
0
        static void Main()
        {
            SourceExpander.Expander.Expand(ignoreAnyError: false);
            var           N        = int.Parse(Console.ReadLine());
            List <long[]> treeInfo = new List <long[]>();

            for (int i = 0; i < N - 1; i++)
            {
                var AB = Console.ReadLine().Split().Select(long.Parse).ToArray();
                treeInfo.Add(AB);
            }

            var         dicNode = GraphUtil.CreateTree(treeInfo);
            List <long> history = new List <long>();

            dicNode[1].IsArrive = true;
            Execute(dicNode[1], history);
            Console.WriteLine(string.Join(" ", history));
        }