QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#713831 | #5. 在线 O(1) 逆元 | Mango2011 | Compile Error | / | / | C++20 | 264b | 2024-11-05 20:39:03 | 2024-11-05 20:39:04 |
Judging History
你现在查看的是测评时间为 2024-11-05 20:39:04 的历史记录
- [2024-11-05 22:08:16]
- 管理员手动重测本题所有提交记录
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2024-11-05 20:39:04]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2024-11-05 20:39:03]
- 提交
answer
#include<bits/stdc++.h>
#define ll long long
const ll mod=998244353;
int qp(ll x,int y){
ll res=1;
while(y){
if(y&1){
res=res*x%mod;
}
x=x*x%mod;
y>>=1;
}
return res;
}
void init(int p){
}
int inv(int x){
return qp(i,mod-2);
}
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:19:19: error: ‘i’ was not declared in this scope 19 | return qp(i,mod-2); | ^