The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 406 Weeks Ago, 2 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Problem description:
Â
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.
Input:
An integer N, the number of tracks.
Next line would contain N integers: A1 A2 A3 . . . AN
Output:
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".
Constraints:
1 N 6
1 Ai 5
Sample
Input:
2
2 6
Output:
2
MEETS
MEETS
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll