Watched the Hint video also but couldn't figure out why it is giving wrong answer
@aryan_007 using this
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);`
freopen("output.txt", "w", stdout);
freopen("error.txt" , "w" , stderr);
#endif
in this problem is causing you error . removing this will get you AC.
Yes sir , This worked but why this happened ?? because if not defined judge condition was there Btw thankyou so much sir , many TAβs just handed me their code saying i was wrong , by not even looking at my code , at least you looked at my code and resolved my problem . Thank you so much sir .
@aryan_007 maybe test cases are not saved at the specific location from where our freeopen() will read file or maybe due to ide issue thats why it is giving wrong answer using this
Okay sir , Thank you sir for resolving this , many questions were stuck due to this problem !! Thank you sir
happy to help , let me know if you have any further queries else mark this doubt as resolved.
Yaa sir , sure doubt is solved !! If i had option i would have given 10 stars but my bad their is only option of 5 stars