// in a distribution D of shoes, let a be the number of right shoes of size 1, b
// be the number of right shoes of size 2, and c be the number of right
// shoes of size 3, with a >= b >= c
x = 200;
y = 100;
z = 0;
// x, y, and z represent the number of right shoes in groups X, Y, and Z, each of 200 shoes.
for(int i = 0; i <=100; i++)
{
if (x == a) break;
x--; // increases # of pairs in group X by 1 since x > 100 at start of line
y++; // decreases # of pairs in group Y by 1 since y < 100 at start of line
}
// now x == a (since a >= b >= c, a >=100 and the loop will only terminate by the break statement)
for(int i = 0; i <=100; i++)
{
if(z == c) break;
z++; // increases # of pairs in Z by 1 because z < 100 at start of line
y--; // decreases or increases # of pairs in Y
}
// z == c (since c <= b <= a so c <=100 and the loop only terminates on the break statement)
// Now x == a, z == c, and so y == b, and since in every iteration of every loop the
// # of pairs in X + the # of pairs in Y + the number of pairs in Z did not change or increased (from an initial value of 100), the # of pairs in D >= 100
// And since when the # of pairs increased it was always by 2, the # of pairs in D is even