You are given a 0-indexed integer array nums of length n. Your goal is to transform this array into a strictly increasing array using a special operation.
The Operation: You can pick any index i (that you haven't picked before) and subtract a prime number p from nums[i], where p < nums[i]. You can perform this operation as many times as needed.
Your Task: Return true if you can make the array strictly increasing, false otherwise.
A strictly increasing array means each element is greater than the previous element: nums[0] < nums[1] < nums[2] < ... < nums[n-1]
Example: For array [4, 9, 6, 10], you could subtract prime 2 from nums[1] to get [4, 7, 6, 10], then subtract prime 3 from nums[2] to get [4, 7, 3, 10]. But this won't work since 7 > 3. The key insight is working backwards!
Input & Output
Constraints
- 1 โค nums.length โค 1000
- 1 โค nums[i] โค 1000
- You can use each index at most once
- Prime p must be strictly less than nums[i]