QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#4915#5. 在线 O(1) 逆元Qingyu60 5791ms3880kbC++111.2kb2020-10-15 22:52:102024-11-05 21:44:55

Judging History

你现在查看的是最新测评结果

  • [2024-11-05 21:44:55]
  • 管理员手动重测本题所有提交记录
  • 测评结果:60
  • 用时:5791ms
  • 内存:3880kb
  • [2024-11-05 21:41:40]
  • 管理员手动重测本题所有提交记录
  • 测评结果:60
  • 用时:5804ms
  • 内存:3728kb
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2021-12-19 05:36:30]
  • 评测
  • 测评结果:70
  • 用时:1188ms
  • 内存:3520kb
  • [2020-10-15 22:52:10]
  • 提交

answer

#include "inv.h"

typedef long long ll;
const int mod = 998244353;

void init(int p) {}

int inv(int _x) 
{ 
	ll x = _x, r = 1;
	r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
x = x * x % mod;
r = r * x % mod;
	return r;
}

Details


Pretests


Final Tests

Test #1:

score: 10
Accepted
time: 9ms
memory: 3836kb

Test #2:

score: 20
Accepted
time: 1161ms
memory: 3880kb

Test #3:

score: 30
Accepted
time: 5791ms
memory: 3844kb

Test #4:

score: 0
Time Limit Exceeded

Test #5:

score: 0
Time Limit Exceeded