class Solution {
public:
vector<int> twoSum(vector<int>& nums, int c) {
map<int, int> intMap;
vector<int> re;
for (int i = 0; i < nums.size(); i++) {
if (intMap[nums[i]] != 0) {
re.push_back(intMap[nums[i]]-100);
re.push_back(i);
}
intMap[c - nums[i]] = i+100;
}
return re;
}
};