Created
June 10, 2021 13:19
-
-
Save maskmanlucifer/b0faa3f4a9672b3fe7a589437f1b5e6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> PBDS (Policy based Data Structure) | |
>>> Resources : | |
1. https://codeforces.com/blog/entry/11080 (Sufficient) | |
2. https://www.geeksforgeeks.org/ordered-set-gnu-c-pbds/ | |
>>> Implementation | |
#include <ext/pb_ds/assoc_container.hpp> | |
#include <ext/pb_ds/tree_policy.hpp> | |
using namespace __gnu_pbds; | |
#define o_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update> | |
>>> Operations | |
st.order_of_key(x); // number of elements strictly less than x; | |
*st.find_by_order(k); // kth largest element count from 0. | |
>>> Problems: | |
Problem-1 : https://codeforces.com/contest/1042/problem/D | |
Problem-2 : https://csacademy.com/contest/round-75/task/race-cars/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment