Nevermind, got it accepted after declaring hypot in the header. I got AC in more than 3 seconds.. is there a greedy way to do it or something? The times were really fast.. My timing was .082 sec. I used O(2^n* n) DP. When dividing the original problem into subproblems, you only need to match only o...