QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#208968 | #5. 在线 O(1) 逆元 | Williamxzh | Compile Error | / | / | C++14 | 416b | 2023-10-09 22:40:54 | 2024-11-05 21:53:00 |
Judging History
你现在查看的是最新测评结果
- [2024-11-05 21:53:00]
- 管理员手动重测本题所有提交记录
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-10-09 22:40:54]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-10-09 22:40:54]
- 提交
answer
#include "inv.h"
#include <bits/stdc++.h>
using namespace std;
const int mod=998244353;
const __uint128_t brt=((__uint128_t)1<<64)/mod;
il void init(){
}
int inv(int x){
int b=mod-2;long long ans=1ll,a=1ll*x;
while(b){
if(b&1){ans*=a,ans-=mod*(brt*ans>>64);while(ans>=mod) ans-=mod;}
a*=a,a-=mod*(brt*a>>64);while(a>=mod) a-=mod;
b>>=1;
}
return int(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); | ~~~~~^~~~~~~~~~ answer.code:6:1: error: ‘il’ does not name a type 6 | il void init(){ | ^~