QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#641194 | #5. 在线 O(1) 逆元 | Idtwtei | Compile Error | / | / | C++14 | 281b | 2024-10-14 19:07:45 | 2024-11-05 22:06:29 |
Judging History
你现在查看的是最新测评结果
- [2024-11-05 22:06:29]
- 管理员手动重测本题所有提交记录
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2024-10-14 19:07:45]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2024-10-14 19:07:45]
- 提交
answer
#include"inv.h"
#include<bits/stdc++.h>
using namespace std;
const int MOD=998244353,N=MOD>>8;
int I[N];
void init(int p){ I[1]=1; for(int i=1;i<N;++i) I[i]=MOD-1ll*(MOD/i)*I[MOD%i]%MOD; }
int inv(int x){
if(x<N) return I[x];
return MOD-1ll*(MOD/x)*inv[MOD%x]%MOD;
}
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 ‘int inv(int)’: answer.code:11:41: warning: pointer to a function used in arithmetic [-Wpointer-arith] 11 | return MOD-1ll*(MOD/x)*inv[MOD%x]%MOD; | ^ answer.code:11:31: error: invalid operands of types ‘long long int’ and ‘int(int)’ to binary ‘operator*’ 11 | return MOD-1ll*(MOD/x)*inv[MOD%x]%MOD; | ~~~~~~~~~~~^~~~~~~~~~~ | | | | long long int int(int)