City of Lights

ihumaunkabir Criterion 2021 Round 13
Limits 1s, 512 MB

In ancient time there was a city named Maya. In Maya, there are lights everywhere on the roads. The source of light is incandescent light bulbs. A lamp post contains multiple incandescent light bulbs. Suddenly, a storm went over the city with high-speed wind and some of the light bulbs destroyed. The governor of the city is a perfectionist. He wants to re-decorate the light bulbs as soon as possible. He wants an equal number of light bulbs in every lamp post and the cost of removing or adding a light bulb is the same. A specialist suggested to the governor that, a single action either adding or removing the light bulbs should be done for quick re-decoration of all the lamp posts. The specialist also suggested an action that costs less.


The input contains an integer NN ( 2<N10002 < N \leq 1000 ), the number of lamp posts to be re-decorated. The next line contains NN integers Ni,Ni+1,Ni+2,......NN1N_i, N_{i+1}, N_{i+2},......N_{N-1} where (1<=Ni<105)( 1 <= N_i < 10^5 ) the number of light bulbs in each lamp post.


Print a single line “Add Light Bulbs” or “Remove Light Bulbs” without quotes which is the cost-effective action suggested by the specialist. If the cost ties between the actions then print “Add Light Bulbs” without quotes.


2 2 1
Add Light Bulbs
1 1 2
Remove Light Bulbs


Login to submit.


93% Solution Ratio
Apurba.884537Earliest, Apr '21
maruf089Fastest, 0.0s
maruf089Lightest, 0 B
bokaifShortest, 147B
Toph uses cookies. By continuing you agree to our Cookie Policy.