Skip to content

Instantly share code, notes, and snippets.

@quan-nguyen2
Created April 11, 2022 10:23
Show Gist options
  • Save quan-nguyen2/91982b86203dce452b3bac18b5ca8aec to your computer and use it in GitHub Desktop.
Save quan-nguyen2/91982b86203dce452b3bac18b5ca8aec to your computer and use it in GitHub Desktop.

demo click to expand

Click to expand!
  • sort bidder reversed by bid: i.e P1 has biggest budget; P(N) have smallest budget
  • P(i) with i > K bid for item[k]
  • P(i) with i <= K bid for the item[i], with price
    • 1+budget[i+1] if player i-th exists
    • MIN_BID if player (i+1)-th exists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment