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

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

I solved one problem here is the link to that problem . I believe the logic is correct as two test cases got OK verdict, however I am getting Runtime Error : Exit code is 2 for the third test case. I don't have any clue why this happened. Could this be because of the way input is taken ? or is there any other reason for this. This is the link to my submission : Link. Any hint/help would be appreciated. Thanks

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

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

I think it might be caused by buffer overflow on your scanner, you can increase the buffer to fix it (if it doesn't cause MLE)

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

    MLE? and can you tell me how to increase the buffer

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

      MLE stands for memory limit exceeded, and it's when your program uses more memory than whats allowed. I don't really use golang, so i don't know if that will happen.

      To set your scanner buffer there's a method for the scanner object called "Buffer", you can search on how to use it on google.