QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#489099#5. 在线 O(1) 逆元_FJqwqCompile Error//C++14299b2024-07-24 17:58:582024-07-24 17:58:58

Judging History

你现在查看的是测评时间为 2024-07-24 17:58:58 的历史记录

  • [2024-11-05 22:01:47]
  • 管理员手动重测本题所有提交记录
  • [2024-07-24 17:58:58]
  • 评测
  • [2024-07-24 17:58:58]
  • 提交

answer

#include<bits/stdc++.h>
#include<inv.h>
using namespace std;
#define ll long long
const int N=2005,mod=998244353;
ll power(ll x,ll y){
	if(!y) return 1ll;
	ll z=power(x,y>>1ll);
	z=z*z%mod;
	if(y&1ll) return z*x%mod
	return z;
}
void init(int p){}
int inv(int x){return power(x,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:2:9: fatal error: inv.h: No such file or directory
    2 | #include<inv.h>
      |         ^~~~~~~
compilation terminated.