QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#713821#5. 在线 O(1) 逆元Mango20110 0ms0kbC++20339b2024-11-05 20:37:392024-11-05 20:37:40

Judging History

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

  • [2024-11-05 22:08:15]
  • 管理员手动重测本题所有提交记录
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2024-11-05 20:37:40]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2024-11-05 20:37:39]
  • 提交

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;
}
int inve[100005];
void init(int P){
   for(int i=0;i<100000;i++){
	   inve[i]=qp(i,mod-2);
   }
}
int inv(int x){
 	return inve[x];
}

詳細信息


Pretests


Final Tests

Test #1:

score: 0
Runtime Error

Test #2:

score: 0
Runtime Error

Test #3:

score: 0
Runtime Error