All submissions for this problem are available.
There are N linear tracks each of length (2*Ai) Meters. The midpoints of all tracks lie on the same point. None of the tracks coincide with each other. Now a car starts from each of the N tracks from one end point, moves to the next end point and, comes back again and so on. Each car travells with unit speed ie 1 Meter/sec. Find out the maximum number of cars which will be present simultaneously at the intersection of all the tracks. Also find out if ith car meets any other car at the intersection.
An integer N, the number of tracks.
Next line would contain N integers: A1 A2 A3 . . . AN
On the first line, output the maximum cars which can be present at a point of time at the intersection of the tracks.
Output N lines denoting if ith car meets any other car at the intersection or no. Output "MEETS" on ith line if ith car meets any other car at the intersection, else output "DOES NOT MEET".
1 <= N <= 106
1 <= Ai <=105
|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, 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.