public static void ExecuteByStandardIO(Action method) { string input; do { AtCoder.Timer("", method); Console.WriteLine(); Console.WriteLine("Continue? 1:Yes, others:No"); input = Console.ReadLine(); } while (input == "1"); }
static void Main(string[] args) { Action method = null; //method = ABC190.StaircaseSequences; method = ABC180.SumOfDifference; //method = ABC170.Alphabet; //method = ARC110.MexBoxes; //method = ARC100.SumAndProduct; //method = Easy050.ATCoder; //method = Practice.Daydream; //method = Search.GoodDistance; //AtCoder.ExecuteByStandardIO(method); AtCoder.ExecuteByFileIO(method); }
public static void ExecuteByFileIO(Action method) { var textFile = @$ "Text\Sample.txt"; string input; do { using (var reader = new StreamReader(textFile)) { IOLibrary.SetReadLineMethod(reader.ReadLine); AtCoder.Timer("", method); } Console.WriteLine(); Console.WriteLine("Continue? 1:Yes, others:No"); input = Console.ReadLine(); } while (input == "1"); }
static void Main() { var ac = new AtCoder(); ac.Slove(); }