using System.Collections.Generic;
public static void Main()
int[] r = TwoSum(new int[] {2, 7, 11, 15}, 26);
Console.WriteLine(r[0] + " " + r[1]);
static int[] TwoSum(int[] numbers, int target){
Dictionary<int,int> dic = new Dictionary<int,int>();
for(int i=0; i<numbers.Length; i++)
int key = target-numbers[i];
int j = BinarySearch(numbers, key, i + 1);
throw new System.ArgumentException("No tiene solucion");
static int BinarySearch(int[] numbers, int num, int start){
int max = numbers.Length - 1;
else if(num < numbers[mid])