The Counter and the Flag

100 100 researchers are quarantined in separate wings of a facility with no way to contact one another. Each day the warden escorts one uniformly random researcher (chosen independently each day) into a courtyard containing a single signal flag, initially lowered; the visitor may raise it, lower it, or leave it alone, and nobody else can see it. At any time, any researcher may declare that all 100 100 have visited the courtyard: a correct declaration releases everyone, an incorrect one condemns them all. They may strategize only before the first visit. What strategy guarantees eventual release?

Answer

Free accounts unlock one worked solution a day. Pro includes every answer.