public void Solve() { int N = ri(); int[] LArray = ria(); if (N < 3) { Console.WriteLine(0); Console.ReadLine(); return; } Array.Sort(LArray); int[][] Lss = Combination.Enumerate(LArray, 3, withRepetition: false).ToArray(); int ans = 0; foreach (int[] Ls in Lss) { if (Ls.Distinct().Count() != 3) { continue; } Array.Sort(Ls); if (Ls[2] < Ls[0] + Ls[1]) { ans++; } } Console.WriteLine(ans); Console.ReadLine(); }