0_0_35267373_2343.cpp:17:15: error: need 'typename' before 'std::decay<decltype (MOD)>::type' because 'std::decay<decltype (MOD)>' is a dependent scope
using T = decay<decltype(MOD)>::type; T v;
^
0_0_35267373_2343.cpp:17:43: error: 'T' does not name a type
using T = decay<decltype(MOD)>::type; T v;
^
0_0_35267373_2343.cpp:19:37: error: 'enable_if_t' does not name a type
template<typename U, typename = enable_if_t<is_integral<U>::value>>
^
0_0_35267373_2343.cpp:19:48: error: expected '>' before '<' token
template<typename U, typename = enable_if_t<is_integral<U>::value>>
^
0_0_35267373_2343.cpp:21:37: error: 'enable_if_t' does not name a type
template<typename U, typename = enable_if_t<is_integral<U>::value>>
^
0_0_35267373_2343.cpp:21:48: error: expected '>' before '<' token
template<typename U, typename = enable_if_t<is_integral<U>::value>>
^
0_0_35267373_2343.cpp:26:12: error: 'T' does not name a type
static T inv(T a, T m) {
^
0_0_35267373_2343.cpp: In constructor 'Modint<MOD>::Modint()':
0_0_35267373_2343.cpp:18:15: error: class 'Modint<MOD>' does not have any field named 'v'
Modint(): v(0) {}
^
0_0_35267373_2343.cpp: In constructor 'Modint<MOD>::Modint(U)':
0_0_35267373_2343.cpp:20:93: error: 'T' does not name a type
Modint(U v) { if(v < 0) v = v % MOD + MOD; if(v >= MOD) v %= MOD; this->v = static_cast<T>(v); }
^
0_0_35267373_2343.cpp: In member function 'Modint<MOD>::operator U() const':
0_0_35267373_2343.cpp:22:57: error: 'v' was not declared in this scope
explicit operator U() const { return static_cast<U>(v); }
^
0_0_35267373_2343.cpp: In static member function 'static unsigned int Modint<MOD>::fast_mod(uint64_t, unsigned int)':
0_0_35267373_2343.cpp:40:25: error: expected ')' before ':' token
asm("divl %4\n" : "=a" (quot), "=d" (rem) : "d" (x_high), "a" (x_low), "r" (m));
^
0_0_35267373_2343.cpp:40:49: error: expression cannot be used as a function
asm("divl %4\n" : "=a" (quot), "=d" (rem) : "d" (x_high), "a" (x_low), "r" (m));
^
0_0_35267373_2343.cpp:40:77: error: expression cannot be used as a function
asm("divl %4\n" : "=a" (quot), "=d" (rem) : "d" (x_high), "a" (x_low), "r" (m));
^
0_0_35267373_2343.cpp:40:86: error: expression cannot be used as a function
asm("divl %4\n" : "=a" (quot), "=d" (rem) : "d" (x_high), "a" (x_low), "r" (m));
^
0_0_35267373_2343.cpp:40:87: error: there are no arguments to 'asm' that depend on a template parameter, so a declaration of 'asm' must be available [-fpermissive]
asm("divl %4\n" : "=a" (quot), "=d" (rem) : "d" (x_high), "a" (x_low), "r" (m));
^
0_0_35267373_2343.cpp:40:87: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
0_0_35267373_2343.cpp: In member function 'Modint<MOD> Modint<MOD>::inv() const':
0_0_35267373_2343.cpp:44:44: error: 'v' was not declared in this scope
Modint inv() const { return Modint(inv(v, MOD)); }
^
0_0_35267373_2343.cpp: In member function 'Modint<MOD> Modint<MOD>::operator-() const':
0_0_35267373_2343.cpp:45:46: error: 'v' was not declared in this scope
Modint operator-() const { return Modint(v? MOD-v : 0); }
^
0_0_35267373_2343.cpp: In member function 'Modint<MOD>& Modint<MOD>::operator++()':
0_0_35267373_2343.cpp:46:28: error: 'v' was not declared in this scope
Modint& operator++() { v++; if(v == MOD) v = 0; return *this; }
^
0_0_35267373_2343.cpp: In member function 'Modint<MOD>& Modint<MOD>::operator--()':
0_0_35267373_2343.cpp:47:31: error: 'v' was not declared in this scope
Modint& operator--() { if(v == 0) v = MOD; v--; return *this; }
^
0_0_35267373_2343.cpp:47:48: error: 'v' was not declared in this scope
Modint& operator--() { if(v == 0) v = MOD; v--; return *this; }
^
0_0_35267373_2343.cpp: In member function 'Modint<MOD>& Modint<MOD>::operator+=(const Modint<MOD>&)':
0_0_35267373_2343.cpp:50:43: error: 'v' was not declared in this scope
Modint& operator+=(const Modint& o) { v += o.v; if (v >= MOD) v -= MOD; return *this; }
^
0_0_35267373_2343.cpp: In member function 'Modint<MOD>& Modint<MOD>::operator-=(const Modint<MOD>&)':
0_0_35267373_2343.cpp:51:43: error: 'v' was not declared in this scope
Modint& operator-=(const Modint& o) { v -= o.v; if (v < 0) v += MOD; return *this; }
^
0_0_35267373_2343.cpp: In member function 'Modint<MOD>& Modint<MOD>::operator*=(const Modint<MOD>&)':
0_0_35267373_2343.cpp:52:43: error: 'v' was not declared in this scope
Modint& operator*=(const Modint& o) { v = fast_mod(uint64_t(v) * o.v); return *this; }
^
0_0_35267373_2343.cpp: At global scope:
0_0_35267373_2343.cpp:75:24: error: 'MOD' is not a valid template argument for type 'const int&' because object 'MOD' has not external linkage
using mint = Modint<MOD>;
^
0_0_35267373_2343.cpp: In function 'int main()':
0_0_35267373_2343.cpp:83:19: error: 'mint' was not declared in this scope
static vector<mint> fact{1, 1}, factinv{1, 1}, inv{0, 1};
^
0_0_35267373_2343.cpp:83:23: error: template argument 1 is invalid
static vector<mint> fact{1, 1}, factinv{1, 1}, inv{0, 1};
^
0_0_35267373_2343.cpp:83:23: error: template argument 2 is invalid
0_0_35267373_2343.cpp:83:29: error: invalid type in declaration before '{' token
static vector<mint> fact{1, 1}, factinv{1, 1}, inv{0, 1};
^
0_0_35267373_2343.cpp:83:34: error: scalar object 'fact' requires one element in initializer
static vector<mint> fact{1, 1}, factinv{1, 1}, inv{0, 1};
^
0_0_35267373_2343.cpp:83:49: error: scalar object 'factinv' requires one element in initializer
static vector<mint> fact{1, 1}, factinv{1, 1}, inv{0, 1};
^
0_0_35267373_2343.cpp:83:60: error: scalar object 'inv' requires one element in initializer
static vector<mint> fact{1, 1}, factinv{1, 1}, inv{0, 1};
^
0_0_35267373_2343.cpp:99:14: error: expected ';' before 'ans'
mint ans;
^
0_0_35267373_2343.cpp:102:13: error: 'ans' was not declared in this scope
ans += (i&1? -1 : 1) * nCr(n, i) * nCr(n-1 + k-i*m, n-1);
^
0_0_35267373_2343.cpp:102:44: error: invalid operands of types 'int' and 'void' to binary 'operator*'
ans += (i&1? -1 : 1) * nCr(n, i) * nCr(n-1 + k-i*m, n-1);
^
0_0_35267373_2343.cpp:103:19: error: 'ans' was not declared in this scope
} cout << ans << '\n';
^
|