QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#99138 | #5. 在线 O(1) 逆元 | reechee | 0 | 789ms | 394296kb | C++14 | 228b | 2023-04-21 11:57:37 | 2024-11-05 21:48:02 |
Judging History
你现在查看的是最新测评结果
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-04-21 11:57:37]
- 提交
answer
#include "inv.h"
#define F(i,l,r) for (int i=l;i<=r;++i)
constexpr int N=1e8+5;
int Inv[N];
void init(int p){
Inv[1]=1;
F(i,2,N-1) Inv[i]=(p-p/i)*Inv[p%i]%p;
return ;
}
int inv(int x){
return Inv[x];
}
Details
Pretests
Final Tests
Test #1:
score: 0
Runtime Error
Test #2:
score: 0
Wrong Answer
time: 789ms
memory: 394296kb
Test #3:
score: 0
Runtime Error
Test #4:
score: 0
Runtime Error
Test #5:
score: 0
Runtime Error