#include <bits/stdc++.h> using namespace std; #define ll long long #define inf 0x3f3f3f3f #define N 2000 int main(){ ofstream outfile; outfile.open("out.txt"); string sss; while(1){ getline(cin,sss); stringstream ss(sss); string tmp; ss>>tmp; while(!ss.eof()){ ss>>tmp; cout<<' '<<tmp; outfile<<' '<<tmp; } cout<<'\n'; outfile<<'\n'; }return 0; }
来源:https://www.cnblogs.com/guanwen769aaaa/p/11436614.html