pas.andrei's blog

By pas.andrei, history, 9 years ago, In English

I was trying to solve this problem, but I kept getting "Runtime error on test 1" until I changed the code a bit:

This into this. Can someone tell me why I got RTE before?

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it
  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    OH, I think i found the explanation: in the RTE code it first checks if viz[x] != i, but x can be bigger than than the biggest index in the array viz. Thanks!