hello everyone ; I am trying to solve this problem
https://codeforces.com/problemset/problem/791/A
and my submission is
https://codeforces.com/problemset/submission/791/162926301
The code is running and producing correct output for sample test cases in my local ide but in codeforces, I am getting Runtime error for sample testcase!!
Is there anything I am missing?
Dude, Codeforces even tells you a reason. Your function does not return anything in one of the cases. You should add a return keyword in front of a function call.
But why does it get accepted in c++17??
I hate that we cannot pin forever some blog like "What the undefined behaviour is and how not to fool yourself with "but it was accepted in my local/another server compilator"