-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathError.h
More file actions
28 lines (21 loc) · 779 Bytes
/
Copy pathError.h
File metadata and controls
28 lines (21 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <cstdio>
#include <iostream>
#include <cassert>
#include <cstdint>
#include <vector>
#define default_file() freopen("C:\\Users\\DUC ANH\\Downloads\\Gen\\default\\input.in", "r", stdin); freopen("C:\\Users\\DUC ANH\\Downloads\\Gen\\default\\output.out", "w", stdout);
template<class... T> void debug(T&&... t){
int x = sizeof...(t);
((std::cout << t << (--x ? ", " : "]\n")), ...);
}
bool debug_flag = false;
bool error_flag = true;
#define dbg(...) std::cout << "LINE(" << __LINE__ << ") : [" << #__VA_ARGS__ << "] = [", debug(__VA_ARGS__)
#define ifdbg if(debug_flag)
template<class T>
void mes_error(T&& t){
if(!error_flag)
return;
std::cout << "Not satisfy the condition: " << t;
assert(false);
}