using System.Collections.Generic;
public class ScoreLookup {
public Dictionary<string,int> dict = new Dictionary<string,int>();
public void AddScore(string name, int score) {
string[] word = name.Split(' ');
foreach(string w in word){
public int LookupScore(string name) {
dict.TryGetValue(name,out score);
public static void Main()
ScoreLookup lookup = new ScoreLookup();
lookup.AddScore("John Chan", 55);
lookup.AddScore("Henry Wong", 0);
lookup.AddScore("Mary Lee", 60);
lookup.AddScore("Hillary Clinton", 99);
lookup.AddScore("Pikachu", 100);
Console.WriteLine(lookup.LookupScore("John"));
Console.WriteLine(lookup.LookupScore("Mary Lee"));
Console.WriteLine(lookup.LookupScore("Pikachu"));
Console.WriteLine(lookup.LookupScore("Wong"));
Console.WriteLine(lookup.LookupScore("Hillary"));