#includefreopen("in.txt","r",stdin);//重定向输入为文件freopen("out.txt","w",stdout);//重定向输出到文件然后调scanf,gets等标准io都会从in.txt获取输入,调printf等会输出到out.txt。