map技巧


初始化一个位置

map<int,int> m;
m[1]++;
cout<<m[1];

map遍历

map<int,int>::iterator it;


Author: pkq
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint policy. If reproduced, please indicate source pkq !
  TOC