笔记
to cling
Everything negative - pressure, challenges - is all an opportunity for me to rise.
展开
-
map の 常用方法
使用 it = mp.lower_bound(x) 该函数返回一个value值大于等于x的 pair型指针。it->first 为key it.second 为value 若找不到这样value, 则返回一个 空指针。可以用 it == mp.end() 来判断。 mp.erase(it) 删除 it 结点。注意用法。 ...原创 2022-05-06 17:31:47 · 133 阅读 · 0 评论 -
超好用的C++函数(ACM)
string类字符转数字 stoi;stol;stoul;stoll;stoull;stof;stod;stold 数字转string类字符串 to_string string类字符串反转 strrev(s) 字符串和数组旋转函数 rotate printf ("%.10lf", n); cout << setprecision(10) << n; (保留十位有效数字) printf(“%7d”,n); cout << setw(7) << n; ...原创 2022-01-09 00:01:05 · 236 阅读 · 0 评论