using System.Collections.Generic;
public Point(int row, int col) { Row = row; Col = col; }
public static int GetSpecialItems(int[][] matrix) {
int rows = matrix.Length;
int cols = matrix[0].Length;
var rowDict = new Dictionary<int, int>();
var colDict = new Dictionary<int, int>();
var points = new List<Point>();
for (int i = 0; i < rows; i++)
for (int j = 0; j < cols; j++)
if (!rowDict.ContainsKey(i))
if (!colDict.ContainsKey(j))
points.Add(new Point(i, j));
foreach (Point p in points)
if (rowDict[p.Row] == 1 && colDict[p.Col] == 1)
public static void Main()
Console.WriteLine("UniLecs");
var matrix = new int[][] {
Console.WriteLine(GetSpecialItems(matrix).ToString());