Advertisement
sleepy_coder

C++ contest template

Aug 13th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.87 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. using ll = long long;
  5. using pii = pair<int, int>;
  6.  
  7. #define     endl               "\n"
  8. #define     fast_io            ios::sync_with_stdio(false); cin.tie(0);
  9. #define     file_io            freopen("input.txt", "r", stdin);   \
  10.                                freopen("output.txt", "w", stdout);
  11. #define     _unique(c)         (c).resize(unique(begin(c), end(c)) - (c).begin());
  12. #define     debug(x)           cerr <<"Line "<< __LINE__ <<" : "<< #x " = "<< x <<endl;
  13.  
  14. template<typename T, typename TT>
  15. ostream& operator<<(ostream &os, const pair<T, TT> &t) { return os<<"("<<t.first<<", "<<t.second<<")"; }
  16. template<typename T>
  17. ostream& operator<<(ostream& os, const vector<T> &t) { for(auto& i: t) os<<i<<" "; return os; }
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24. int main(int argc, char** argv) {
  25.     fast_io
  26. #ifdef LOCAL
  27.     file_io
  28. #endif
  29.    
  30.    
  31.  
  32.  
  33.     return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement