#include <unordered_map>
class Solution {
public:
    vector<int> twoSum(vector<int>& numbers, int target) {
        vector<int> res;
        unordered_map<int, int> hash;
        
        for(int i=0;i<numbers.size();++i)
        {
            int tmp=target-numbers[i];
            if(hash.find(tmp)==hash.end())
                hash[numbers[i]]=i;
            else
            {
                res.push_back(hash[tmp]+1);
                res.push_back(i+1);
            }
        }
        return res;
    }
};