From 58535bb3873aef50838592d0afb54409cdd5c6a0 Mon Sep 17 00:00:00 2001 From: Ariel Date: Tue, 16 Jan 2024 19:01:25 +0800 Subject: [PATCH] Update include.hh --- include.hh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include.hh b/include.hh index f9c51e8..c988056 100644 --- a/include.hh +++ b/include.hh @@ -38,6 +38,9 @@ constexpr ull MDL2 = 87825; #define msp(x) (63LL - __builtin_clzll(ll(x))) #define lsp(x) (__builtin_ctzll(ll(x))) +/* arithmetic operations */ +#define mod(x, y) (((x) + (y)) % (y)) + /* fast pairs */ #define upair ull #define umake(x, y) (ull(x) << 32 | ull(y))