All submissions for this problem are available.
Indian Army is fighting with militant group on the border.
The militant groups want to attack Indian army with UAV’s. Indian army got
information about this plan and started an operation with the name “Mission Vijay”
on militants. Under this operation the army decided there they will make create
a special location where they can destroy all UAV’s of militants. At that
location as soon as any UAV is spotted it will be shot down. Being a member of
the squad for “Mission Vijay” you are supposed to decide that location.
The first line of the input should be number of test cases.
Every case is required to start with the number of UAV’s
coming from militants N (1<=N<=1000). In the next line distance covered
by jth UAV should be given. Each UAV before being
shot down must cover x[j] distance (1<x[j]<1000000)
In each case you are supposed to get the desire value. Since
value may come to be very large use mod 1000000007 solutions.
Note: In multiple
answers, give the smallest one.
5 7 3 10
4 7 8 3 7 9
|Time Limit:||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, PYP3, CLOJ, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.