Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
bitmap with pairs
//bimap operations #include <iostream> #include <boost/bimap.hpp> #include <boost/bimap/set_of.hpp> #include <boost/bimap/multiset_of.hpp> #include <utility> using namespace std; int main() { typedef std::pair<int, int> intpair_t; typedef boost::bimap<boost::bimaps::multiset_of<intpair_t>, boost::bimaps::set_of<intpair_t> > bimap_t; //typedef bimap_t::value_type value_type; bimap_t bimap; bimap.insert({make_pair(1,1), make_pair(1,1)}); bimap.insert({make_pair(1,1), make_pair(2,2)}); std::cout << "RIGHT" << std::endl; std::pair<int, int> testPair = bimap.right.at(std::make_pair(2,2)); std::cout << "Key = " << 1 << " Value = " << testPair.first << std::endl; for(auto it : bimap) { std::cout << it.right.first << endl; } }
run
|
edit
|
history
|
help
0
multiply two numbers (previous)
string iteration performance
Find value in sorted matrix
find parent count of node in graph
fastest input taking for large files
Zahra_matrix
bharat
HW0
30 აპრილი
Let's Go!