namespace HeuristicLab.BenchmarkSuite.Problems { public class XWordLines : BenchmarkSuiteDataDescriptor { private const string name = "X-Word Lines"; private const string fileName = "XWordLines.csv"; private const string description = "Given an integer X and a string that can contain spaces and newlines, print the string with exactly X words per line.The last line may have fewer than X words."; 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 2; } } protected override int OutputArgumentCount { get { return 1; } } public override ProblemData CreateProblemData() { return new ProblemData { Name = Name, Description = Description, Examples = CloneExamples(), BestResult = 0, WorstResult = 100, InputArgumentTypes = new[] { ExampleArgumentType.Integer, ExampleArgumentType.String }, OutputArgumentTypes = new[] { ExampleArgumentType.String }, TrainingCount = 150, TestCount = 2000, EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean | DataTypes.Char | DataTypes.String, MaxSize = 800, EvalLimit = 1600, ErcOptions = { ErcProbability = 0.05, CharErcOptions = { IsEnabled = true, Constants = new [] { ' ', '\r' } } } }; } protected override Example ParseExample(string[] input, string[] output) { return new Example { InputArgs = input, OutputArgs = output, InputInteger = ExampleArgumentConverter.ConvertIntegers(input[0]), InputString = new[] { input[1] }, OutputString = output, }; } } }