max_element 返回值上限与下限 #include <iostream>#include<algorithm>#include<list>usingnamespacestd;//using namespace std::list;//using namespace std::cout;//using namespace std::endl;intmain(intargc,char**argv) { typedef list<int>IntList; IntList coll;for(inti=20; i<40; ++i) { col...
map<int,int>::iterator it=max_element(mp1.begin(),mp1.end());cout<<it->first<<" "<<it->second<<endl;} }
map<int,int>::iterator it=max_element(mp1.begin(),mp1.end());cout<<it->first<<" "<<it->second<<endl;} }