QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#718399 | #5. 在线 O(1) 逆元 | MaMengQi | Compile Error | / | / | C++17 | 226b | 2024-11-06 20:24:58 | 2024-11-06 20:24:59 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
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:4:10: error: ‘int inv [100000003]’ redeclared as different kind of entity 4 | int inv[N]; | ^ In file included from answer.code:1: inv.h:2:5: note: previous declaration ‘int inv(int)’ 2 | int inv(int n); | ^~~ answer.code: In function ‘void init(int)’: answer.code:7:10: warning: pointer to a function used in arithmetic [-Wpointer-arith] 7 | inv[0] = 1; | ^ answer.code:7:12: error: assignment of read-only location ‘* inv’ 7 | inv[0] = 1; | ~~~~~~~^~~ answer.code:9:14: warning: pointer to a function used in arithmetic [-Wpointer-arith] 9 | inv[i] = 1ll * (P - (P / i)) * inv[p % i] % P; | ^ answer.code:9:25: error: ‘P’ was not declared in this scope 9 | inv[i] = 1ll * (P - (P / i)) * inv[p % i] % P; | ^ answer.code:9:49: warning: pointer to a function used in arithmetic [-Wpointer-arith] 9 | inv[i] = 1ll * (P - (P / i)) * inv[p % i] % P; | ^ answer.code: In function ‘int inv(int)’: answer.code:14:17: warning: pointer to a function used in arithmetic [-Wpointer-arith] 14 | return inv[x]; | ^ answer.code:14:17: error: invalid conversion from ‘int (*)(int)’ to ‘int’ [-fpermissive] 14 | return inv[x]; | ^ | | | int (*)(int)