Advertisement
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;
- class EqualStrings
- {
- static void Main()
- {
- List<string> input = Console.ReadLine().Split(' ').ToList();
- List<string> reduced = input.Distinct().ToList();
- for(int i=0;i<reduced.Count;i++)
- {
- //Console.Write(reduced[i] + " ");
- for(int j=0;j<input.Count;j++)
- {
- if(reduced[i]==input[j])
- {
- Console.Write(input[j] + " ");
- }
- }
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement