cp_tricks 0.1.0

Tricks for competitive programming. Do not use this crate.
Documentation
  • Coverage
  • 54.55%
    6 out of 11 items documented4 out of 11 items with examples
  • Links
  • Crates.io
  • Dependencies
  • Versions
  • Owners
  • trickster

Tricks for Competitive programming

IO

  • Use Scanner directly and parse input step by step
  • Use input! macro for any arbitrary inputs (Codeforces, Codechef requires this)
  • Or, use Scanner or UnsafeScanner for parsing input on demand

dbg! macro

  • dbg! is so handy, you can place it anywhere in the code, around a variable or even an expression, it outputs the value of expression to stderr. Great for debugging
  • dbg!, when in doubt, pass the reference