why is my greedy choice wrong? CSES 1084 — Apartments

Правка en1, от obocheton, 2020-06-19 15:22:42

I was trying this problem CSES 1084.

I greedily choose the lowest sized valid apartment for every applicant (sorted both lists ascendingly).

But it turns out to be a wrong approach.

Why my approach is wrong?

Теги cses


  Rev. Язык Кто Когда Δ Комментарий
en1 Английский obocheton 2020-06-19 15:22:42 338 Initial revision (published)