using System.Collections.Generic;
public static void Main()
string[] input = new string[] { "16-18 h: hhhhhhhhhhhhhhhhhh"};
Console.WriteLine(TotalValidPolicies(input));
private static int TotalValidPolicies(string[] input) {
foreach(var str in input) {
var splitItems = str.Split(new char[] {' ', ':', '-'}, StringSplitOptions.RemoveEmptyEntries);
var min = Int32.Parse(splitItems[0]);
var max = Int32.Parse(splitItems[1]);
var target = (char) splitItems[2];
var checkThis = splitItems[3];
for (int i = 0; i < checkThis.Length; i++) {
if (checkThis[i] == target) {
if (counter >= min && counter <= max) {