Run ID:160645

提交时间:2026-09-25 20:41:52

#include<bits/stdc++.h> using namespace std; int main(){ int T; cin>>T; cin.ignore(); while(T--){ string line; getline(cin,line); stringstream ss(line); string word; bool first=true; while(ss>>word){ reserse(word.begin(),word.end()); if (!first) cout << " "; cout << word; first = false; } cout << endl; } return 0; }