| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 160548 | 格林老师 | 字符串反转 | C++ | Presentation Error | 10 MS | 264 KB | 494 | 2026-09-22 16:55:03 |
#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){ reverse(word.begin(),word.end()); if (!first)cout<<" "; cout<<word; first=false; } cout<<endl; } return 0; }