YavorGrancharov

Track_Downloader

Jun 23rd, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.06 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Track_Downloader
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             List<string> blacklist = Console.ReadLine()
  14.                 .Split(new char[] { ' ' },
  15.                 StringSplitOptions.RemoveEmptyEntries)
  16.                 .ToList();
  17.  
  18.             List<string> empty = new List<string>();
  19.  
  20.             string filenames = Console.ReadLine();
  21.  
  22.             while (filenames != "end")
  23.             {
  24.                 empty.Add(filenames);
  25.  
  26.                 for (int i = 0; i < blacklist.Count; i++)
  27.                 {
  28.  
  29.                     if (filenames.Contains(blacklist[i]))
  30.                     {
  31.                         empty.Remove(filenames);
  32.                         break;
  33.                     }
  34.                 }
  35.                 filenames = Console.ReadLine();
  36.             }
  37.             empty.Sort();
  38.             Console.WriteLine(string.Join("\r\n", empty));
  39.         }
  40.     }
  41. }
Add Comment
Please, Sign In to add comment