ONLINE_JUDGE Preprocessor support

All general topics that Dev Skill members should discuss.

ONLINE_JUDGE Preprocessor support

by devskill » Fri Aug 12, 2016 7:31 am

We are glad to inform our members that Dev Skill now supports ONLINE_JUDGE per-processor for C/C++ & C#

unfortunately Java and PHP do not support per-processor, so these language is out of scope of this feature. We encourage our members to use this feature for flexible coding.

For example, for C/C++ you can now write code like this and can submit it without changing your code:

Code: Select all
int main(){
   #ifndef ONLINE_JUDGE
      freopen("input.txt","r",stdin);
      freopen("output.txt","w",stdout);
   #endif
   //your code goes here
   return 0;
}


So you no longer need to comment out freopen and do not risk getting a failed verdict due to a silly mistake.

Happy Coding :)
User avatar
Site Admin
 
Posts: 118
Joined: Tue Feb 02, 2016 10:24 pm

Who is online
Users browsing this forum: No registered users and 1 guest
cron