QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#464831#5. 在线 O(1) 逆元ETO_leader0 0ms3908kbC++23278b2024-07-06 15:18:152024-07-06 15:18:16

Judging History

你现在查看的是测评时间为 2024-07-06 15:18:16 的历史记录

  • [2024-11-05 21:59:48]
  • 管理员手动重测本题所有提交记录
  • 测评结果:0
  • 用时:0ms
  • 内存:3896kb
  • [2024-07-06 15:18:16]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:3908kb
  • [2024-07-06 15:18:15]
  • 提交

answer

using ulint=unsigned long long;
static constexpr auto MOD=998244353;
void init(int p){}
constexpr auto Inv(ulint x){
    auto res=0ull;auto b=MOD-2;
    while(b){
        if(b&1) (res*=res)%=MOD;
		(x*=x)%=MOD;b>>=1;
	}
	return res;
}
int inv(int x){return Inv(x);}

详细

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3708kb

Test #2:

score: 0
Wrong Answer
time: 0ms
memory: 3908kb

Test #3:

score: 0
Wrong Answer
time: 0ms
memory: 3800kb