
map
Z~柳
这个作者很懒,什么都没留下…
展开
-
URAL - 1868(map)
At the ICPC World Finals, four sets of gold medals, four sets of silver medals, and four sets of bronze medals are awarded; thus, top twelve teams win medals. There were few days left before the World...原创 2019-02-24 22:38:45 · 317 阅读 · 0 评论 -
map的用法
之前要存哪个数出现几次,总要设一个超过最大数的数组来存,导致内存开销很大,更重要的是无法存浮点数,看到大佬代码才Get到这个map的神奇作用。 首先先定义一个map; map<long doubole,long long >mp; 首先里面初始为零,也就是你要记录出现3.3出现几次,只需每次3.3出现的时候mp[3.3]++即可,最后输出mp[3.3]就是3.3出现的次数了,不过不好的...原创 2019-03-19 17:41:52 · 217 阅读 · 0 评论