Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 406 Weeks Ago, 1 Day Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 16 Sep 2017 My Price 9.00

NIT Hamirpur

Problem Description

 

An online quiz is going to be held at NIT Hamirpur. Each student will be given a system which is connected to internet. Although all the systems are connected to same network, there is still varying data transfer speed among them. This can cause pages to load slower on one system than the other. The organizers do not want a participant to have an advantage over others due to this. The organizers can't increase transfer speed on a system but they can cap it. Also they want to provide maximum speed to each system.

 

Suppose there are n systems and m participants and speed of each of the n systems is known. Your task is to tell them the maximum speed they should keep on each system, so that atleast m of n systems have the same speed.

 

Input

 

First line containing two space separated inputs (n and m) - the number of computer and participants respectively. The next line contains a space separated sequence of n integers: a1, a2, ..., an - where ai denotes the speed of ith computer in KB/s.

 

Output

 

Print a single integer representing the maximum data transfer speed that should be kept.

 

Constraints

 

Should contain all the constraints on the input data that you may have. Format it like:

 

  • 1 = n = 200
  • 1 = m = n

 

Example

Input: 5 3 250 125 330 3000 1000 Output: 330

 

Input: 6 6 2000 2100 3000 1500 1250 3000 Output: 1250

Answers

(5)
Status NEW Posted 16 Sep 2017 01:09 PM My Price 9.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)