Given a non-empty matrix of non-negative integers, answer which unique rows contribute most to the sum total of elements in the matrix.
Answer by any reasonable indication, for example a mask of the unique rows order of appearance (or sort order), or indices (zero- or one- based) of those, or a submatrix consisting of the rows (in any order) or some kind of dictionary construct… — but do explain it!
The unique rows are
[6,3,0] each respectively contributing 6, 6, and 9 each time they occur. However, they occur once, thrice and twice respectively, so all of their respective occurrences contribute 6, 18, and 18 to the total (42), so the latter two rows are the ones that contribute most. Valid answers are therefore:
[false,true,true] mask in appearance/sort order or
[2,3] zero/one-based indices of the above or
[[2,0,4],[6,3,0]] the actual rows
[false,false,true](appearance order) /
(appearance order) /