title: How to minimise sum of 4 different people's scores, each in distinct disciplines
body: <p>In a swimming contest, there are 4 types of different strokes. Each contestant participates in all of them and their completion times are recorded. From all the contestants, four have to be chosen such that their combined time is minimum(one contestant can be chosen for only one stroke). More than one such team may be possible and all of such teams must be printed in output.</p>
  
  <p>For example, say there are four contestants A, B, C and D. Their completion times are</p>
  
  <pre><code>A    50.5   52.9   51.8   52.7
  B    50.7   52.7   51.4   52.7
  C    50.7   52.7   51.4   52.8
  D    50.8   52.9   51.6   52.6
  </code></pre>
  
  <p>Here, the minimum time would be (A - 50.5, C - 52.7, B - 51.4, D - 52.6) and (A - 50.5, B - 52.7, C - 51.4, D - 52.6).</p>
  
  <p>I don't have any test cases for this. I can do it using brute force but that would take O(n^4). What would be a better approach?</p>