码迷,mamicode.com
首页 > 其他好文 > 详细

0225LC

时间:2020-02-25 20:20:18      阅读:42      评论:0      收藏:0      [点我收藏+]

标签:tor   play   control   bre   str   count   span   isp   通过   

1.LC 139 word Break

BONUS:

将vector数值存储在unordered_set中去重

vector<string> vs;

unordered_set<int> us(vs.begin(),vs.end());

vector通过值找元素只能用find(vector.begin(),vector.end(),val)!=vector.end();

map set可以通过find count来查找map.find(val)/count(val)

 

0225LC

标签:tor   play   control   bre   str   count   span   isp   通过   

原文地址:https://www.cnblogs.com/Marigolci/p/12363274.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!