This file contains hidden or 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
| #include <iostream> | |
| #include <array> | |
| #include <algorithm> | |
| using std::array, std::max, std::cout, std::endl; | |
| template<class T, size_t Col, size_t Row> | |
| void optimization(array<array<T, Col>, Row> m) | |
| { | |
| array<array<T, Col>, Row> c{}; |
This file contains hidden or 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
| #pragma once | |
| using KeyType = int; | |
| using ValueType = int; | |
| struct Node | |
| { | |
| KeyType Key; | |
| ValueType Value; | |
| }; |
This file contains hidden or 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
| #pragma once | |
| #include <iostream> | |
| #include <string> | |
| #include <functional> | |
| enum class Color { RED, BLACK }; | |
| using DataType = int; | |
| struct RBTNode | |
| { | |
| RBTNode* parent = nullptr; |
This file contains hidden or 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
| #include <ostream> | |
| #include <chrono> | |
| std::ostream& operator<<(std::ostream& os, std::chrono::seconds seconds) | |
| { | |
| return os << seconds.count() << " s"; | |
| } | |
| std::ostream& operator<<(std::ostream& os, std::chrono::milliseconds milliseconds) | |
| { |