QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#293460 | #5. 在线 O(1) 逆元 | iee | Compile Error | / | / | C++14 | 392b | 2023-12-29 10:31:52 | 2024-11-05 21:56:59 |
Judging History
你现在查看的是最新测评结果
- [2024-11-05 21:56:59]
- 管理员手动重测本题所有提交记录
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-12-29 10:31:53]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-12-29 10:31:52]
- 提交
answer
#pragma GCC optimize("O3,Ofast,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#include <inv.h>
using namespace std;
constexpr int P = 998244353, N = 1e8;
int v[N];
void init(int p) {
v[1] = 1;
for (int i = 2; i < N; i++) {
v[i] = P - 1ll * v[P % i] * (P / i) % P;
}
}
int inv(int x) {
if (x < N) return v[x];
return P - 1ll * inv(P % x) * (P / x) % 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:3:10: fatal error: inv.h: No such file or directory 3 | #include <inv.h> | ^~~~~~~ compilation terminated.