QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#4932#5. 在线 O(1) 逆元zombie46230 1634ms3884kbC++11173b2020-10-19 09:39:252024-11-05 21:45:13

Judging History

This is the latest submission verdict.

  • [2024-11-05 21:45:13]
  • 管理员手动重测本题所有提交记录
  • Verdict: 30
  • Time: 1634ms
  • Memory: 3884kb
  • [2024-11-05 21:42:05]
  • 管理员手动重测本题所有提交记录
  • Verdict: 30
  • Time: 1629ms
  • Memory: 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]
  • Judged
  • Verdict: 70
  • Time: 3852ms
  • Memory: 3572kb
  • [2020-10-19 09:39:25]
  • Submitted

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;
}

详细


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