You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Codeforces and other online judges compile with -DONLINE_JUDGE option in C++, I frequently use the following construct in my code. But, this causes a problem when using Hightail, as it expects output from stdout, not output.txt file.
Hightail parses the sample input and output and then directly runs the code and takes input from stdin and outputs to stdout and also checks the output of your program to the correct output. By parsing, hightail saves you your time of copy pasting the sample input and output and checking the program's output to the correct output.
Thus using '#ifndef ONLINE_JUDGE' etc would be unnecessary. I don't think it is necessary for Hightail to run the program with the -DONLINE_JUDGE as the real motive of using Hightail is lost.
@deepamsarmah I agree with you. But still, it would be nice to have that additional functionality. That may come handy while debugging, when we may need to print lots of lines, like 2D arrays, sets, maps etc, I am not sure they would all fit on Hightail display. Afterall hightail purpose wasn't to aid as a debugging tool. It's a good testing tool, and it allows us to add extra test cases too. So, by having Hightail compile the code with -DONLINE_JUDGE, we can do both. Whenever we need to get our hands dirty with debugging, we can switch to the input/output in IDE, but before submitting the code, we can use Hightail to test the code.
Since Codeforces and other online judges compile with -DONLINE_JUDGE option in C++, I frequently use the following construct in my code. But, this causes a problem when using Hightail, as it expects output from stdout, not output.txt file.
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
So, if Hightail could recompile the code with -DONLINE_JUDGE option, it would solve this issue.
The text was updated successfully, but these errors were encountered: