QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#217903#5. 在线 O(1) 逆元LGyxj70 1318ms3796kbC++14276b2023-10-17 15:50:522023-10-17 15:51:14

Judging History

你现在查看的是测评时间为 2023-10-17 15:51:14 的历史记录

  • [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

Test #1:

score: 30
Accepted
time: 14ms
memory: 3796kb

Test #2:

score: 40
Accepted
time: 1318ms
memory: 3628kb

Test #3:

score: 0
Time Limit Exceeded