QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#738448#5. 在线 O(1) 逆元dqwCompile Error//C++23552b2024-11-12 19:05:332024-11-12 19:05:41

Judging History

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

  • [2024-11-12 19:05:41]
  • 评测
  • [2024-11-12 19:05:33]
  • 提交

answer

//  __  __   _  _____ _   _   _____   ______          __
//  \ \/ /  / \|_   _| | | | |  __ \ / __ \ \   /\   / /
//   \  /  / _ \ | | | | | | | |  | | |  | \ \ /  \ / /
//   /  \ / ___ \| | | |_| | | |__| | |__| |\ V /\ V /
//  /_/\_/_/   \_\_|  \___/  |_____/ \___\_\ \_/  \_/ (TM)

#include <bits/stdc++.h>
#include "inv.h"
using namespace std;
#define ll long long
const int mod=998244353;
unordered_map<int,int>I;
int inv(int x)
{
	if(x<=1)return x;
	if(I.find(x)!=I.end())return I[x];
	return I[x]=mod-1LL*mod/x*inv(mod%x)%mod;
}

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