QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#738320 | #5. 在线 O(1) 逆元 | dqw | Compile Error | / | / | C++23 | 674b | 2024-11-12 18:41:05 | 2024-11-12 18:41:05 |
Judging History
answer
// __ __ _ _____ _ _ _____ ______ __
// \ \/ / / \|_ _| | | | | __ \ / __ \ \ /\ / /
// \ / / _ \ | | | | | | | | | | | | \ \ / \ / /
// / \ / ___ \| | | |_| | | |__| | |__| |\ V /\ V /
// /_/\_/_/ \_\_| \___/ |_____/ \___\_\ \_/ \_/ (TM)
#include <bits/stdc++.h>
#include "inv.h"
using namespace std;
#define ll long long
int inv(ll int a, ll int m = 998244353)
{
ll int u = 0, v = 1;
while (a != 0)
{
ll int t = m / a;
m -= t * a;
swap(a, m);
u -= t * v;
swap(u, v);
}
return (1ll * u + 998244353) % 998244353;
}
void init(int p){
return;
}
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/ccapPXsK.o: in function `main': implementer.cpp:(.text.startup+0x1d0): undefined reference to `inv(int)' collect2: error: ld returned 1 exit status