grouping and dynamic balancing at the pipes its the solution for dividing bandwidth between active users sharing the available resources.
Be careful using it firmware 2.26.xx have a bug, on it.
If you want grouping by destination ip, use source ip and vice-versa.
In this particular case you may want 2 big pipe to measure the total bandwidth (20mb) (one for the up and one for the down according to available up and down bandwidth), but only use total value, don't use by precedence value because it is used to guarantee bandwidth and that task will be made in another pipe.
Create pipes for 50 users group enabling grouping by destination ip (actually this will do grouping by source ip really), using total value of 12500 and in the precedence number you want to use the to guarantee value.
Create pipes for 10 users group enabling grouping by destination ip (actually this will do grouping by source ip really), using total value of 7500 and in the precedence number you want to use the to guarantee value.
The guaranteed values maybe will need to be recheked because the dynamic grouping by itself guarantee fair bandwidth sharing, but if you want static values you may use group limits value.
Testing is the key of tuning traffic management use ssh managmenet and the pipe commands to buiew actual traffic and -users traffic in grouping pipes.