2 step buy-sell processes

Revision en1, by TunaMayoSandwich, 2024-07-25 19:39:36

In competitive programming one is often faced with the task to simulate what I call a "buy-sell" (or craft-melt) process where in the first step the player spends a certain amount of resources $$$a$$$ from his budget $$$n$$$ and in the second step he acquires $$$b$$$ units of the resource back by selling what he bought or crafted earlier where the relationship

$$$ n \geq a > b $$$

stands.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English TunaMayoSandwich 2024-07-28 02:02:38 5 Tiny change: 'enforce that the budge' -> 'enforce the budge'
en3 English TunaMayoSandwich 2024-07-26 16:31:49 643 Tiny change: 'it doesn't' -> 'it doesn't.\n\nHp: $n, a, b \in \mathbb{N}$, $n \geq a > b$.' (published)
en2 English TunaMayoSandwich 2024-07-25 20:09:19 2020 Tiny change: '\n\n$n - k*a$' -> '\n\n$n - k \cdot a$'
en1 English TunaMayoSandwich 2024-07-25 19:39:36 402 Initial revision (saved to drafts)