Advertisement
Tainel

src/base/features/integers.hpp

May 21st, 2023 (edited)
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.62 KB | Source Code | 0 0
  1. #pragma once
  2.  
  3. // Integer type aliases.
  4. using s128=__int128;
  5. using s32=int;
  6. using s64=long long;
  7. using u128=unsigned __int128;
  8. using u32=unsigned;
  9. using u64=unsigned long long;
  10.  
  11. // Casts to integer types.
  12. #define S128 static_cast<s128>
  13. #define S32 static_cast<s32>
  14. #define S64 static_cast<s64>
  15. #define U128 static_cast<u128>
  16. #define U32 static_cast<u32>
  17. #define U64 static_cast<u64>
  18.  
  19. // Prime constant commonly used for modulo operations.
  20. constexpr s32 mod=998'244'353;
  21.  
  22. // Large 32-bit and 64-bit prime constants respectively.
  23. constexpr s32 inf32=1'000'000'007;
  24. constexpr s64 inf64=1'000'000'000'000'000'003;
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement