哪個函式不開放使用壓?
#include <iostream.h>
#include <map.h>
using namespace std;
int main()
{
int n;
map<int,int> m;
while(cin>>n)
{
m[n]++;
}
map<int,int>::iterator iter;
for(iter=m.begin();iter!=m.end();iter++)
{
if(iter->second==2)
{
cout<<iter->first;
break;
}
}
return 0;
}