QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#411479#6736. Alice and BobMaMengQiCompile Error//C++201009b2024-05-15 14:50:042024-05-15 14:50:05

Details

answer.code:2:1: error: ‘i64’ does not name a type
    2 | i64 *fac, *ifac;
      | ^~~
answer.code:4:1: error: ‘i64’ does not name a type
    4 | i64 power(i64 a, i64 b, int p = P) {
      | ^~~
answer.code:14:1: error: ‘i64’ does not name a type
   14 | i64 inv(i64 x) {
      | ^~~
answer.code: In function ‘void init(int)’:
answer.code:19:5: error: ‘fac’ was not declared in this scope
   19 |     fac = new i64 [N + 1];
      |     ^~~
answer.code:19:15: error: ‘i64’ does not name a type
   19 |     fac = new i64 [N + 1];
      |               ^~~
answer.code:20:5: error: ‘ifac’ was not declared in this scope
   20 |     ifac = new i64 [N + 1];
      |     ^~~~
answer.code:20:16: error: ‘i64’ does not name a type
   20 |     ifac = new i64 [N + 1];
      |                ^~~
answer.code:25:15: error: ‘inv’ was not declared in this scope; did you mean ‘int’?
   25 |     ifac[N] = inv(fac[N]);
      |               ^~~
      |               int
answer.code: At global scope:
answer.code:31:1: error: ‘i64’ does not name a type
   31 | i64 C(int n, int m) {
      | ^~~
answer.code: In function ‘int main()’:
answer.code:39:5: error: ‘ios’ has not been declared
   39 |     ios::sync_with_stdio(false);
      |     ^~~
answer.code:40:5: error: ‘cin’ was not declared in this scope
   40 |     cin.tie(nullptr);
      |     ^~~
answer.code:46:5: error: ‘i64’ was not declared in this scope
   46 |     i64 ans = 0;
      |     ^~~
answer.code:48:9: error: ‘ans’ was not declared in this scope
   48 |         ans = (ans + C(n - i, i - 1) * fac[n - i] % P * fac[i - 1] % P) % P;
      |         ^~~
answer.code:48:22: error: ‘C’ was not declared in this scope
   48 |         ans = (ans + C(n - i, i - 1) * fac[n - i] % P * fac[i - 1] % P) % P;
      |                      ^
answer.code:48:40: error: ‘fac’ was not declared in this scope
   48 |         ans = (ans + C(n - i, i - 1) * fac[n - i] % P * fac[i - 1] % P) % P;
      |                                        ^~~
answer.code:50:5: error: ‘cout’ was not declared in this scope
   50 |     cout << ans << '\n';
      |     ^~~~
answer.code:50:13: error: ‘ans’ was not declared in this scope
   50 |     cout << ans << '\n';
      |             ^~~