博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【模板】Hash
阅读量:4576 次
发布时间:2019-06-08

本文共 615 字,大约阅读时间需要 2 分钟。

洛谷3370

这题煞笔的吧QAQ......排序去重或者Map都可以

1 #include
2 #include
3 #include
4 using namespace std; 5 map
dic; 6 int ans=0,n; 7 int main() { 8 scanf("%d\n",&n); 9 for (int i=1;i<=n;i++) {10 char c=getchar();11 int x=0;12 while (c!='\n'){13 x=x*2333+c-'a';14 c=getchar();15 }16 if (!dic.count(x)) {17 ans++;18 dic[x]=i;19 }20 }21 printf("%d",ans);22 return 0;23 }
View Code

 

转载于:https://www.cnblogs.com/DriverLao/p/7807721.html

你可能感兴趣的文章
AE待整理
查看>>
java8中规范的四大函数式接口
查看>>
宝塔apache配置
查看>>
shell脚本中使用nohup执行命令不生效
查看>>
PHP 文件上传七牛云
查看>>
ZT:Unity与C++之间进行socket通信
查看>>
Ural 1517. Freedom of Choice 后缀数组
查看>>
【转载】Maven入门实践
查看>>
1-4-03:奇偶数判断
查看>>
【SQL Server备份恢复】提高SQL Server备份速度
查看>>
命令行简介(附加参考资料)
查看>>
从0开始整合SSM框架-1.mybatis
查看>>
移位操作的疑问
查看>>
UILabel常用属性小结
查看>>
gitlab 邮件服务器配置
查看>>
Python 循环语句(while, for)
查看>>
深入理解JavaScript原型链
查看>>
LinearGradient类来实现图片的渐变效果
查看>>
Golang关键字—— if/else
查看>>
数据清洗
查看>>