QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#489103#5. 在线 O(1) 逆元_FJqwq70 2058ms3880kbC++14300b2024-07-24 18:00:192024-07-24 18:00:19

Judging History

This is a historical verdict posted at 2024-07-24 18:00:19.

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

Details


Pretests


Final Tests

Test #1:

score: 30
Accepted
time: 21ms
memory: 3752kb

Test #2:

score: 40
Accepted
time: 2058ms
memory: 3880kb

Test #3:

score: 0
Time Limit Exceeded