namespace HeuristicLab.BenchmarkSuite.Problems { using System.Linq; public class EvenSquares : BenchmarkSuiteDataDescriptor { private const string name = "Even Sqaures - Hard"; private const string fileName = "EvenSquares.csv"; private const string description = " Given an integer n, print all of the positive even perfect squares less than n on separate lines."; protected override string FileName { get { return fileName; } } public override string Name { get { return name; } } public override string Description { get { return description; } } protected override int InputArgumentCount { get { return 1; } } protected override int OutputArgumentCount { get { return 1; } } public override ProblemData CreateProblemData() { return new ProblemData(ProblemType.EvenSquares) { Name = Name, Description = Description, ProgramExecutionBudget = 30000000, Examples = CloneExamples(), BestResult = 0, WorstResult = 5000, InputArgumentTypes = new[] { ExampleArgumentType.Integer }, OutputArgumentTypes = new[] { ExampleArgumentType.Print }, TrainingCount = 100, TestCount = 1000, EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean | DataTypes.Print, MaxSize = 400, EvalLimit = 2000, }; } protected override Example ParseExample(string[] input, string[] output) { return new Example { InputArgs = input, OutputArgs = output, InputInteger = ExampleArgumentConverter.ConvertIntegers(input), OutputPrint = output[0], // helper OutputIntegerVector = new [] { output[0].Split('\n').Select(ExampleArgumentConverter.ConvertInteger).ToArray() } }; } } }