| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 136264 | 彭士宝 | 字符串反转 | C++ | Presentation Error | 8 MS | 264 KB | 559 | 2025-11-09 23:25:27 |
#include <iostream> #include <sstream> #include <algorithm> 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; }