QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#713698#5. 在线 O(1) 逆元lgx57Compile Error//C++14301b2024-11-05 20:19:002024-11-05 22:08:10

Judging History

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

  • [2024-11-05 22:08:10]
  • 管理员手动重测本题所有提交记录
  • [2024-11-05 20:19:01]
  • 评测
  • [2024-11-05 20:19:00]
  • 提交

answer

#include<inv.h>
#define int long long
using namespace std;
const int mod=998244353;
int qp(int x,int k){
	int base=x,ans=1;
	while (k){
		if (k&1){
			ans=(ans*base)%mod;
		}
		base=(base*base)%mod;
		k>>=1;
	}
	return ans;
}
void init(){
	
}
int inv(int x){
	return qp(x,mod-2);
}

详细

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:9: fatal error: inv.h: No such file or directory
    1 | #include<inv.h>
      |         ^~~~~~~
compilation terminated.