using System;
using System.Collections.Generic;
public class Solution
{
public int solution(string[,] clothes)
{
int answer = 1;
Dictionary<string, List<string>> closetDic = new Dictionary<string, List<string>>();
for (int i=0; i< clothes.GetLength(0); i++)
{
if (!closetDic.ContainsKey(clothes[i, 1]))
{
closetDic[clothes[i, 1]] = new List<string>();
}
closetDic[clothes[i, 1]].Add(clothes[i, 0]);
}
foreach (KeyValuePair<string, List<string>> kv in closetDic)
{
answer *= (kv.Value.Count + 1);
}
return --answer;
}
}
int[,] two_dimension = new int[3, 2] { { 1, 2 }, { 3, 4 }, { 5, 6 } };
Console.WriteLine(two_dimension.Length);
Console.WriteLine(two_dimension.GetLength(0));
Console.WriteLine(two_dimension.GetLength(1));