using System;
using System.Collections.Generic;
public class Test
{
public static void Main()
{
List<List<int>> matriz = new List<List<int>>();
matriz.Add(new List<int> {3, 4, 1} );
matriz.Add(new List<int> {2, 4, 5} );
matriz.Add(new List<int> {44, 8, 9} );
int a = new int(),
b = new int(),
busca = 1;
a = matriz.FindIndex(x => x.Contains(busca));
matriz.ForEach(x => { if(x.Contains(busca)){ b = x.IndexOf(busca); } });
Console.WriteLine("Busca: {0}, Linha: {1}, Coluna: {2}", busca, a, b);
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYzsKCnB1YmxpYyBjbGFzcyBUZXN0CnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBNYWluKCkKCXsKCSAgICBMaXN0PExpc3Q8aW50Pj4gbWF0cml6ID0gbmV3IExpc3Q8TGlzdDxpbnQ+PigpOwoJICAgIG1hdHJpei5BZGQobmV3IExpc3Q8aW50PiB7MywgNCwgMX0gICk7CgkgICAgbWF0cml6LkFkZChuZXcgTGlzdDxpbnQ+IHsyLCA0LCA1fSAgKTsKCSAgICBtYXRyaXouQWRkKG5ldyBMaXN0PGludD4gezQ0LCA4LCA5fSApOwoJICAgIAoJICAgIGludCBhID0gbmV3IGludCgpLAoJICAgICAgICBiID0gbmV3IGludCgpLAoJICAgICAgICBidXNjYSA9IDE7CgkgICAgYSA9IG1hdHJpei5GaW5kSW5kZXgoeCA9PiB4LkNvbnRhaW5zKGJ1c2NhKSk7CgkgICAgbWF0cml6LkZvckVhY2goeCA9PiB7IGlmKHguQ29udGFpbnMoYnVzY2EpKXsgYiA9IHguSW5kZXhPZihidXNjYSk7IH0gfSk7CgkgICAgQ29uc29sZS5Xcml0ZUxpbmUoIkJ1c2NhOiB7MH0sIExpbmhhOiB7MX0sIENvbHVuYTogezJ9IiwgYnVzY2EsIGEsIGIpOwoJfQp9