teams teams seeded from 1 (strongest) to teams (weakest). To keep strong teams from knocking each other out early, in every round the strongest remaining slot plays the weakest one, the second strongest plays the second weakest, and so on. A slot that came out of an earlier round is as strong as the best seed in it.
Write the whole bracket as one string: a match is (A,B), where A and B are team numbers or matches of the previous round written the same way, with the stronger side on the left. No spaces.
For example, with 4 teams the bracket is ((1,4),(2,3)).teams=4 → '((1,4),(2,3))'
In round one, 1 plays 4 and 2 plays 3. The winners meet in the final.
teams=8 → '(((1,8),(4,5)),((2,7),(3,6)))'
Round one: (1,8), (2,7), (3,6), (4,5). In round two the pairs are matched strongest against weakest again: the pair holding 1 faces the pair holding 4, and the pair holding 2 faces the pair holding 3.
teams=2 → '(1,2)'
teams = 2ˣ with 1 ≤ x ≤ 12teams=4
'((1,4),(2,3))'
Run checks the first 3 tests in your browser. Submit checks all 15 tests on the server, hidden ones included.