QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#4932#5. 在线 O(1) 逆元zombie46270 3852ms3572kbC++11173b2020-10-19 09:39:252021-12-19 05:37:34

Judging History

你现在查看的是测评时间为 2021-12-19 05:37:34 的历史记录

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

詳細信息

Test #1:

score: 30
Accepted
time: 36ms
memory: 3572kb

Test #2:

score: 40
Accepted
time: 3852ms
memory: 3568kb

Test #3:

score: 0
Time Limit Exceeded