QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#738448 | #5. 在线 O(1) 逆元 | dqw | Compile Error | / | / | C++23 | 552b | 2024-11-12 19:05:33 | 2024-11-12 19:05:41 |
Judging History
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;
}
详细
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