LaFuckinGioconda's blog

By LaFuckinGioconda, history, 8 years ago, In English

Hi, I need help with this code, it gives me RuntimeError but i can't figure out why!? 21860477

Thanks in advance.

  • Vote: I like it
  • -19
  • Vote: I do not like it

| Write comment?
»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

brother in your code you are using last[v[i]] = i; here range of v[i] is from 0 to 10^9 which will surely given you an index out of bound error. use map instead of array to declare last .:)