【链接】 我是链接,点我呀:)

【题意】

在这里输入题意

【题解】

每个字符串如果每个字符按照升序排一下。假设他们能够互相变化。
则肯定是一样的。
根据这个东西,用一个map来判重就好。

【错的次数】

在这里输入错的次数

【反思】

在这里输入反思

【代码】

#include <bits/stdc++.h>
using namespace std; string s;
vector<string> words, ans;
map <string, int> mymap; string pack(string t)
{
int len = t.size();
for (int i = 0; i < len; i++)
t[i] = tolower(t[i]);
sort(t.begin(), t.end());
return t;
} int main()
{
//freopen("F:\\rush.txt", "r", stdin);
ios::sync_with_stdio(0), cin.tie(0);
while (cin >> s)
{
if (s[0] == '#') break;
words.push_back(s);
mymap[pack(s)]++;
}
int len = words.size();
for (int i = 0; i < len; i++)
if (mymap[pack(words[i])] == 1)
ans.push_back(words[i]); sort(ans.begin(), ans.end()); for (string x : ans)
cout << x << endl;
return 0;
}

最新文章

  1. C++中的时间函数
  2. YII的Modules模块化
  3. css3动画效果
  4. MySQL数据恢复和复制对InnoDB锁机制的影响
  5. 转:Microsoft Enterprise Library 5.0 系列教程(一) Caching Application Block (高级)
  6. &ldquo;锁定&rdquo;语句 lock(C# 参考)
  7. Js数组去重复取唯一值
  8. 实际中理解div布局和浮动
  9. [转] GDB attach
  10. 轻松完成WAP手机网站搭建
  11. PHP二维数组排序函数
  12. Android studio多个项目之间怎么实现快速切换?
  13. 201521145048《Java程序设计》第6周学习总结
  14. Mysql无法启动 InnoDB: Attempted to open a previously opened tablespace
  15. webpack构建本地服务器
  16. java并发包——阻塞队列BlockingQueue及源码分析
  17. ASCII与HEX对照转换表
  18. 洛谷[LnOI2019]长脖子鹿省选模拟赛 简要题解
  19. xadmin的使用
  20. Windows 7 编译64位boost库

热门文章

  1. php中array_merge函数
  2. POJ 2455 二分+网络流
  3. 云服务器查看外网ip
  4. 00081_List接口
  5. Java生产者与消费者(下)
  6. Prism 框架基础架构
  7. Oracle数据库安装时 environment variable path 大于 1023
  8. OSI模型与TCP/IP协议族
  9. LeetCode OJ Basic Calculator II
  10. 【剑指Offer面试题】九度OJ1384:二维数组中的查找