QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#23825 | #5. 在线 O(1) 逆元 | feecle6418 | Compile Error | / | / | C++20 | 324b | 2022-03-19 16:35:04 | 2024-11-05 21:46:31 |
Judging History
你现在查看的是最新测评结果
- [2024-11-05 21:46:31]
- 管理员手动重测本题所有提交记录
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2024-11-05 21:43:05]
- 管理员手动重测本题所有提交记录
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2022-05-18 04:14:44]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2022-03-19 16:35:04]
- 提交
answer
#include<bits/stdc++.h>
#include"inv.h"
using namespace std;
typedef long long ll;
const int mod=998244353;
int ny[20000005];
int inv(int x){
if(x<=20000000)return ny[x];
return 1ll*query(mod%x)*(mod-mod/x)%mod;
}
void init(int p){
ny[1]=1;
for(int i=2;i<=20000000;i++)ny[i]=1ll*ny[mod%i]*(mod-mod/i)%mod;
}
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 ‘int inv(int)’: answer.code:9:20: error: ‘query’ was not declared in this scope 9 | return 1ll*query(mod%x)*(mod-mod/x)%mod; | ^~~~~