class Solution {

public:

vector<int> twoSum(vector<int>& nums, int target) {

int i=0,j=0;

vector<int> a;

for (i;i<nums.size()-1;i++){

for(j=i+1;j<nums.size();j++) {

int sum=nums[i]+nums[j];

if(sum==target){

a.push_back(i);

a.push_back(j);

break;}

}

}

return a;

}

};