Run ID:135710
提交时间:2025-11-08 11:47:18
#include <bits/stdc++.h> using namespace std; int n=1000; int main() { int f,i,j,k,t; vector <char> a(n); cin>>t; i=1; while (i<=t) { cin>>a; j=0; while (j<strlen(a)) { k=j; while (a[j]!=' ') j++; f=j+1; j--; while (j>=k) cout<<a[j--]; cout<<" "; j=f; } i++; } return 0; }