真的不是标题党
然而,如果你把它们随便丢进一个比较器里:
正在比较文件 ce.c 和 AC.C
FC: 找不到差异
求大佬解答原因
附: 源代码:
// P2613
#include <cctype>
#include <cstdio>
#define MOD 19260817
using namespace std;
char str[20005];
inline int qpow(long long x, int n)
{
long long rv = 1;
while (n)
{
if (n & 1)
rv = rv * x % MOD;
x = x * x % MOD;
n >>= 1;
}
return rv;
}
int main()
{
fread(str, 1, 20005, stdin);
int x = 0, y = 0;
char *i = str;
while (isdigit(*i))
{
x = (x * 10 + ((*i) ^ 48)) % MOD;
++i;
}
while (!isdigit(*i))
++i;
while (isdigit(*i))
{
y = (y * 10 + ((*i) ^ 48)) % MOD;
++i;
}
printf("%d", int((long long)x * qpow(y, MOD - 2) % MOD));
return 0;
}
报错信息(无 O2):
No valid executable file was produced by the compiler
/tmp/compiler_sxl1p364/src: 在函数‘main’中:
/tmp/compiler_sxl1p364/src:37:14: 警告:格式 ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=]
37 | printf("%d", (long long)x * qpow(y, MOD - 2) % MOD);
| ~^
| |
| int
| %lld
/nix/store/p58l5qmzifl20qmjs3xfpl01f0mqlza2-binutils-2.40/bin/ld: ./ccVHKgZz.o: in function `main':
src:(.text+0x167): undefined reference to `qpow'
collect2: 错误:ld 返回 1