fork download
  1. #include <iostream>
  2. #include <map>
  3. using namespace std;
  4.  
  5. int main() {
  6. // your code goes here
  7. map<int, int> m;
  8. m.insert(make_pair(10, 11));
  9. int i = 0;
  10. for(auto it : m){
  11. cout << it.second << endl;
  12. if(i++ == 0){
  13. m.insert(make_pair(1, 12));
  14. }
  15. }
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
11