Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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));
- }
- }
- }
Add Comment
Please, Sign In to add comment