// map::begin/end
#include <iostream>
#include <map>

#include <time.h>
using namespace std;

int main ()
{
  map<int,int> mymap;
  map<int,int>::iterator it;
 double debut,fin;
 int i;
  for(i=0;i<10000000;i++) mymap[i] = 100*i;

  // show content:
  for ( it=mymap.begin() ; it != mymap.end(); it++ )
    //cout << (*it).first << " => " << (*it).second << endl;
    debut = ((double)clock());
     mymap.insert (pair<int,int>(10000002,300));
     //for ( it=mymap.begin() ; it != mymap.end(); it++ )
     fin = ((double)clock());
      cout<<"duree"<<(fin-debut)/CLOCKS_PER_SEC*1000000<<" micros ";
it=mymap.end(); it--;
    cout << (it)->first << " => " << (*it).second << endl;

  return 0;
}
