QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#4942 | #5. 在线 O(1) 逆元 | zombie462 | 100 | 5949ms | 511696kb | C++11 | 309b | 2020-10-19 09:44:41 | 2024-11-05 21:42:46 |
Judging History
你现在查看的是测评时间为 2024-11-05 21:42:46 的历史记录
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2020-10-19 09:44:41]
- 提交
answer
#include <bits/stdc++.h>
#include "inv.h"
using namespace std;
const int mod=998244353;
const int N=130000010;
int invv[N];
int inv(int a){
return a<N?invv[a]:1LL*(mod-mod/a)*inv(mod%a)%mod;
}
void init(int p){
invv[0]=invv[1]=1;
for (int i=2;i<N;++i) invv[i]=1LL*(mod-mod/i)*invv[mod%i]%mod;
}
Details
Pretests
Final Tests
Test #1:
score: 10
Accepted
time: 834ms
memory: 511508kb
Test #2:
score: 20
Accepted
time: 1389ms
memory: 511696kb
Test #3:
score: 30
Accepted
time: 3455ms
memory: 511696kb
Test #4:
score: 20
Accepted
time: 4941ms
memory: 511632kb
Test #5:
score: 20
Accepted
time: 5949ms
memory: 511696kb