cswork / OAOpen practice workspace

Akuna CapitalOA #6

Variable Tick Rounding

Estimated MediumStatement and editorial — judging is being prepared

Topics (AI-labelled)Bits & MathBinary SearchSimulation

A Tick describes a range with [lowerBound, upperBound) and a width. A VariableTickTable has cabinetPrice and a vector of Tick ranges. For each input price:

  • If price == cabinetPrice → no rounding needed.
  • Else if price is already tick-aligned in its range → unchanged.
  • Else round to nearest multiple of the range's width (ties → up).

Example: cabinet = 0.01, ticks [(0, 1, 0.01), (1, 5, 0.05), (5, 100, 0.10)], prices [0.01, 0.4, 1.07] → [0.01, 0.4, 1.05] (1.07 in range [1,5) rounds to nearest 0.05 step = 1.05).

Editorial

Loading solution…