#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <functional>
using namespace std;
int main() {
map<int,vector<int> > myMap;
vector<int> x = {1,2,3,4,5};
myMap[1] = x;
myMap[2] = x;
auto res = accumulate(myMap.begin(), myMap.end(), (size_t)0,
[](size_t prior, const pair<int,vector<int> >& p) -> size_t {
return prior + p.second.size();
}
);
cout << res << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8bWFwPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8ZnVuY3Rpb25hbD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewoJbWFwPGludCx2ZWN0b3I8aW50PiA+IG15TWFwOwoJdmVjdG9yPGludD4geCA9IHsxLDIsMyw0LDV9OwoJbXlNYXBbMV0gPSB4OwoJbXlNYXBbMl0gPSB4OwogICAgYXV0byByZXMgPSBhY2N1bXVsYXRlKG15TWFwLmJlZ2luKCksIG15TWFwLmVuZCgpLCAoc2l6ZV90KTAsCiAgICAgICAgW10oc2l6ZV90IHByaW9yLCBjb25zdCBwYWlyPGludCx2ZWN0b3I8aW50PiA+JiBwKSAtPiBzaXplX3QgewogICAgICAgICAgICByZXR1cm4gcHJpb3IgKyBwLnNlY29uZC5zaXplKCk7CiAgICAgICAgfQogICAgKTsKICAgIGNvdXQgPDwgcmVzIDw8IGVuZGw7CnJldHVybiAwOwp9