Concepts2
⚙️AlgorithmIntermediate
Modular Arithmetic Pitfalls
Modular arithmetic is about working with remainders, but programming languages often return negative remainders, so always normalize with (a % MOD + MOD) % MOD.
#modular arithmetic#modular inverse#fermats little theorem+12
⚙️AlgorithmIntermediate
Debugging Strategies for CP
Systematic debugging beats guesswork: always re-read the statement, re-check constraints, and verify the output format before touching code.
#competitive programming#debugging#stress testing+12