QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#4932#5. 在线 O(1) 逆元zombie46230 1634ms3884kbC++11173b2020-10-19 09:39:252024-11-05 21:45:13

Judging History

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

  • [2024-11-05 21:45:13]
  • 管理员手动重测本题所有提交记录
  • 测评结果:30
  • 用时:1634ms
  • 内存:3884kb
  • [2024-11-05 21:42:05]
  • 管理员手动重测本题所有提交记录
  • 测评结果:30
  • 用时:1629ms
  • 内存:3844kb
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2021-12-19 05:37:34]
  • 评测
  • 测评结果:70
  • 用时:3852ms
  • 内存:3572kb
  • [2020-10-19 09:39:25]
  • 提交

answer

#include <bits/stdc++.h>
#include "inv.h"
using namespace std;
int mod;
int inv(int a){
	return a<=1?1:1LL*(mod-mod/a)*inv(mod%a)%mod;
}
void init(int p){
	mod=p;
}

Details


Pretests


Final Tests

Test #1:

score: 10
Accepted
time: 17ms
memory: 3884kb

Test #2:

score: 20
Accepted
time: 1634ms
memory: 3788kb

Test #3:

score: 0
Time Limit Exceeded

Test #4:

score: 0
Time Limit Exceeded

Test #5:

score: 0
Time Limit Exceeded