QOJ.ac
QOJ
The 2nd Universal Cup Finals is coming! Check out our event page, schedule, and competition rules!
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#101627 | #5. 在线 O(1) 逆元 | chenyikai | 0 | 0ms | 0kb | C++14 | 171b | 2023-04-30 15:16:53 | 2024-11-05 21:49:09 |
Judging History
This is the latest submission verdict.
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-04-30 15:16:53]
- Submitted
answer
#include "inv.h"
int Inv[100000003];
void init(int p){
Inv[1]=1;
for(int i=2;i<=100000000;i++)Inv[i]=-1ll*Inv[p%i]*(p/i)%p+p;
}
int inv(int x){
return Inv[x];
}
Details
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