QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#4913 | #5. 在线 O(1) 逆元 | Qingyu | 70 | 1202ms | 3616kb | C++11 | 281b | 2020-10-15 22:49:10 | 2021-12-19 05:36:19 |
Judging History
你现在查看的是测评时间为 2021-12-19 05:36:19 的历史记录
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2020-10-15 22:49:10]
- 提交
answer
#include "inv.h"
typedef long long ll;
const int mod = 998244353;
inline ll pw(ll x, ll p = mod - 2)
{
ll r = 1;
while (p)
{
if (p & 1) r = r * x % mod;
x = x * x % mod;
p >>= 1;
}
return r;
}
void init(int p) {}
int inv(int x) { return pw(x); }
Details
Test #1:
score: 30
Accepted
time: 15ms
memory: 3616kb
Test #2:
score: 40
Accepted
time: 1202ms
memory: 3540kb
Test #3:
score: 0
Time Limit Exceeded