I have map<int, vector > like this:
#include <iostream>
#include <map>
#include <vector>
using namespace std;
int main() {
    
    map<int, vector <int>> someMap;
    someMap[5] = {5, 2, 3, 7};
    someMap[151] = {5, 9, 20};
    return 0;
}
I need to find the last vector element in each map value. Output must be like this:
7
20
Thanks :)
 
     
     
    