andıng A university is making a trip to the cinema, there are N students in this trip, the cinema has reserved a row in the cinema for the students. A student can get out from the row during the movie...


in c++


andıng<br>A university is making a trip to the cinema, there are N students in this trip, the cinema has reserved a row in the cinema for the students.<br>A student can get out from the row during the movie If and only If he is not passing in front of a student older than him.<br>Given for every seat in the row the age of the student sitting on it, print

Extracted text: andıng A university is making a trip to the cinema, there are N students in this trip, the cinema has reserved a row in the cinema for the students. A student can get out from the row during the movie If and only If he is not passing in front of a student older than him. Given for every seat in the row the age of the student sitting on it, print "left" if the student can only go left, "right" if the student can only go right, "both" if the student can go in both directions, if the student can't get out from the row output "none". Input The first line of the input contains one integer N (1<><100000). the="" next="" line="" contains="" n="" integers="" where="" a;="" is="" the="" age="" of="" the="" student="" sitting="" on="" the="" chair="" number="" i=""><><100000). output="" output="" n="" lines,="" each="" line="" contains="" one="" string="" representing="" the="" choice="" for="" the="" i"="" student.="" example="" input="" сopy="" 5="" 1="" 213="" 5="" output="" соpy="" left="" left="" none="" left="">

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here