QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#718410#5. 在线 O(1) 逆元GuanYunchangCompile Error//C++17204b2024-11-06 20:26:052024-11-06 20:26:06

Details

implementer.cpp: In function ‘int main()’:
implementer.cpp:22:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   22 |         scanf("%d", &n);
      |         ~~~~~^~~~~~~~~~
answer.code: In function ‘void init(int)’:
answer.code:8:23: error: ‘P’ was not declared in this scope
    8 |         f[i] = 1ll * (P - (P / i)) * f[p % i] % P;
      |                       ^
answer.code: In function ‘int inv(int)’:
answer.code:13:17: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   13 |     return inv[x];
      |                 ^
answer.code:13:17: error: invalid conversion from ‘int (*)(int)’ to ‘int’ [-fpermissive]
   13 |     return inv[x];
      |                 ^
      |                 |
      |                 int (*)(int)