| Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|---|
| 206250 | xiesrs | 单词排序 | C++ | 通过 | 100 | 0 MS | 272 KB | 482 | 2026-03-19 22:14:33 |
#include<bits/stdc++.h> using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr);cout.tie(nullptr); string t; getline(cin,t); vector<string> v; string s=""; for(auto ch:t){ if(ch==','||ch==' '){ v.push_back(s); s=""; }else if(ch=='.'||ch=='!'){ v.push_back(s); s=""; break; } else s+=ch; } cout<<v.size()<<"\n"; sort(v.begin(),v.end()); for(int i=0;i<v.size();i++)cout<<v[i]<<"\n"; return 0; }