using System.Collections.Generic;
namespace ConsoleApplication3
static void Main(string[] args)
var playList = new Dictionary<int, HashSet<int>>();
using (StreamReader streamReader = new StreamReader("exhibitA-input.csv", Encoding.UTF8, true, bufferSize: 4096))
if (streamReader.ReadLine() != null)
while ((line = streamReader.ReadLine()) != null)
var columns = line.Split('\t');
if (columns[3].StartsWith("10/08/2016"))
var ClientId = Int32.Parse(columns[2]);
var SongId = Int32.Parse(columns[1]);
if (playList.ContainsKey(ClientId))
playList[ClientId].Add(SongId);
playList.Add(ClientId, new HashSet<int>() { SongId });
var resultTable = playList.GroupBy(x => x.Value.Count())
.ToDictionary(x => x.Key, x => x.Count());