Solution (source code)

= Solution

The <Kolmogorov-Smirnov theorem> states that, for continuous $F$,
$$
\sqrt n\sup_x|\widehat F_n(x)-F(x)|
\xrightarrow{d}\sup_{0\leq t\leq1}|B(t)|,
$$
where $B$ is a <Brownian bridge>; the finite-sample law is also independent of continuous $F$. To test $H_0:F=F_0$, compute
$$
D_n=\sup_x|\widehat F_n(x)-F_0(x)|
$$
and reject when $\sqrt nD_n$ exceeds the appropriate null quantile.