| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 206250 | xiesrs | 单词排序 | C++ | Accepted | 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; }