Tap here to switch tabs
Problem
Submissions

Problem: Maximum Strength of a Group

Try to solve the Maximum Strength of a Group problem.

Statement

You are given a 00 indexed integer array nums representing the scores of students. Choose a non empty group of students to maximize the overall strength of the group.

The strength of a group formed by selecting students at indices i0,i1,…,iki_0, i_1, \dots, i_k is defined as the product of their scores: nums[i0]imes[i_0] imes nums[i1]imes…imes[i_1] imes \dots imes nums[ik][i_k].

Return the maximum strength that can be achieved.

Constraints:

  • 1≤1 \leq nums.length ≤13\leq 13

  • −9≤-9 \leq nums[i] ≤9\leq 9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Strength of a Group

Try to solve the Maximum Strength of a Group problem.

Statement

You are given a 00 indexed integer array nums representing the scores of students. Choose a non empty group of students to maximize the overall strength of the group.

The strength of a group formed by selecting students at indices i0,i1,…,iki_0, i_1, \dots, i_k is defined as the product of their scores: nums[i0]imes[i_0] imes nums[i1]imes…imes[i_1] imes \dots imes nums[ik][i_k].

Return the maximum strength that can be achieved.

Constraints:

  • 1≤1 \leq nums.length ≤13\leq 13

  • −9≤-9 \leq nums[i] ≤9\leq 9