All submissions for this problem are available.
Churu got an assignment in his class, to compute the count of elements (floating point decimals) greater than K, if the list of non repeating elements was sorted. Churu has solved the problem, but, he needs to verify with someone. Become Churu's tester by computing the answer for each queries.
- First line contains T the number of test cases.
- First line of each test case contains N denoting the number of elements in list.
- Second line of each test case contains Q denoting the number of queries in the assignment.
- Next line contains N space-seperated elements A[i].
- Next Q lines contains a single element K, from the list.
- Verify Churu's answers by computing the answer for each query
Constraints and Subtasks
- 1 <= T <= 5
- 1 <= N, Q <= 1e6
- 0 <= A[i] <= 1e6
Subtask 1: 10 points
- 1 <= N, Q <= 100
Subtask 2: 15 points
- 1 <= N, Q <= 10000
Subtask 3: 75 points
- original constraints.
Input: 1 5 2 2.300000 2.000000 1.001002 0.000000 10.000000 0.000000 2.000000 Output: 4 2
|Tags||ad-hoc, adi28galaxyak, binary-search, cdva16|
|Time Limit:||1 - 5 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