QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#650585 | #5. 在线 O(1) 逆元 | yduck | Compile Error | / | / | C++14 | 220b | 2024-10-18 15:40:46 | 2024-11-05 22:06:34 |
Judging History
你现在查看的是最新测评结果
- [2024-11-05 22:06:34]
- 管理员手动重测本题所有提交记录
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2024-10-18 15:40:47]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2024-10-18 15:40:46]
- 提交
answer
#include<inv.h>
int mo;
int inv(int x){
int res = 1, n = mo - 2;
while(n){
if(n & 1) res = 1ll * res * x % mo;
x = x * x % mo;
n >>= 1;
}
return res;
}
void iniv(int p){
mo = p;
}
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:1:9: fatal error: inv.h: No such file or directory 1 | #include<inv.h> | ^~~~~~~ compilation terminated.