[BIT/Fenwick Tree] SPOJ ADACABAA — Ada and Species

Revision en2, by Tobby_And_Friends, 2017-11-05 17:52:53

Problem link: http://www.spoj.com/problems/ADACABAA/

If there were only only 2 attributes of the vegetables I would have been able to solve the problem. I would have simply sorted in descending order the vegetables according to it's first attribute. And as for the second attribute I could have easily found the answer using a BIT/Fenwick tree. But I am not able to figure how to solve this problem with 4 attributes of the vegetables. Any help is really appreciated.

Tags #data structure, spoj

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Tobby_And_Friends 2017-11-05 17:52:53 7 Tiny change: 'IT/Fenwick. But I am' -> 'IT/Fenwick tree. But I am'
en1 English Tobby_And_Friends 2017-11-05 17:52:23 515 Initial revision (published)