QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#241446 | #5. 在线 O(1) 逆元 | mfeitveer | Compile Error | / | / | C++14 | 417b | 2023-11-06 07:45:36 | 2024-11-05 21:54:06 |
Judging History
你现在查看的是最新测评结果
- [2024-11-05 21:54:06]
- 管理员手动重测本题所有提交记录
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-11-06 07:45:37]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-11-06 07:45:36]
- 提交
answer
#include "inv.h"
const int N = 10000010;
const int mod = 998244353;
typedef long long ll;
ll Inv[N];
inline ll ask(ll x)
{
fir++;
if(x <= 10000000) return Inv[x];
return (mod - mod / x) * ask(mod % x) % mod;
}
inline void init(int p)
{
Inv[1] = 1;
for(int i = 2;i <= 10000000;i++)
Inv[i] = (mod - mod / i) * Inv[mod % i] % mod;
}
inline int inv(int x)
{
return ask(x);
}
详细
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 ‘ll ask(ll)’: answer.code:12:10: error: ‘fir’ was not declared in this scope 12 | fir++; | ^~~