QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#489103#5. 在线 O(1) 逆元_FJqwq30 2054ms3876kbC++14300b2024-07-24 18:00:192024-11-05 22:01:53

Judging History

This is the latest submission verdict.

  • [2024-11-05 22:01:53]
  • 管理员手动重测本题所有提交记录
  • Verdict: 30
  • Time: 2054ms
  • Memory: 3876kb
  • [2024-07-24 18:00:19]
  • Judged
  • Verdict: 70
  • Time: 2058ms
  • Memory: 3880kb
  • [2024-07-24 18:00:19]
  • Submitted

answer

#include<bits/stdc++.h>
#include"inv.h"
using namespace std;
#define ll long long
const int N=2005,mod=998244353;
ll power(ll x,ll y){
	if(!y) return 1ll;
	ll z=power(x,y>>1ll);
	z=z*z%mod;
	if(y&1ll) return z*x%mod;
	return z;
}
void init(int p){}
int inv(int x){return power(x,mod-2);}

詳細信息


Pretests


Final Tests

Test #1:

score: 10
Accepted
time: 17ms
memory: 3876kb

Test #2:

score: 20
Accepted
time: 2054ms
memory: 3700kb

Test #3:

score: 0
Time Limit Exceeded

Test #4:

score: 0
Time Limit Exceeded

Test #5:

score: 0
Time Limit Exceeded