What is algo/debug.h?

Revision en1, by Roufie, 2022-08-15 12:01:52

Hi,

I'm new to Codeforces and have been looking code into submissions by others. I'm new to C++ as well and can't find any articles on what these snippets of code do. Can someone please explain?

I understand that the code in If block gets executed when LOCAL is set. But what does the code actually do? What is alog/debug.g? What is debug(...) 42 meant for?

#ifdef LOCAL
#include "algo/debug.h"
#else
#define debug(...) 42
#endif

Source: https://codeforces.com/contest/1712/submission/168158904

#ifdef LOCAL
	#define eprintf(...) {fprintf(stderr, __VA_ARGS__);fflush(stderr);}
#else
	#define eprintf(...) 42
#endif

Source: https://codeforces.com/contest/1716/submission/166973182

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Roufie 2022-08-15 12:01:52 778 Initial revision (published)