Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- assume 8 groups of 16 people leading to a 8-person final bracket
- seeds are 1-128
- Group A is seeds 1-16
- Group B is seeds 17-32
- etc.
- 1->1
- 2->17
- 3->33
- 4->..
- ...
- 8->113
- ...
- 9->2
- 10->18
- 11->34
- ...
- 128->128
- seed mod 8 = group (1-8:A-H)
- (remainder-1)*16 = modifier
- x=(8*y)+z y is 1-16, z is 1-8
- 2 = (8*0)+2
- seed = ((2-1)*16)+(0+1)
- 11 = (8*1)+3
- seed = ((3-1)*16)+(1+1) = 32+2 = 34
- new = (((seed mod 8)-1)*16) + (floor(seed/8)+1)
- new = (((seed mod [#groups])-1) * [#people per group]) + (floor(seed/[#groups])+1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement