方法:在读写前添加这条语句

std::ios::sync_with_stdio(false);

原因参考这里

注意用这个语句后cin/coutscanf/printf不要再同时使用,否则很可能出现混乱。


*** walker ***