using System.Collections.Generic;
public static void Main()
var intervals = new List<Interval>
new Interval(1, true, 1),
Console.WriteLine($"Count: {intervals.Count}");
Console.WriteLine($"Distinct count: {intervals.Distinct().Count()}");
public bool IncludesMaxValue = true;
public int ReportingValue;
public Interval(int maxValue, bool includesMaxValue, int reportingValue)
IncludesMaxValue = includesMaxValue;
ReportingValue = reportingValue;