anucool1325's blog

By anucool1325, history, 4 weeks ago, In English,

recently in codeforces round 565 i face an unusual problem of runtime error. please anyone explain me why the judge at codeforces threw runtime error while my terminal or any other ide was giving right answer to the test cases. ques-https://codeforces.com/contest/1176/problem/C code- https://ide.geeksforgeeks.org/CmqyhGNrlb

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

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by anucool1325 (previous revision, new revision, compare).

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

make a submission and post the submission code.

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Looking at just the first few sentences of your post, the answer to your query is undefined behavior.

I guess it's time for you to quit CP and revise some basic C++.

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

    can you give me hint about the mistakes i did in the code?

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by anucool1325 (previous revision, new revision, compare).

»
3 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

You can run your code in clang ++ 17. He will bring you your mistake cause of which you got runtime.

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

    it is giving access-violation on unknown address 0x4fffffff but i have initialised the vectors in the desired keys so why this error is thrown by the compiler.