object Main extends App {

  import scala.io.StdIn._
  import scala.math._
  solve
  def solve: Unit = {
    val Array(m, nMin, nMax) = readLine.trim.split(' ').map(_.toInt)
    if (m == 0) return
    val points = Array.tabulate(m) { _ ⇒ readLine.trim.toInt }.sorted.reverse
    val gaps = (nMin to nMax).reverse.maxBy { i ⇒ points(i - 1) - points(i) }
    println(
      gaps
    )
    solve
  }
}
