QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#676870#5. 在线 O(1) 逆元xmseerCompile Error//C++17273b2024-10-26 01:50:262024-11-05 22:07:17

Judging History

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

  • [2024-11-05 22:07:17]
  • 管理员手动重测本题所有提交记录
  • [2024-10-26 01:50:27]
  • 评测
  • [2024-10-26 01:50:26]
  • 提交

answer

#include<inv.h>
#include<cstdio>
constexpr int N = 1e8+7;
int ans[N];

void init(int p)
{
    ans[1] = 1;
    for(int i=2;i<=N-7;i++)
    {
        ans[i] = 1ll * (p - p/i) * ans[p%i] % p
    }
}
int inv(int x)
{
    return ans[x];
}
int main()
{
    
}

詳細信息

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:1:9: fatal error: inv.h: No such file or directory
    1 | #include<inv.h>
      |         ^~~~~~~
compilation terminated.