/* tricks.h v 2.0; Michal Szabados */

#ifndef TRICKS_H_DEFINED_6514694263254367
#define TRICKS_H_DEFINED_6514694263254367

#define FOR(i, a, b) for(__typeof(a) i = (a); i < (b); i++)
#define FOREACH(it, a) for(__typeof(a.begin()) it = a.begin(); it != a.end(); it++)

#ifdef DEBUG
	#undef DEBUG
	#define DEBUG(x) x
	
	#include <iostream>
	using namespace std;
	
	#define ETRACE(a) {cout << #a << " = " << a << endl;}
	#define EPTRACE(a, n) {cout << #a << " = "; FOR(_icko, 0, n) cout << a[_icko] << " "; cout << endl;}
#else
	#define DEBUG(x)
#endif

#define TRACE(a) DEBUG(ETRACE(a))
#define PTRACE(a, n) DEBUG(EPTRACE(a, n))

#endif

