the logic i used:-
so i thought that let us suppose there are 5 contestants, 2 contestants(s1 and s2) when fighting with each other
the end result would be same, i.e the array s1 or s2 would be same depending on who wins.
and i also thought the fighting is commutative and associative.
(same if s1 and s2 and then s1 and s3 or (s1 and s3) then s1 and s2))
==> so i made everyone fight with s1 contestant (s2 through sn) and used the fight function to calculate the value of count.
the value of count is initially the number of weapons s1 contains.
let us suppose s2 is fighting with s1, and now :-
// i used 2d array
pls help, thank you guys
sorry if i am missing something obvious