示例#1
0
        public InputFile(string filePath)
        {
            using (var file = File.OpenText(filePath))
            {
                var testCaseCount = int.Parse(file.ReadLine());

                testCases = new List<TestCase>(testCaseCount);

                for (var i = 0; i < testCaseCount; i++)
                {
                    var N = ReadInts(file)[0];
                    var vines = new Vine[N];
                    for (var j = 0; j < N; j++)
                    {
                        var dl = ReadInts(file);
                        vines[j] = new Vine(dl[0], dl[1]);
                    }

                    var D = ReadInts(file)[0];

                    testCases.Add(new TestCase(D, vines));
                }
            }
        }