Hi, I tried submitting solution to this problem: https://mirror.codeforces.com/contest/253/problem/B, in the problem statement it's mentioned to read input and output from the files "input.txt" and "output.txt" respectively, I did the same in my code using these two lines: freeopen("input.txt", "r", stdin); freeopen("output.txt", "w", stdout); But still i'm getting the this error, Here is the link to my submission: https://mirror.codeforces.com/contest/253/submission/135225966, Please help if you know. Thank You!!








You do
freopenin#ifndef ONLINE_JUDGEblock, AFAIK Codeforces defines ONLINE_JUDGE on code compilation, so you should either remove#ifndefblock or replace it with#ifdef(the latter in the case you don't want to useinput.txtoroutput.txtlocally)