QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#217903 | #5. 在线 O(1) 逆元 | LGyxj | 70 | 1318ms | 3796kb | C++14 | 276b | 2023-10-17 15:50:52 | 2023-10-17 15:51:14 |
Judging History
answer
#include "inv.h"
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
const int mod = 998244353;
int inv(int x) {
int res = 1;
while (x != 1) res = 1ll * res * (mod - mod / x) % mod, x = mod % x;
return res;
}
void init(int p) {
return;
}
Details
Test #1:
score: 30
Accepted
time: 14ms
memory: 3796kb
Test #2:
score: 40
Accepted
time: 1318ms
memory: 3628kb
Test #3:
score: 0
Time Limit Exceeded