using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
string[] bannedSong = Console.ReadLine().Split(' ');
string songs = Console.ReadLine();
List<string> newPlayList = new List<string>();
while (songs != "end")
{
bool isContained = false;
for (int cnt = 0; cnt < bannedSong.Length; cnt++)
{
if (songs.Contains(bannedSong[cnt]))
{
isContained = true;
}
}
if (!isContained)
{
newPlayList.Add(songs);
}
songs = Console.ReadLine();
}
newPlayList.Sort();
Console.WriteLine(string.Join("\r\n", newPlayList));
}
}
}
Comments