QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#102564 | #5. 在线 O(1) 逆元 | liuzhenhao09 | 0 | 0ms | 0kb | C++14 | 240b | 2023-05-03 14:42:45 | 2024-11-05 21:49:15 |
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-05-03 14:42:45]
- Submitted
answer
#include<bits/stdc++.h>
#include "inv.h"
using namespace std;
int iv[100000010];
void init(int p){
iv[1] = 1;
for(int i = 2; i <= 100000000; i++) iv[i] = (long long)(p - p / i) * iv[p % i] % p;
}
int inv(int x){
return iv[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