I can do better.
I could save 99 to a hundred of them. (1 up to chance)
It's not what they, but how
they say it.
Assuming that the
first wise man sees in front of him. 99 hats.
all that has to be done is that the first man says the colour of the hat infront of him. By chance, if his hat is the same, he lives. If not, he dies. That's the ONE.
The second man knows the colour of his hat (maybe by an act of sacrifice). So he now says it. But if the colour of the hat on the man infront of him is the same as his own, he says that one word in a falsetto. If it differs, he says the same word, but in a deep bass tone. That way, all that the men have to do is attend to the tone of the man immediately behind him.
And, even better, it has nothing to do with the:
proportion/number of blue and red hats?
the wise men down the line must also listen to what colour hat all the wise men behind him has.
which frankly would be UNWISE. I mean, you're assuming that they all have awesome memories, and that's a stretch, especially under stressful conditions. Additionally, foul-ups would complicate the matter, especially if the king 'kills them silently'. They wouldn't know if a mistake was made, and consequently miscount.
In my answer, you admittedly have to trust that all the 100 men are not psycho, or bear a grudge against the man infront. But in the 'listen down the line' scenario, you have to assume all those conditions as well as that each man has amazing abilities of recollection, and can see down the line (unlikely, if straight line. Near people would block far people, who are 'smaller' on the retinal scale).
Big voice, little voice. Plus it would be friggin hilarious to overhear. Blue Blue Blue Red Blue