Блог пользователя elita15

Автор elita15, история, 8 лет назад, По-английски

I used 2D BIT (Range Updates, Point queries) to solve this problem . Here is my solution which results in WA. Can someone please tell me why is this solution failing?

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

»
8 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Well, this problem has a terrible problem statement. I spent sometime reading your code and it looks fine. However, the directions order I know is N, E, S, W not N, E, W, S. I know the problem statement puts them in this order and neither the problem statement nor the sample tests clarify the intended order for the problem but I had to look for accepted solutions for this problem to check the order they used and it seems like the order should be N, E, S, W

Check this https://github.com/jamesdjuhartono/SPOJ/blob/master/src/WINDVANE.cpp