C++ 重定位输入输出

将输入输出数据都保存在文件中,就不用每次在控制台输入测试样例,在做题时能方便不少。加入语句:

#include <iostream>

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

  

posted @ 2019-07-22 20:19  patrolli  阅读(367)  评论(0编辑  收藏  举报