Vrijeme: 09:09

Muke zavodnika PMF-a | The struggles of the PMF seducer #3

Salopekova djevojka nije bila oduševljena načinom na koji Salopek sklapa nova prijateljstva pa se prišuljala u niz u stala na neko nasumično mjesto. Nakon što je vidio da je jedna nova osoba kriomice ušla u niz, shvatio je da, bez obzira na njihov raspored, može pronaći podniz od njih k takav da su djevojke tog podniza poredane po visini, bilo uzlazno ili silazno. Salopek ne voli lagati, ali naravno da će maksimizirati odabir svog k tako da ispadne glavni među brucošicama. Koliki k mu je na umu?
Salopek's girlfriend wasn't thrilled with the way Salopek was making new friends, so she sneaked into the line and stood in a random spot. After seeing that one new person had secretly entered the line, he realized that, regardless of their arrangement, he could find a subsequence of length k where the girls in that subsequence are arranged by height, either in increasing or decreasing order. Salopek doesn't like to lie, but of course, he'll maximize his choice of k to appear as the leader among the freshmen girls. What k does he have in mind?