QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#268003 | #5. 在线 O(1) 逆元 | David713 | Compile Error | / | / | C++14 | 383b | 2023-11-27 22:43:31 | 2024-11-05 21:55:38 |
Judging History
你现在查看的是最新测评结果
- [2024-11-05 21:55:38]
- 管理员手动重测本题所有提交记录
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-11-27 22:43:31]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-11-27 22:43:31]
- 提交
answer
#include <inv.h>
using namespace std;
const int mod = 998244353, N = 3e7 + 10;
typedef long long ll;
int T;
ll invv[N];
void init(int p)
{
invv[0] = invv[1] = 1;
for (int i = 2; i <= 3e7; i++) invv[i] = ll((mod - mod / i) * invv[mod % i]) % mod;
}
ll inv(int x)
{
if (x <= 3e7) return invv[x];
return ((ll)(mod - mod / x) * (ll)(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:1:10: fatal error: inv.h: No such file or directory 1 | #include <inv.h> | ^~~~~~~ compilation terminated.