[Solution] Good Indices CodeChef Solution 2022
Problem
Chef has an array of length .
He calls an index good if there exists some such that .
Chef can perform the following operation at most once:
- Choose any subsequence of the array and add any positive integer to all the elements of the chosen subsequence.
👇👇👇👇👇
Determine the maximum number of good indices Chef can get.
Input Format
- The first line of input will contain a single integer , denoting the number of test cases.
Is it hot or cold CodeChef Solution
Maximise the Tastiness CodeChef Solution
N Buttons 1 Bulb CodeChef Solution
Valid Minimum CodeChef Solution
High Frequency CodeChef Solution
- Each test case consists of two lines of input.
- The first line of each test case contains a single integer denoting the length of the array .
- The second line contains space-separated integers denoting the array .
Output Format
For each test case, output the maximum number of good indices Chef can get after performing the given operation at most once.
No comments:
Post a Comment