Tap here to switch tabs
Problem
Submissions

Problem: Check If It Is a Good Array

Check If It Is a Good Array asks whether values from a subset of positive integers can each be multiplied by an integer and combined to sum to one. Return true or false.

Statement

Given an array of positive integers nums, determine if it is possible to choose a subset of nums, multiply each selected integer by an integer, and sum the results to obtain 11.

Return true if such a selection exists, or false otherwise.

Constraints:

  • 1≤1 \le nums.length ≤105\le 10^5

  • 1≤1 \le nums[i] ≤109\le 10^9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Check If It Is a Good Array

Check If It Is a Good Array asks whether values from a subset of positive integers can each be multiplied by an integer and combined to sum to one. Return true or false.

Statement

Given an array of positive integers nums, determine if it is possible to choose a subset of nums, multiply each selected integer by an integer, and sum the results to obtain 11.

Return true if such a selection exists, or false otherwise.

Constraints:

  • 1≤1 \le nums.length ≤105\le 10^5

  • 1≤1 \le nums[i] ≤109\le 10^9