QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#822659 | #5. 在线 O(1) 逆元 | BehruzbekX | Compile Error | / | / | C++20 | 241b | 2024-12-20 15:19:03 | 2024-12-20 15:19:04 |
Judging History
answer
#include <inv.h>
#define mod 998244353
using ll = long long;
void init(int p) {
}
ll bpow (ll a, ll b) {
ll r = 1;
for(;b;b>>=1, a = (a*a)%mod)if(b&1)r=(r*a)%mod;
return r;
}
ll inv(int n){ll nn = n;return bpow(nn, 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:1:10: fatal error: inv.h: No such file or directory 1 | #include <inv.h> | ^~~~~~~ compilation terminated.