DCEPC705 - Weird Points
Given N distinct points in a plane, a point (x1, y1) is said to be dominating another point (x2, y2) if x1>=x2 and y1>=y2.
The Dominance of a point is the absolute difference between 2 quantities – no. of points dominated by this point and no. of points not dominated by this point. (excluding itself)
A Weird point is the point whose Dominance value is greater than or equal to a threshold value ‘k’. Find the no. of such Weird Points among those N given points.
First line gives T, the no. of test cases.
Each test case consists of 2 integers in first line, N and K, as specified above.
Next N lines give the coordinates of N points in the plane. “Xi” and “Yi” are space separated.
Output T lines, each containing the required answer.
Problem Statement and Test Cases has been updated 2012-05-17 18:10:00.
|Added by:||dce coders|
|Cluster:||Cube (Intel G860)|
|Languages:||ASM32-GCC MAWK BC C-CLANG C CPP C++ 4.3.2 CPP14-CLANG CPP14 COBOL COFFEE D-DMD D-CLANG DART ELIXIR FANTOM FORTH GOSU GRV JAVA JS-MONKEY KTLN NIM NODEJS OBJC OBJC-CLANG OCT PICO PROLOG PYPY PY_NBC R RACKET RUST CHICKEN SQLITE SWIFT UNLAMBDA VB.NET|