예제 #1
0
        static void Main(string[] args)
        {
            string           file  = "rosalind_2sat";
            _2Satisfiability _2sat = new _2Satisfiability(file + ".txt");

            int[][] res = new int[_2sat.g.Length][];

            for (int i = 0; i < _2sat.g.Length; i++)
            {
                res[i] = Rosalind._2Satisfiability(_2sat.g[i]);
            }

            //for(int i = 0; i < res.Length; i++)
            //{
            //    for (int from = 0; from < _2sat.g[i].g.Length; from++ )
            //    {
            //        foreach(int to in _2sat.g[i].g[from])
            //        {
            //            Console.WriteLine(from + " -> " + to);
            //        }
            //    }
            //    Console.WriteLine();
            //}

            Utils.PrintArraysToFile(res, file + ".out.txt");
            Utils.Finish();
        }
        static void Main(string[] args)
        {
            string file = "rosalind_2sat";
            _2Satisfiability _2sat = new _2Satisfiability(file + ".txt");
            int[][] res = new int[_2sat.g.Length][];

            for (int i = 0; i < _2sat.g.Length; i++)
            {
                res[i] = Rosalind._2Satisfiability(_2sat.g[i]);
            }

            //for(int i = 0; i < res.Length; i++)
            //{
            //    for (int from = 0; from < _2sat.g[i].g.Length; from++ )
            //    {
            //        foreach(int to in _2sat.g[i].g[from])
            //        {
            //            Console.WriteLine(from + " -> " + to);
            //        }
            //    }
            //    Console.WriteLine();
            //}

            Utils.PrintArraysToFile(res, file + ".out.txt");
            Utils.Finish();
        }