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){