Is there a simple data structure (like std::set) that allows querying on 2 parameters? (one for max/min query and the order for constraints)

Правка en2, от duckladydinh, 2018-06-09 01:48:07

[Updated] Hello everyone,

do you know if there is any data structure (like std::set) that allows querying on 2 parameters and adding elements? The use case is I have a many lists of (a[i], b[i]). I want perform a query with parameter MAXB that returns the pair with the maximum value by a[i] but the corresponding b[i] value is less than or equal to MAXB. I can also perform an update by adding a pair to any list.

Do you know any? Thank you.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский duckladydinh 2018-06-09 01:49:09 12 Tiny change: 'o MAXB. I can also perform ' -> 'o MAXB. I also want to perform '
en3 Английский duckladydinh 2018-06-09 01:48:38 18
en2 Английский duckladydinh 2018-06-09 01:48:07 96
en1 Английский duckladydinh 2018-06-09 01:12:51 495 Initial revision (published)