Answer the question
In order to leave comments, you need to log in
What libraries, built-in functions and containers can be used in Olympiad programming?
I write in C++. I already use the vector, set, map, queue libraries. From algorithm I use sort, nth_element.
What other "chips" are there that help in the Olympiad programming, besides these? Maybe the containers are already implemented like a Cartesian tree, or built-in parsing ... what I don't know yet? )))
Answer the question
In order to leave comments, you need to log in
I will answer as one of the participants of the Olympiad Programming.
In general, there are many nuances. Libraries that I need the most and that I use:
#include <algorithm>
#include <iostream>
#include <memory.h>
#include <iterator>
#include <cassert>
#include <fstream>
#include <cstdlib>
#include <vector>
#include <cstdio>
#include <string>
#include <queue>
#include <deque>
#include <cmath>
#include <ctime>
#include <stack>
#include <set>
#include <map>
#include <bits/stdc++.h>
. there are old compilers (ver < 5.0) that don't include it, but it's worth keeping in mind. This library includes everything described above and even more! Of the containers there are: queue <TYPENAME>
- Queue ( More ) Able to recognize the first element of the queue, add to the end, remove from the beginning for O (1). deque <TYPENAME>
- Modification of the queue ( More details ( cppstudio.com/post/8469 )) The same, but it can add and remove from both ends. stack <TYPENAME>
- Container. ( More ) Able to add an element to the beginning and get it from the beginning. priority_queue <TYPENAME>
- Modification of the queue (I did not find a suitable description). Like set, only sorts the elements in ascending order.
It is so useful to know everything that is in the standard library. Open www.cplusplus.com/reference/stl and watch all containers, algorithms, etc. At least even just superficially, what it is and what properties it has. Someday pops up in my head at the right time.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question