When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

light_yagami52's blog

By light_yagami52, history, 3 years ago, In English

In my editor this python code works fine. But I'm getting Runtime error, exit code 1. Can anyone help me? Click to see My submitted code

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

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

In my editor this python code works fine.

Does it work fine in your editor when processing exactly the same input data that fails on codeforces?

  • »
    »
    3 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Every visible test case i tried and it worked fine.I ran some of my test case too.that's also working fine.But CF do not show all the case. So, I'm not sure what is causing this Runtime error, exit code 1. In my code I'm not finding any reason for Runtime error

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

      Being able to debug your code is a useful skill during contests. Sometimes it pays off to generate a large number of randomized testcases and feed them to your code. That's a reasonably fast way to reproduce a lot of the possible runtime errors and TLEs. Do you need some help with that?

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

        Yeah, i need that help.

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

          Here's a quckly hacked testcase generator Ruby script:

          Testcase generator script

          And here's a testcase, which breaks your code:

          Testcase