Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Collections.Generic;
- class Program
- {
- static void Main(string[] args)
- {
- var players = new Dictionary<string, List<string>>();
- while (true)
- {
- List<string> input = Console.ReadLine().Split(new char[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries).ToList();
- if (input[0] == "JOKER")
- {
- break;
- }
- List<string> cards = input.Skip(1).ToList();
- if (players.ContainsKey(input[0]) == false)
- {
- players.Add(input[0], cards);
- }
- else
- {
- players[input[0]].AddRange(cards);
- }
- }
- }
- }
- // cards = cards.Distinct().ToList();
Advertisement
Add Comment
Please, Sign In to add comment