当前位置:网站首页>3124. Word list
3124. Word list
2022-07-02 02:54:00 【Python ml】
#include <iostream>
#include <set>
using namespace std;
int main() {
int n;
cin>>n;
getchar(); //3 The following newline character
for(int i=0;i<n;i++){
string s,t; //t Save words
set<string> st;
getline(cin,s);
for(int j=0;j<s.length();j++){
if(isalpha(s[j])){
//s[j] If it is a letter, continue to add
t+=s[j];
}
if(!isalpha(s[j])||j==s.length()-1){
if(t.length()!=0) st.insert(t); //t Insert only if it is not empty
t=""; // One word input ends , empty
}
}
cout<<"case #"<<i<<":"<<endl;
for(auto it=st.begin();it!=st.end();it++){
if(it==st.begin())cout<<*it;
else cout<<" "<<*it;
}
cout<<endl;
}
return 0;
}
边栏推荐
- About DNS
- What is the difference between an intermediate human resource manager and an intermediate economist (human resources direction)?
- [staff] restore mark (Introduction to the use of restore mark | example analysis of Metaphone mark and restore mark)
- Delphi xe10.4 installing alphacontrols15.12
- 创业了...
- QT implementation interface jump
- 2022-2028 global wood vacuum coating machine industry research and trend analysis report
- Deployment practice and problem solving of dash application development environment based on jupyter Lab
- 結婚後
- 只需简单几步 - 开始玩耍微信小程序
猜你喜欢

The basic steps of using information theory to deal with scientific problems are

Coordinatorlayout + tablayout + viewpager2 (there is another recyclerview nested inside), and the sliding conflict of recyclerview is solved

Tupu software has passed CMMI5 certification| High authority and high-level certification in the international software field
![[staff] pitch representation (bass clef | C1 36 note pitch representation | C2 48 note pitch representation | C3 60 note pitch representation)](/img/98/956d8abbccceb1aae47e25825bc63d.jpg)
[staff] pitch representation (bass clef | C1 36 note pitch representation | C2 48 note pitch representation | C3 60 note pitch representation)

PHP notes - use Smarty to set public pages (include, if, else, variable settings)

SAP ui5 beginner tutorial 19 - SAP ui5 data types and complex data binding

Xiaomi, a young engineer, was just going to make soy sauce

2022-2028 global soft capsule manufacturing machine industry research and trend analysis report

2022-2028 global military computer industry research and trend analysis report

Mongodb non relational database
随机推荐
Which brand of running headphones is good? How many professional running headphones are recommended
Es interview questions
【带你学c带你飞】2day 第8章 指针(练习8.1 密码开锁)
Mongodb base de données non relationnelle
【带你学c带你飞】1day 第2章 (练习2.2 求华氏温度 100°F 对应的摄氏温度
Start a business
Après le mariage
QT implementation interface jump
Yyds dry goods inventory accelerating vacuum in PG
Additional: information desensitization;
Soul app released the annual report on generation Z behavior: nearly 20% of young people love shopping in the vegetable market
Use usedeferredvalue for asynchronous rendering
[reading notes] programmer training manual - practical learning is the most effective (project driven)
浅谈线程池相关配置
What is the difference between an intermediate human resource manager and an intermediate economist (human resources direction)?
2022低压电工考试题模拟考试题库模拟考试平台操作
Which kind of sports headphones is easier to use? The most recommended sports headphones
设置状态栏颜色
[learn C and fly] 1day Chapter 2 (exercise 2.2 find the temperature of Fahrenheit corresponding to 100 ° f)
Systemserver service and servicemanager service analysis