QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#489103 | #5. 在线 O(1) 逆元 | _FJqwq | 30 | 2054ms | 3876kb | C++14 | 300b | 2024-07-24 18:00:19 | 2024-11-05 22:01:53 |
Judging History
answer
#include<bits/stdc++.h>
#include"inv.h"
using namespace std;
#define ll long long
const int N=2005,mod=998244353;
ll power(ll x,ll y){
if(!y) return 1ll;
ll z=power(x,y>>1ll);
z=z*z%mod;
if(y&1ll) return z*x%mod;
return z;
}
void init(int p){}
int inv(int x){return power(x,mod-2);}
Details
Pretests
Final Tests
Test #1:
score: 10
Accepted
time: 17ms
memory: 3876kb
Test #2:
score: 20
Accepted
time: 2054ms
memory: 3700kb
Test #3:
score: 0
Time Limit Exceeded
Test #4:
score: 0
Time Limit Exceeded
Test #5:
score: 0
Time Limit Exceeded