i_am_bug's blog

By i_am_bug, history, 4 years ago, In English
  • Vote: I like it
  • -5
  • Vote: I do not like it

| Write comment?
»
21 month(s) ago, # |
  Vote: I like it +9 Vote: I do not like it

This means you have to take input from the input file(input.txt) and you have to output the result in the output file(output.txt).

like in C++ you have to add these two line in your code

freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);

I hope now you got it

  • »
    »
    20 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    lets say the problem has input file as

    input : path.in

    output: standard output

    then how I will modify your ans??

    • »
      »
      »
      20 months ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      just change the first line to freopen("path.in", "r", stdin); and remove the second line