Created
January 13, 2019 13:18
-
-
Save kodo-pp/1d83ea80e092317849276a006ee95edf to your computer and use it in GitHub Desktop.
Some macros for debugging (olympiad programming)
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
#ifdef AAA | |
#define db(x) \ | |
std::cerr << "\x1b[1;35m[DEBUG] " << __LINE__ << "\t|\x1b[0;34m " \ | |
#x "\x1b[0m = \x1b[32m" << (x) << "\x1b[0m" << std::endl | |
#define dbx(x) \ | |
std::cerr << "\x1b[1;35m[DEBUG] " << __LINE__ << "\t| \x1b[0;34m " \ | |
#x "\x1b[0m = \x1b[32m" << (x) << "\x1b[0m" << std::endl | |
#define dbs(s) \ | |
std::cerr << "\x1b[1;35m[DEBUG] " << __LINE__ << "\t| \x1b[0;34m " \ | |
<< s << "\x1b[0m" << std::endl | |
#define dbsx(s) \ | |
std::cerr << "\x1b[1;35m[DEBUG] " << __LINE__ << "\t| \x1b[0;34m " \ | |
<< s << "\x1b[0m" << std::endl | |
#else | |
#define db(x) | |
#define dbx(x) | |
#define dbs(s) | |
#define dbsx(s) | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment