Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
101952 Tom0 单词排序 C++ 解答错误 0 0 MS 276 KB 404 2023-09-11 14:37:53

Tests(0/5):


#include <iostream> #include <algorithm> using namespace std; typedef long long LL; string s, t, ans[105]; int n; int main() { getline(cin, s); for (int i = 0; i < s.size(); i++) if (isalpha(s[i])) t += s[i]; else { ans[++n] = t; t = ""; } sort(ans + 1, ans + n + 1); for (int i = 1; i <= n; i++) cout << ans[i] << endl; return 0; }


测评信息: