CR2 - Editorial

Practice

Author: Mann Mehta

Tester: Vatsal Parmar

Editorialist: Jaymeet Mehta

DIFFICULTY

Cakewalk

PREREQUISITES

Basic Math

PROBLEM

There are total N students who qualify for the final round, every student have different abilities, some of them are good at logical thinking , and some of them are good at programming skills.
Your task is to find the winner's total skill level, where total skill level is just the sum of both logical and programming skill level.

EXPLANATION

Here student ability is divided into two category it's Logical Skill's and Programming Skill's. So most deserving student will be the having the total value as max as possible.
Hence the maximum sum among all the students logical and programming skill level it's our desire answer.

or solution is max(TL[i] =PL[i]+LL[i]) for all i in range (0 to n-1)

TIME COMPLEXITY

Time Complexity is O(N) per test case.

SOLUTIONS

Author Solution