| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 151309 | 陈棋 | 字符串反转 | C++ | Accepted | 8 MS | 280 KB | 320 | 2026-04-11 16:49:44 |
#include<bits/stdc++.h> using namespace std; int main(){ int T; cin>>T; cin.ignore(); while(T--){ string s; getline(cin,s); int n=s.size(); int l=0; for(int i=0;i<=n;i++){ if(i==n||s[i]==' '){ reverse(s.begin()+l,s.begin()+i); l=i+1; } } cout<<s<<endl; } return 0; }