#include #include #include #include #include #include #include #include #include #include #include #include #define vll vector #define vvvl vector #define vvl vector> #define VV(a, b, c, d) vector>(a, vector(b, c)) #define VVV(a, b, c, d) vector(a, vvl(b, vll (c, d))); #define re(c, b) for(ll c=0;c> n >> m; ll x = (n/1000)%m;//何枚余るか //mCx ll P = 1000000000; vll prev(x+1, 0); vll now(x+1, 0); prev[0] = 1; //std::cout << x << '\n'; for(ll i=0;i