QOJ.ac

QOJ

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

Judging History

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

  • [2024-11-05 22:08:12]
  • 管理员手动重测本题所有提交记录
  • [2024-11-05 20:30:57]
  • 评测
  • [2024-11-05 20:30:57]
  • 提交

answer

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

詳細信息

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);
      |         ~~~~~^~~~~~~~~~
/usr/bin/ld: /tmp/ccFE5U2k.o: in function `main':
implementer.cpp:(.text.startup+0x12b): undefined reference to `init(int)'
/usr/bin/ld: implementer.cpp:(.text.startup+0x1d0): undefined reference to `inv(int)'
collect2: error: ld returned 1 exit status