QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#787969#5. 在线 O(1) 逆元dinnerWu0 0ms0kbC++14193b2024-11-27 15:25:462024-11-27 15:25:47

Judging History

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

  • [2024-11-27 15:25:47]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2024-11-27 15:25:46]
  • 提交

answer

#import"inv.h"
const int m=998244353;int f[200000000],i=f[1]=1;void init(int p){for(;++i<2e8;f[i]=(long long)(m-m/i)*f[m%i]%m);}int inv(int x){return x<2e8?f[x]:(long long)(m-m/x)*inv(m%x)%m;}

详细


Pretests


Final Tests

Test #1:

score: 0
Memory Limit Exceeded

Test #2:

score: 0
Memory Limit Exceeded

Test #3:

score: 0
Memory Limit Exceeded

Test #4:

score: 0
Memory Limit Exceeded

Test #5:

score: 0
Memory Limit Exceeded