Aborigenius

TrackDownLoader

Jun 23rd, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.01 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 TrackDownLoader
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             string blacklist = Console.ReadLine();
  14.             List<string> blacklisted = new List<string>(blacklist.Split(' ')).ToList();
  15.             string filenames = string.Empty;
  16.             List<string> result = new List<string>();
  17.             while (filenames != "end")
  18.             {
  19.                 filenames = Console.ReadLine();
  20.                 if (blacklisted.Any(filenames.Contains) || filenames == "end")
  21.                 {
  22.                     continue;
  23.                 }
  24.                 else
  25.                 {
  26.                     result.Add(filenames);
  27.                 }
  28.             }
  29.             result.Sort();
  30.             for (int cnt = 0; cnt < result.Count; cnt++)
  31.             {
  32.                 Console.WriteLine(result[cnt]);
  33.             }
  34.  
  35.         }
  36.     }
  37. }
Add Comment
Please, Sign In to add comment