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

Автор calm_ankush, 9 лет назад, По-английски

Which algo should be used???? http://acm.timus.ru/problem.aspx?space=1&num=1220 problem is Memory limit exceeded here..

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

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

I haven't tried to solve it myself. Could you please elaborate more on what's your approach to see if we can point you in the right direction?

  • »
    »
    9 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I m using stack[1001] stl here, but it shows memory limit exceeded...

    • »
      »
      »
      9 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      stl stack (std::stack) uses too much memory. You should organize your own stack. I used my own linked lists. Eech node of the list contain 0..7 elements.

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

try to submit under Visual C++ 2010 if you are using G++.