$P(A_n\space\text{i.o.})=0$ or $1$ according as $\sum_{n\geq 1}(1-F(\lambda_n))<\infty$ or $=\infty$ 
$X_1,X_2,\dots$ are i.i.d. with distribution function $F$, let $\lambda_n\uparrow \infty$, and let $A_n=\{\max_{1\leq m\leq n}X_m>\lambda_n\}$. Show that $P(A_n\space\text{i.o.})=0$ or $1$ according as $\sum_{n\geq 1}(1-F(\lambda_n))<\infty$ or $=\infty$

Since $\sum_{n\geq 1}(1-F(\lambda_n))=\sum_{n\geq 1}P(X_n>\lambda_n)<\infty$ or $=\infty$, I can get $P(X_n>\lambda_n\space\text{i.o.})=0$ or $1$ accordingly. But I don't know what to do next. Any help appreciated.

Thanks to @DiegoFonseca, I understood that $A_n=\bigcup_{m=1}^{n}\left\{\omega |X_{m}(\omega)>\lambda_{n}\right\}$. I missed this part. But I could not get why $"<\infty"$ part is true?
 A: 
Claim: Let $(a_n)_{n \in \mathbb{N}} \subseteq \mathbb{R}$ and $(\lambda_n)_{n \in \mathbb{N}} \subseteq (0,\infty)$ such that $\lambda_n \uparrow \infty$. Then the following statements are equivalent:

*

*$a_n>\lambda_n$ for infinitely many $n \in \mathbb{N}$

*$\max_{1 \leq j \leq n} a_j > \lambda_n$ for infinitely many $n \in \mathbb{N}$.


Once we have proved the result, we find that $$\left\{ \max_{1 \leq j \leq n} X_j > \lambda_n \, \, \text{i.o.}\right\} = \{X_n>\lambda_n \, \, \text{i.o.}\},$$ and the assertion follows from the considerations in your question.
Proof of the claim: Since
$$\max_{1 \leq j \leq n} a_j \geq a_n$$
it is clear that the first statement implies the second one. Now assume that
$$\max_{1 \leq j \leq n} a_j > \lambda_n \tag{1}$$
for infinitely many $n \in I \subseteq \mathbb{N}$. For $n \in I$ define
$$r_n := \min\{1 \leq j \leq n; a_j> \lambda_n\}.$$
(Because of $(1)$ there has to exist at least one such $j \in \{1,\ldots,n\}$!) Since $\lambda_n$ is increasing and $r_n \leq n$, we then have
$$a_{r_n} > \lambda_n \geq \lambda_{r_n}$$
for all $n \in I$. This finishes the proof.
