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:||ADA, ASM, BASH, BF, C, C99 strict, CAML, CLOJ, CLPS, CPP 4.3.2, CPP 6.3, CPP14, CS2, D, ERL, FORT, FS, GO, HASK, ICK, ICON, JAVA, JS, LISP clisp, LISP sbcl, LUA, NEM, NICE, NODEJS, PAS fpc, PAS gpc, PERL, PERL6, PHP, PIKE, PRLG, PYPY, PYTH, PYTH 3.5, RUBY, SCALA, SCM chicken, SCM guile, SCM qobi, ST, TCL, TEXT, WSPC|
Fetching successful submissions
If you are still having problems, see a sample solution here.