QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#23827 | #5. 在线 O(1) 逆元 | feecle6418 | 70 ✓ | 1816ms | 159884kb | C++20 | 322b | 2022-03-19 16:35:48 | 2022-04-30 04:19:58 |
Judging History
你现在查看的是测评时间为 2022-04-30 04:19:58 的历史记录
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2022-03-19 16:35:48]
- 提交
answer
#include<bits/stdc++.h>
#include"inv.h"
using namespace std;
typedef long long ll;
const int mod=998244353;
int ny[40000005];
int inv(int x){
if(x<=40000000)return ny[x];
return 1ll*inv(mod%x)*(mod-mod/x)%mod;
}
void init(int p){
ny[1]=1;
for(int i=2;i<=40000000;i++)ny[i]=1ll*ny[mod%i]*(mod-mod/i)%mod;
}
Details
Test #1:
score: 30
Accepted
time: 636ms
memory: 159884kb
Test #2:
score: 40
Accepted
time: 1816ms
memory: 159872kb
Test #3:
score: 0
Time Limit Exceeded