QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#217903#5. 在线 O(1) 逆元LGyxj30 1247ms3896kbC++14276b2023-10-17 15:50:522024-11-05 21:53:56

Judging History

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

  • [2024-11-05 21:53:56]
  • 管理员手动重测本题所有提交记录
  • 测评结果:30
  • 用时:1247ms
  • 内存:3896kb
  • [2023-10-17 15:51:14]
  • 评测
  • 测评结果:70
  • 用时:1318ms
  • 内存:3796kb
  • [2023-10-17 15:50:52]
  • 提交

answer

#include "inv.h"
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
const int mod = 998244353;
int inv(int x) {
	int res = 1;
	while (x != 1) res = 1ll * res * (mod - mod / x) % mod, x = mod % x;
	return res;
}
void init(int p) {
	return;
}

Details


Pretests


Final Tests

Test #1:

score: 10
Accepted
time: 13ms
memory: 3896kb

Test #2:

score: 20
Accepted
time: 1247ms
memory: 3896kb

Test #3:

score: 0
Time Limit Exceeded

Test #4:

score: 0
Time Limit Exceeded

Test #5:

score: 0
Time Limit Exceeded