QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#464844 | #5. 在线 O(1) 逆元 | ETO_leader | 70 | 1112ms | 3808kb | C++23 | 276b | 2024-07-06 15:21:47 | 2024-07-06 15:21:48 |
Judging History
answer
using ulint=unsigned long long;
static constexpr auto MOD=998244353;
void init(int p){}
constexpr auto Inv(ulint x){
auto res=1ull;auto b=MOD-2;
while(b){
if(b&1) (res*=x)%=MOD;
(x*=x)%=MOD;b>>=1;
}
return res;
}
int inv(int x){return Inv(x);}
详细
Test #1:
score: 30
Accepted
time: 12ms
memory: 3808kb
Test #2:
score: 40
Accepted
time: 1112ms
memory: 3688kb
Test #3:
score: 0
Time Limit Exceeded