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 ArraysLab
- {
- class Program
- {
- static void Main(string[] args)
- {
- string[] blacklistedSongs = Console.ReadLine().Split(' ');
- string song = Console.ReadLine();
- List<string> playlist = new List<string>();
- while(song != "end")
- {
- bool isConstaned = false;
- for(int i =0; i< blacklistedSongs.Length; i++)
- {
- if(song.Contains(blacklistedSongs[i]))
- {
- isConstaned = true;
- }
- }
- if (!isConstaned)
- {
- playlist.Add(song);
- }
- song = Console.ReadLine();
- }
- playlist.Sort();
- Console.WriteLine(string.Join("\r\n", playlist));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment