using System; using System.Collections.Generic; using System.Linq; public class Program{ public static void Main(){ var line = Console.ReadLine().Split(' '); var n = int.Parse(line[0]); var a = int.Parse(line[1]); var b = int.Parse(line[2]); line = Console.ReadLine().Split(' '); int i,j,k,l; var x = new int[n]; for(i=0;i>(); for(i=0;i=a&&k<=b){ var t = new List{x[i],x[j]}; s.Add(t); } } } var u = new List>(); for(i=0;i value == s[j][0]||value == s[j][1])){ s[i].AddRange(s[j]); u.Add(s[j]); } } } for(i=0;i value == x[i])){ IEnumerable r = s[j].Distinct(); var num = new List(r); Console.WriteLine(num.Count); c = false; break; } } if(c){ Console.WriteLine(1); } } } }