why is my greedy choice wrong? CSES 1084 — Apartments

Revision en1, by 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?

Tags cses

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English obocheton 2020-06-19 15:22:42 338 Initial revision (published)