You and 99 strangers are kidnapped by aliens and buried up to your necks in sand in a single-file line. A skin-tight white or black hat is placed on everyone's head, in a random ratio (not necessarily 50-50). Person 100 at the back can see all 99 hats in front of them but not their own; person 99 sees the 98 in front, and so on, until person 1 sees nothing. Starting from the back, the aliens ask each person what colour their own hat is. If right, they go free; if wrong, they are shot. You get 10 minutes to strategise before being buried. The only words anyone may say are "white" or "black", with no change of inflection or volume. What strategy saves as many people as possible, and how many does it save?
Reveal answer
Agree beforehand that "black" means an odd number of white hats and "white" means even. Person 100 announces the parity of white hats they see (and may die); each person after can deduce their own hat from that parity and the hats ahead. This guarantees 99 people survive.