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
#include <cstdio> | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <mutex> | |
#include <thread> | |
#include <chrono> | |
using namespace std; | |
using namespace std::chrono_literals; |
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
#include <iostream> | |
#include <type_traits> | |
#define LAZY_ARG(e) [&]() { return e; } | |
using namespace std; | |
// Implementation that requires C++17 support. | |
template <typename ... Args> | |
void print_17(Args&& ... args) | |
{ |
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
// Example from: C++17-The Complete Guide, by Nicolai M. Josuttis | |
// Chapter 10. Compile-Time if | |
// http://www.cppstd17.com/ | |
#include <string> | |
#include <iostream> | |
template <typename T> | |
std::string toString_constexpr_if(T x) | |
{ |
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
/* | |
* ===================================================================================== | |
* | |
* Filename: prvalue.cpp | |
* | |
* Description: test prvalue | |
* | |
* Version: 1.0 | |
* Created: 2018/06/26 (yyyy/mm/dd) | |
* Revision: none |
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
/* | |
* =========================================================================================== | |
* | |
* Filename: quick_select.cpp | |
* | |
* Description: Find the kth element from a unsorted sequence with quick select algorithm. | |
* | |
* Version: 1.0 | |
* Created: 2018/05/04 (yyyy/mm/dd) | |
* Revision: none |
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
/* | |
* ===================================================================================== | |
* | |
* Filename: find_median.cpp | |
* | |
* Description: Find the median from an unsorted data | |
* | |
* Version: 1.0 | |
* Created: 2018/05/04 (yyyy/mm/dd) | |
* Revision: none |
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
/* | |
* ===================================================================================== | |
* | |
* Filename: 946B.cpp | |
* | |
* Description: codeforces 946B: Weird Substraction Process | |
* | |
* Version: 1.0 | |
* Created: 2018/03/19 (yyyy/mm/dd) | |
* Revision: none |
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
/* | |
* ===================================================================================== | |
* | |
* Filename: 166C.cpp | |
* | |
* Description: codeforces 166C: Median | |
* | |
* Version: 1.0 | |
* Created: 2018/03/19 (yyyy/mm/dd) | |
* Revision: none |
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
/* | |
* ===================================================================================== | |
* | |
* Filename: Heavy_Light_Decomposition.cpp | |
* | |
* Description: Implementation of heavy light decomposition | |
* | |
* Version: 1.0 | |
* Created: 2018/03/18 (yyyy/mm/dd) | |
* Revision: none |
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
/* | |
* ===================================================================================== | |
* | |
* Filename: LCA.cpp | |
* | |
* Description: Find the lowest common ancestor (LCA) of two nodes in a tree | |
* | |
* Version: 1.0 | |
* Created: 2018/02/24 (yyyy/mm/dd) | |
* Revision: none |