QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#489111 | #5. 在线 O(1) 逆元 | qwef_ | Compile Error | / | / | C++14 | 269b | 2024-07-24 18:06:56 | 2024-11-05 22:01:54 |
Judging History
你现在查看的是最新测评结果
- [2024-11-05 22:01:54]
- 管理员手动重测本题所有提交记录
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2024-07-24 18:06:56]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2024-07-24 18:06:56]
- 提交
answer
#include "inv.h"
typedef long long ll;
const int N=1e8+114,p=998244353;
int a[N];
void init(int _){
a[1]=1;
for(int i=2;i<N;++i) a[i]=(ll)(p-p/i)*a[p%i]%p;
}
int query(int x){
for(int i=1,j=x;;++i,j=(j+x>=p?j+x-p:j+x))
if(j<N)
return (ll)a[j]*i%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); | ~~~~~^~~~~~~~~~ /usr/bin/ld: /tmp/cczKfyJ7.o: in function `main': implementer.cpp:(.text.startup+0x1d0): undefined reference to `inv(int)' collect2: error: ld returned 1 exit status