Milking Cows, Solution Explanation
===

I practicing C++ solving some exercises, but after the whole day, I couldn't solve on of them. So, I searched through the web and found a short solution, but, I can't understand it.

The Exercise:
http://jeremiahflaga.blogspot.com/2011/09/milking-cows-programming-problem-from.html

The Solution
https://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=13658&lngWId=3

I'm interested because I want to learn to solve problems using binary data, like this exercise, all the data is stored inside a bitset.

So, It would be nice is someone can explain the solution to me.