UVa10391
来源:互联网 发布:全国公章大数据平台 编辑:程序博客网 时间:2024/05/14 11:59
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=15&problem=1332&mosmsg=Submission+received+with+ID+11760306
思路很简单,写博客目的是记住find、substr的用法
#include<iostream>#include<set>using namespace std;int main(){ set<string> s; string temp; while (cin >> temp) { s.insert(temp); } for (set<string>::iterator it = s.begin(); it != s.end(); it++) { string a = *it; for (int i = 1; i < a.length(); ++i) { if (s.find(a.substr(0, i)) != s.end() && s.find(a.substr(i, a.length() - i)) != s.end())//核心 { cout << a << endl; break; } } }}
- UVA10391
- UVa10391
- UVA10391
- uva10391
- UVa10391
- uva10391
- uva10391
- uva10391
- UVa10391
- UVA10391复合词
- UVa10391 复合词
- UVA10391-复合词
- uva10391 - Compound Words
- UVA10391- Compound Words
- UVa10391 - Compound Words
- UVa10391 - Compound Words
- UVa10391 string字符串处理
- UVA10391 Compound Words
- 第四届蓝桥排它平方数
- 我不怕,一不怕苦,二不怕死,三不怕老婆离婚,四不怕引起公粪,无不怕所有外星人反对,心中有爱什么都不必怕,心中有鬼见人也怕
- 关于使用ssh框架时,pojo、dao、service三层的关系
- android推送服务
- vs, vsto,custom settings file in app.config 部署后会在哪里
- UVa10391
- OpenSSL 1.0.0生成p12、jks、crt等格式证书的命令个过程(转)
- UNIX内核(3):磁盘读写以及磁盘缓冲的利弊
- 第五部分 家庭创业奔小康12.“破财”“生财”一念间
- MetaException(message:file:/user/hive/warehouse/xxxx is not a directory or unable to create one)
- 关于使用ssh框架时,pojo、dao、service三层的关系
- 大数阶乘算法
- sizeof用法小结
- 第五部分 家庭创业奔小康13.“声东击西”赚钱术