QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#99136#5. 在线 O(1) 逆元reechee0 767ms394484kbC++14210b2023-04-21 11:55:152024-11-05 21:48:01

Judging History

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

  • [2024-11-05 21:48:01]
  • 管理员手动重测本题所有提交记录
  • 测评结果:0
  • 用时:767ms
  • 内存:394484kb
  • [2024-11-05 21:43:44]
  • 管理员手动重测本题所有提交记录
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-04-21 11:55:17]
  • 评测
  • 测评结果:0
  • 用时:1139ms
  • 内存:394196kb
  • [2023-04-21 11:55:15]
  • 提交

answer

#define F(i,l,r) for (int i=l;i<=r;++i)
constexpr int N=1e8+5;
int Inv[N];
void init(int p){
    Inv[1]=1;
    F(i,2,N-1) Inv[i]=(p-p/i)*Inv[p%i]%p;
    return ;
}
int inv(int x){
    return Inv[x];
}

詳細信息


Pretests


Final Tests

Test #1:

score: 0
Runtime Error

Test #2:

score: 0
Runtime Error

Test #3:

score: 0
Wrong Answer
time: 767ms
memory: 394484kb

Test #4:

score: 0
Runtime Error

Test #5:

score: 0
Runtime Error