#include <bits/stdc++.h>
using namespace std;
// this adds the key value pair in map instead of updating it, dont know how to overcome this???
struct f{
bool operator()( int a, int b){
return a<b;
}
};
int main() {
map<int,int,f> m;
m[1]=2;
m[2]=1;
m[6]=1;
m[3]=4;
m[6]=34;
m[3]=5;
cout<<m.size()<<"\n";
for(auto x: m) cout<<x.first<<" "<<x.second<<"\n";
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Ci8vIHRoaXMgIGFkZHMgdGhlIGtleSB2YWx1ZSBwYWlyIGluIG1hcCBpbnN0ZWFkIG9mIHVwZGF0aW5nIGl0LCBkb250IGtub3cgaG93IHRvIG92ZXJjb21lIHRoaXM/Pz8Kc3RydWN0IGZ7Cglib29sICBvcGVyYXRvcigpKCBpbnQgYSwgIGludCBiKXsKCQlyZXR1cm4gYTxiOwoJfQp9OwppbnQgbWFpbigpIHsKCW1hcDxpbnQsaW50LGY+IG07CgltWzFdPTI7CgltWzJdPTE7CgltWzZdPTE7CgltWzNdPTQ7CgltWzZdPTM0OwoJbVszXT01OwoJY291dDw8bS5zaXplKCk8PCJcbiI7Cglmb3IoYXV0byB4OiBtKSBjb3V0PDx4LmZpcnN0PDwiICI8PHguc2Vjb25kPDwiXG4iOwp9