QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#713833 | #5. 在线 O(1) 逆元 | Mango2011 | 60 | 5927ms | 3880kb | C++20 | 264b | 2024-11-05 20:39:38 | 2024-11-05 22:08:18 |
Judging History
answer
#include<bits/stdc++.h>
#define ll long long
const ll mod=998244353;
int qp(ll x,int y){
ll res=1;
while(y){
if(y&1){
res=res*x%mod;
}
x=x*x%mod;
y>>=1;
}
return res;
}
void init(int p){
}
int inv(int x){
return qp(x,mod-2);
}
Details
Pretests
Final Tests
Test #1:
score: 10
Accepted
time: 9ms
memory: 3808kb
Test #2:
score: 20
Accepted
time: 1186ms
memory: 3672kb
Test #3:
score: 30
Accepted
time: 5927ms
memory: 3880kb
Test #4:
score: 0
Time Limit Exceeded
Test #5:
score: 0
Time Limit Exceeded