QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#713795 | #5. 在线 O(1) 逆元 | lgx57 | Compile Error | / | / | C++14 | 275b | 2024-11-05 20:34:16 | 2024-11-05 20:34:17 |
Judging History
你现在查看的是测评时间为 2024-11-05 20:34:17 的历史记录
- [2024-11-05 22:08:13]
- 管理员手动重测本题所有提交记录
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2024-11-05 20:34:17]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2024-11-05 20:34:16]
- 提交
answer
#include<bits/stdc++.h>
#define int long long
using namespace std;
const int mod=998244353;
void init(int p){
}
int inv(int x){
int base=x,ans=1,k=mod-2;
while (k){
if (k&1){
ans=(ans*base)%mod;
}
base=(base*base)%mod;
k>>=1;
}
return ans;
}
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); | ~~~~~^~~~~~~~~~ /usr/bin/ld: /tmp/ccRfO8MF.o: in function `main': implementer.cpp:(.text.startup+0x12b): undefined reference to `init(int)' /usr/bin/ld: implementer.cpp:(.text.startup+0x1d0): undefined reference to `inv(int)' collect2: error: ld returned 1 exit status