#Algos and data structs problem

10 messages Β· Page 1 of 1 (latest)

late swallowBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

mighty wing
#

INPUT FORMAT (input arrives from the terminal / stdin):
The first line contains N
.

The second line contains N
integers a1…aN

, the initial bacteria levels of each patch of grass.

OUTPUT FORMAT (print output to the terminal / stdout):
The minimum number of applications necessary to make every patch of grass have the recommended value of bacteria for healthy grass.

SAMPLE INPUT:

2
-1 3

SAMPLE OUTPUT:

6

Use the type of pesticide that removes bacteria, at a power level of 1, five times. Then use the type of pesticide that adds bacteria, with a power level of 2

, one time.

SAMPLE INPUT:

5
1 3 -2 -7 5

SAMPLE OUTPUT:

26

#

time limit is 2 secs

twin oxide
#

Bro is this the usaco this weekend πŸ’€πŸ’€πŸ’€

mighty wing
#

yeah I did it yesterday

twin oxide
#

Yeah sure

#

People havent taken it yet

mighty wing
#

wdym

twin oxide
#

Please delete this thread

#

<@&847915341954154536>