bool myCmp(int a, int b) {
// 比较a和b的个位数
return a % 10 < b % 10;
}
int main() {
srand(time(NULL));
// 默认情况下,最大堆
priority_queue<int> pq;
for (int i = 0; i <...
int main() {
map<int, int> myMap;
// 查找
if (myMap.find(42) == myMap.end())
cout<<"Can not find element 42"<<endl;
else
cout<<"Element 42 is in the map"...