All submissions for this problem are available.
Titan watch company started taking a survey which measures wrist size of individuals. They then wanted to produce a watch which can shrink or extend to a size S. For sampling purpose they decided to choose 'C' members from a group of 'N' people such that difference between the smallest wrist size and biggest wrist size of the chosen group is minimum. And the chosen group must satisfy the relation: Min Value obtained >= 5.4594 * S to be eligible for shrinking and extension . Find the minimum value and check if it is eligible . Print "YES" for eligible and "NO" for not eligible
First line contains the number of test cases T.
Following line contains the value N , C and S.
The following line contains the wrist size of N people.
For each test case, output the required answer
Input: 4 10 4 1 50 51 66 63 54 53 23 45 23 46 7 3 2 25 12 24 35 36 14 16 7 5 2 25 12 24 35 36 14 16 3 1 1 2 5 4 Output: 21 YES 4 NO 13 YES 0 NO
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, CLOJ, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.