From 82db0d11786b2d265a380dce09be218e1e5123db Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Wed, 9 Oct 2024 12:36:38 +0800 Subject: [PATCH] update --- src/P2822/P2822_prefix.cpp | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/src/P2822/P2822_prefix.cpp b/src/P2822/P2822_prefix.cpp index fee7f56..0d791d5 100644 --- a/src/P2822/P2822_prefix.cpp +++ b/src/P2822/P2822_prefix.cpp @@ -1,11 +1,19 @@ +#define NDEBUG #include #include #include #include +#define NV(v)#v<<" : "<<(v) +#ifdef NDEBUG + #define DEBUG(code) +#else + #define DEBUG(code){code} +#endif using ull = unsigned long long; static const size_t max_n {(size_t)2e3+5}; +// static const size_t max_n {(size_t)10}; static ull k, c[max_n][max_n], prefix[max_n][max_n], t, n, m; static void init(){ @@ -16,16 +24,32 @@ static void init(){ c[i][j] = (c[i-1][j-1] + c[i-1][j])%k; } } + DEBUG( + for(ull i{0};i struct ReadNumber{ ReadNumber& operator>>(T &num){