QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#713821 | #5. 在线 O(1) 逆元 | Mango2011 | 0 | 0ms | 0kb | C++20 | 339b | 2024-11-05 20:37:39 | 2024-11-05 22:08:15 |
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;
}
int inve[100005];
void init(int P){
for(int i=0;i<100000;i++){
inve[i]=qp(i,mod-2);
}
}
int inv(int x){
return inve[x];
}
詳細信息
Pretests
Final Tests
Test #1:
score: 0
Runtime Error
Test #2:
score: 0
Runtime Error
Test #3:
score: 0
Runtime Error
Test #4:
score: 0
Runtime Error
Test #5:
score: 0
Runtime Error