fork(26) download
  1. #include <cstdlib>
  2. #include <iostream>
  3. #include <vector>
  4. #include <cstring>
  5. #include <cassert>
  6. #include <cstdio>
  7. #include <algorithm>
  8. using namespace std;
  9.  
  10. typedef long long ll;
  11.  
  12. #include <ext/pb_ds/assoc_container.hpp>
  13. #include <ext/pb_ds/tree_policy.hpp>
  14.  
  15. using namespace __gnu_pbds;
  16.  
  17. typedef tree<
  18. double,
  19. int,
  20. less<double>,
  21. rb_tree_tag,
  22. tree_order_statistics_node_update> map_t;
  23.  
  24. int main() {
  25.  
  26.  
  27. map_t s;
  28. s.insert(make_pair(12, 1012));
  29. s.insert(make_pair(505, 1505));
  30. s.insert(make_pair(30, 1030));
  31.  
  32. cout << s.find_by_order(1)->second << '\n';
  33. return 0;
  34.  
  35. }
Success #stdin #stdout 0s 3480KB
stdin
Standard input is empty
stdout
1030