config.hpp 632 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef CONFIG_HPP
  2. #define CONFIG_HPP
  3. #include <iostream>
  4. using namespace std;
  5. //! Maximal self avoiding polygon length to consider
  6. static const size_t max_len=20; // Must be less or equal tin [6,38]
  7. typedef double Reel;
  8. typedef __int128 Int;
  9. typedef int64_t int64;
  10. ostream& operator<<(ostream& os,const Int& x);
  11. //********************
  12. //* Inline functions *
  13. //********************
  14. inline ostream&
  15. operator<<(ostream& os,const __int128& x){
  16. if(x==0) return os<<"0";
  17. string str;
  18. __int128 ax=(x<0)?-x:x;
  19. while(ax!=0){
  20. str=to_string((int)ax%10)+str;
  21. ax=ax/10;
  22. }
  23. if(x<0) os<<'-';
  24. return os<<str;
  25. }
  26. #endif