Jeetu and Circles
All submissions for this problem are available.
Jitendra scored highest marks in Geometry in his class. He is also very good at Problem Solving Skills.
He challenged his classmates to solve a problem based on concepts of geometry. He has given a sequence which consists of N positive integers. He asked to find the number of possible solutions by selecting values of g, f, c, r from the given sequence which satisfies the following equation of finding radius of a circle having centre at (-g,-f).
The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows.
The first line of each test case contains an integer N which denotes the size of sequence.
The second line of each test case contains N space-separated integers denoting the elements of sequence.
For each test case on new line, print the number of solutions that satisfy the equation of finding radius of a circle as given above.
1 <= T <= 5 1 <= N <= 1000 1 <= a[i] <= 1000000000 , for each valid i
1 4 1 2 3 4
|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, CLOJ, COB, FS|
Fetching successful submissions