QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#713833#5. 在线 O(1) 逆元Mango201170 1188ms3884kbC++20264b2024-11-05 20:39:382024-11-05 20:39:38

Judging History

This is a historical verdict posted at 2024-11-05 20:39:38.

  • [2024-11-05 22:08:18]
  • 管理员手动重测本题所有提交记录
  • Verdict: 60
  • Time: 5927ms
  • Memory: 3880kb
  • [2024-11-05 20:39:38]
  • Judged
  • Verdict: 70
  • Time: 1188ms
  • Memory: 3884kb
  • [2024-11-05 20:39:38]
  • Submitted

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

詳細信息


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