Editorial for GFSSOC '14 Winter J2 - Wow much parking lot
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Keep track of ~x~ and ~y~ coordinates after each order.
- North adds ~B~ to the ~y~ value.
- South subtracts ~B~ from the ~y~ value.
- East adds ~B~ to the ~x~ value.
- West subtracts ~B~ from the ~x~ value.
Skills needed: Implementation
Time complexity: ~\mathcal O(N)~
Comments