Company: LeadSquared_8aug
Difficulty: medium
Maximum Material Protection Problem Description Cynthia, a skilled architect, has been working on designing a new set of buildings for her city. She has distributed construction materials between several construction sites, each represented by a row of storage containers. The containers are arranged in a straight line, each containing a certain amount of building materials in kilograms. However, an unexpected storm has hit the city, and Cynthia must protect as many materials as possible from getting soaked in the rain. Some containers are initially covered with lids, and a lid can be moved to any container on its left , but cannot skip over containers. Each container can be covered by at most one lid, and each lid can be used exactly once . Your task is to calculate the maximum total kilograms of building materials Cynthia can save by strategically shifting the lids to the left (if beneficial) to cover the containers with the most materials. Input Format The first line contains a singl