QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#713833#5. 在线 O(1) 逆元Mango201170 1188ms3884kbC++20264b2024-11-05 20:39:382024-11-05 20:39:38

Judging History

你现在查看的是测评时间为 2024-11-05 20:39:38 的历史记录

  • [2024-11-05 22:08:18]
  • 管理员手动重测本题所有提交记录
  • 测评结果:60
  • 用时:5927ms
  • 内存:3880kb
  • [2024-11-05 20:39:38]
  • 评测
  • 测评结果:70
  • 用时:1188ms
  • 内存:3884kb
  • [2024-11-05 20:39:38]
  • 提交

answer

#include<bits/stdc++.h>
#define ll long long
const ll mod=998244353;
int qp(ll x,int y){
	ll res=1;
	while(y){
		if(y&1){
			res=res*x%mod;
		}
		x=x*x%mod;
		y>>=1;
	}
	return res;
}
void init(int p){
	
}
int inv(int x){
 	return qp(x,mod-2);
}

Details


Pretests


Final Tests

Test #1:

score: 30
Accepted
time: 12ms
memory: 3884kb

Test #2:

score: 40
Accepted
time: 1188ms
memory: 3680kb

Test #3:

score: 0
Time Limit Exceeded