All the Best. 
Please someone help.How to submit a solution in fb hackercup. I am not able to understand the FAQ. Please help
You just have to submit source code and output file after downloading the input file.
How to do that? I have solved one of the problems from past rounds and downloaded the input file. What now? Do I need to add something to my code?What is the process?
Just run your code against the input file and output in another file.
Sorry. Could you explain how to do that?
Thanks. I added those lines , compiled and ran the program. Cmd doesn’t take input from me and neither terminates. Checked the output file and it is showing some random output for all test cases. Even though, input file had only about 1350 test cases , output file is showing much more than that. What could have gone wrong?
cmd will not take imput from you. This is because you have opened the “input_file” as the standard input stream. So it will take the input from the file.
If the program keeps running you probably have an infinite loop, or recursion in your code. Check it.
You input file should be named as “input”.txt.
Yeah that was the problem. Now I submitted it successfully. Thanks a lot.
Did not see that coming. 
Me neither. Didn’t think file name would matter. I did this for first time.
There could be multiple .txt files in your directory. How would it know which file to choose?
That’s alright. I do not use freopen(). I redirect the streams from the terminal. You can do this with:
Compilation:
$ g++ code.cpp -o OUTPUT
$ ./OUTPUT < in > out
Where in is my input file and out is my output file. In your case,
$ ./OUTPUT < input.txt > output.txt
(if you do not give -o during compilation, replace ./OUTPUT with ./a.out)
Btw do you know why is source code required when they only check the output file and not the source code? People can even cheat in this way.
I’m not sure. I guess they only check the output file in practice mode. For the contest, they probably do cross check it with the source later. I’m guessing they are doing this to reduce the load on the servers? They probably cross check the source only for those who clear that round.
I’m not entirely sure though. This will be my first hackercup. I started CP very recently.
Okay! Seems right.
Same!
Yes you are right. 