Chef Has A Lazy Team
All submissions for this problem are available.Chef is leading the Operations division of his department. His team consists of 3 people. Their job is to ensure that all items are out for delivery by tagging them with appropriate destinations. Out of these 3 people, $X$ is very generous and performs all the tasks given to him. $Y$ and $Z$ are very stubborn and will work on only those deliveries which costs less than or equal to $R$. $Z$ copies whatever $Y$ does. You are given $N$ deliveries, where cost of each delivery $Ci$ is known. Help Chef to know, how many deliveries can $X$, $Y$ and $Z$ do individually, if all the work has to be done by just one of them. ###Input: - First line will contain $T$, number of testcases. - Each testcase starts with $N$ and $R$. - Next line consists of $N$ spaced integers, describing cost $C$ of each delivery. ###Output: For each testcase, output in a single line for $X$, $Y$ and $Z$ with space in between. ###Constraints - $1 \leq T \leq 1000$ - $1 \leq N \leq 10^6$ - $1 \leq R \leq 10^9$ ###Sample Input: 1 4 3 1 2 3 4 ###Sample Output: 4 3 3
|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, rust, SCALA, swift, 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, kotlin, PERL6, TEXT, SCM chicken, PYP3, CLOJ, COB, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.