Looking for a MEX hint

Revision en1, by EugeneJudo, 2021-08-04 03:25:14

I'm trying to solve https://cses.fi/problemset/task/2183, and I'm completely baffled since every approach I come up with looks to violate the subset sum problem being NP complete for finding a specific subset that sums to N. I'd appreciate a nudge in the right direction.

My observations so far:

  • If $$$1,2,4,...,2^i$$$ are in $$$X$$$, then $$$MEX >= 2^{i+1}$$$

  • $$$MEX <= 1 + (x_1 + \ldots + x_n)$$$

  • $$$MEX = 1$$$ if $$$\min(X) > 1$$$

None of these observations seem sufficient in general.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English EugeneJudo 2021-08-04 03:25:14 509 Initial revision (published)