Skip to content

Practice and resources for competitions like USACO and Codeforces. Includes code for USACO competitions Jan 2022 - Mar 2022

Notifications You must be signed in to change notification settings

clay-arras/cp-practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adapted from this blog: https://codeforces.com/blog/entry/68809

How to use debug.h

Place the file in /usr/local/include for Mac For Windows or Linux, put it wherever you have bits/stdc++.h located

Put #include<debug.h> at the top of your cpp file

Usage:

vector<int> a = {1, 3, 5};
debug(a)

// prints a = {1, 3, 5} to cerr

For online judges, you can use:

#ifndef ONLINE_JUDGE
#include<debug.h>
#else
#define debug(...)
#endif

Otherwise, replace the first line with #ifdef VAR where you define VAR with -D VAR

About

Practice and resources for competitions like USACO and Codeforces. Includes code for USACO competitions Jan 2022 - Mar 2022

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published