hello all, i m new to codeforces. i want to ask many of the probems contain this as given constraint input:input.txt output:output.txt can anyone explain what does these refer to ??? do i have to take input from input.txt and produce the output by creating a file output.txt
usually u work with console (stdin, stdout). Howewer, when author say to use files, u will use files.
You have to take input from the file named : input.txt and you have to produce output to file named : output.txt , Note that you are not allowed to create output.txt. For every sumbmission you will be provided an already created input.txt and output.txt file. So do not worry about creating it. Just write your contents on it. eg. In C++ : freopen("input.txt","r",stdin); freopen("output.txt","w",stdout);
Normally if input and output files are not mentioned then you have to do Input Output from stdin and stdout. For this you do not need to add anything to your code , beucase normal Input Output happens from stdin and stdout.
Thanks a lot for your help!
Struggled in a question thinking which file is missing.....came here and got the solution!
In C++ Keep the following macro in your code:
In the main function declear it as follows:
whatttt y so many dislikes dude this is best soln i have ever seen