I think I solved subarray distinct values from cses, but the online judge is acting weird.
It’s saying that the answer to this input:
20
1 2 3 2 3 2 2 3 1 2 1 1 1 2 3 2 3 3 2 2
is 419.
My program got 38. 419 is not even possible.
Here’s my solution:
https://cses.fi/paste/00b7e081703e954cf4205c/