Need Help with tricky problem

Revision en2, by pabloskimg, 2019-10-25 08:38:37

Hi, I'm trying to solve this problem. The brute force approach is factorial so it evidently won't work. I've got a feeling that there must be a greedy strategy to solve it, but I haven't been able to figure it out just yet. Any help will be appreciated.

Thank you very much!

Tags #acmicpc2018, latin america regional

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en6 English pabloskimg 2019-10-26 19:54:15 3 Tiny change: 's could share some ligh' -> 's could shed some ligh'
en5 English pabloskimg 2019-10-26 07:59:47 2 Tiny change: 'inds here in Codeforc' -> 'inds here on Codeforc'
en4 English pabloskimg 2019-10-26 07:58:47 105
en3 English pabloskimg 2019-10-26 07:56:26 472
en2 English pabloskimg 2019-10-25 08:38:37 17
en1 English pabloskimg 2019-10-24 19:34:31 354 Initial revision (published)