So as i wrote in the title i have a problem at solving this problem. https://codeforces.com/problemset/problem/1385/B
It seems working but i just can not figure out how to add back the solution in a correct way, as it expected in the output.
class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int n_elements = int.Parse(Console.ReadLine()); for (int i = 1; i <= n; i++) { int[] k = Console.ReadLine().Split().Select(int.Parse).ToArray(); int[] l = k.Distinct().ToArray(); foreach (var item in l) { Console.Write(item + " "); } } } }
Thanks for your time looking at this silly problem :)
1.4m articles
1.4m replys
5 comments
57.0k users