QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#822659#5. 在线 O(1) 逆元BehruzbekXCompile Error//C++20241b2024-12-20 15:19:032024-12-20 15:19:04

Judging History

你现在查看的是最新测评结果

  • [2024-12-20 15:19:04]
  • 评测
  • [2024-12-20 15:19:03]
  • 提交

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.