6321 Smallest Missing Non Negative Integer After Operations

Since we’re allowed to do +value and -value for unlimited number of times and we don’t really have a deterministic way to check the result. So we should consider to start with the solution space(\(10^5\), not so bad). Starting from solution space, this problem turns into: checking if we can find a number in the array that equals to the next number checking if we can find a number which can be processed and become the next number The first one is trivial....

March 19, 2023 · mimimi