ok, so the way is
if n coins are tails and you want to seperate the big pile into 2 piles with equal number of tails, then you take n coins out of the main pile and flip them all over
Step-by-step explanation
ok, so let's use the xample
you have 10 tails up
let's say x+y=10
you take out 10 random coins
there are x tails and y heads in that pile because x+y=10
since you took out x tails from the main pile, ther are now 10-x or y tails in the main pile
but you have no way of finding those coins
if yo go to the 10 random coinsn yo got, you have y heads but you need y tails
solution? flip all coins in the 10 pile over to get x heads and y tails