QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#869564#5. 在线 O(1) 逆元yangcanningCompile Error//C++23237b2025-01-25 11:19:302025-01-25 11:19:30

Judging History

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

  • [2025-01-25 11:19:30]
  • 评测
  • [2025-01-25 11:19:30]
  • 提交

answer

#include"bits/stdc++.h"
using namespace std;
constexpr int square(int x) {
    return x * x;
}
//constexpr int result = square(100);
constexpr int result[100000000] = { square(10000) };
int main() {
    cout << result << endl;
}

詳細信息

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/ccJKubrn.o: in function `main':
answer.code:(.text.startup+0x0): multiple definition of `main'; /tmp/cca1CSas.o:implementer.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/cca1CSas.o: in function `main':
implementer.cpp:(.text.startup+0x1ca): undefined reference to `init(int)'
/usr/bin/ld: implementer.cpp:(.text.startup+0x2c2): undefined reference to `inv(int)'
collect2: error: ld returned 1 exit status