| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 137581 | hjx233 | 字符串反转 | C++ | Accepted | 9 MS | 280 KB | 473 | 2025-11-20 13:02:55 |
#include <bits/stdc++.h> using namespace std; int main() { int f,i,j,k,t; cin>>t; string a; getline(cin,a); i=1; while (i<=t) { getline(cin,a); j=k=0; while (j<a.size()) { if (a[j]!=' ' and j!=a.size()-1) j++; else { f=j+1; if (j!=a.size()-1) j--; while (j>=k) cout<<a[j--]; if (f!=a.size()) cout<<" "; j=k=f; } } cout<<endl; i++; } return 0; }