QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#566548#5. 在线 O(1) 逆元yihang_01Compile Error//C++2086b2024-09-16 00:28:192024-11-05 22:03:43

Judging History

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

  • [2024-11-05 22:03:43]
  • 管理员手动重测本题所有提交记录
  • [2024-09-16 00:28:20]
  • 评测
  • [2024-09-16 00:28:19]
  • 提交

answer

void init(int p) {
    mod = p;
}

i64 inv(i64 a) {
    return qpow(a, mod-2);
}

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);
      |         ~~~~~^~~~~~~~~~
answer.code: In function ‘void init(int)’:
answer.code:2:5: error: ‘mod’ was not declared in this scope
    2 |     mod = p;
      |     ^~~
answer.code: At global scope:
answer.code:5:1: error: ‘i64’ does not name a type
    5 | i64 inv(i64 a) {
      | ^~~