QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#650550 | #5. 在线 O(1) 逆元 | yduck | Compile Error | / | / | C++14 | 758b | 2024-10-18 15:34:37 | 2024-11-05 22:06:32 |
Judging History
你现在查看的是最新测评结果
- [2024-11-05 22:06:32]
- 管理员手动重测本题所有提交记录
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2024-10-18 15:34:39]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2024-10-18 15:34:37]
- 提交
answer
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define rep(i, l, r) for(int i = (l); i <= (r); i ++)
#define per(i, r, l) for(int i = (r); i >= (l); i --)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define looktime cerr << endl << 1.0 * clock() / CLOCKS_PER_SEC << endl;
#define mp make_pair
typedef pair<int, int> pii;
//---------------------------------------------------------------------------
#define int long long
int mo;
int qpow(int x, int n, int p){
int res = 1;
while(n){
if(n & 1) res = res * x % p;
x = x * x % p;
n >>= 1;
}
return res;
}
int inv(int x){
return qpow(x, mo - 2, mo);
}
void iniv(int p){
mo = p;
}
詳細信息
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/ccvCD952.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