QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#624691 | #5. 在线 O(1) 逆元 | dww_1337 | Compile Error | / | / | C++14 | 231b | 2024-10-09 16:26:05 | 2024-10-09 16:26:07 |
Judging History
你现在查看的是测评时间为 2024-10-09 16:26:07 的历史记录
- [2024-11-05 22:04:36]
- 管理员手动重测本题所有提交记录
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2024-10-09 16:26:07]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2024-10-09 16:26:05]
- 提交
answer
#include "inv.h"
const int MAXN = 1e8 + 7;
int invt[MAXN];
void init(int p)
{
invt[1] = 1;
for(int i = 1 ; i <= MAXN ; i++) invt[i] = (long long)(p - p / i) * invt[p % i] % p
}
int inv(int x)
{
return invt[x];
}
Details
implementer.cpp: In function ‘int main()’: implementer.cpp:22:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 22 | scanf("%d", &n); | ~~~~~^~~~~~~~~~ answer.code: In function ‘void init(int)’: answer.code:9:92: error: expected ‘;’ before ‘}’ token 9 | for(int i = 1 ; i <= MAXN ; i++) invt[i] = (long long)(p - p / i) * invt[p % i] % p | ^ | ; 10 | } | ~