8th July 2026

woke up at 6, felt sleepy and sad but i wont let it stop me, checked my dms and as usual no imp msges except my hoeass homies sending reels, so i started my day with 1915F its easy problem but uses DS that i didnt know about, "set.order_of_key" and "set.find_by_order" are the two functions that i didnt know about, they are used to find the k-th smallest element in a set and to find the number of elements in a set that are strictly smaller than a given value. here s is ordered_set. for order_of_key.
order_of_key
it returns the number of elements in a set that are strictly smaller than the number passed in the function.
find_by_order does the same but it returns an iterator to the ith largest number. to imply order_of_key you have to first declare typedef tree, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
for ordered_set.

follow my everyday blogs, youre going to witness my life ramming and unfolding infront of your eyes!!

© 2026 My Simple Blog