QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#268001 | #5. 在线 O(1) 逆元 | David713 | Compile Error | / | / | C++14 | 839b | 2023-11-27 22:41:09 | 2024-11-05 21:55:37 |
Judging History
你现在查看的是最新测评结果
- [2024-11-05 21:55:37]
- 管理员手动重测本题所有提交记录
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-11-27 22:41:09]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-11-27 22:41:09]
- 提交
answer
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
#include <cstdlib>
#include <cmath>
#include <unordered_map>
using namespace std;
#define pii pair<int,int>
#define mp make_pair
const int mod = 998244353, N = 3e7 + 10;
typedef long long ll;
int read()
{
int x = 0;
char c = getchar();
while (c < '0' || c > '9') c = getchar();
while (c >= '0' && c <= '9')
{
x = (x << 1) + (x << 3) + (c ^ 48);
c = getchar();
}
return x;
}
int T;
ll inv[N];
void init()
{
inv[0] = inv[1] = 1;
for (int i = 2; i <= 3e7; i++) inv[i] = ll((mod - mod / i) * inv[mod % i]) % mod;
}
ll invv(int x)
{
if (x <= 3e7) return inv[x];
return ((ll)(mod - mod / x) * (ll)(invv(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); | ~~~~~^~~~~~~~~~ /usr/bin/ld: /tmp/ccvfwwlP.o: in function `main': implementer.cpp:(.text.startup+0x12b): undefined reference to `init(int)' /usr/bin/ld: implementer.cpp:(.text.startup+0x1d0): undefined reference to `inv(int)' collect2: error: ld returned 1 exit status