QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#515166#5. 在线 O(1) 逆元HHHashmapCompile Error//C++14166b2024-08-11 15:40:152024-08-11 15:40:18

Judging History

你现在查看的是测评时间为 2024-08-11 15:40:18 的历史记录

  • [2024-11-05 22:03:01]
  • 管理员手动重测本题所有提交记录
  • [2024-08-11 15:40:18]
  • 评测
  • [2024-08-11 15:40:15]
  • 提交

answer

#include "inv.h"
#include <bits/stdc++.h>
using namespace std;
int m;
int init(int p)
{
   m=p;
   return 0;
}
int inv(int x)
{
   return (m-m/x)/(m%x);
}

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:5:5: error: ambiguating new declaration of ‘int init(int)’
    5 | int init(int p)
      |     ^~~~
In file included from answer.code:1:
inv.h:1:6: note: old declaration ‘void init(int)’
    1 | void init(int p);
      |      ^~~~