QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#217903 | #5. 在线 O(1) 逆元 | LGyxj | 30 | 1247ms | 3896kb | C++14 | 276b | 2023-10-17 15:50:52 | 2024-11-05 21:53:56 |
Judging History
answer
#include "inv.h"
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
const int mod = 998244353;
int inv(int x) {
int res = 1;
while (x != 1) res = 1ll * res * (mod - mod / x) % mod, x = mod % x;
return res;
}
void init(int p) {
return;
}
详细
Pretests
Final Tests
Test #1:
score: 10
Accepted
time: 13ms
memory: 3896kb
Test #2:
score: 20
Accepted
time: 1247ms
memory: 3896kb
Test #3:
score: 0
Time Limit Exceeded
Test #4:
score: 0
Time Limit Exceeded
Test #5:
score: 0
Time Limit Exceeded