QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#464844#5. 在线 O(1) 逆元ETO_leader70 1112ms3808kbC++23276b2024-07-06 15:21:472024-07-06 15:21:48

Judging History

This is a historical verdict posted at 2024-07-06 15:21:48.

  • [2024-11-05 21:59:48]
  • 管理员手动重测本题所有提交记录
  • Verdict: 60
  • Time: 5578ms
  • Memory: 3880kb
  • [2024-07-06 15:21:48]
  • Judged
  • Verdict: 70
  • Time: 1112ms
  • Memory: 3808kb
  • [2024-07-06 15:21:47]
  • Submitted

answer

using ulint=unsigned long long;
static constexpr auto MOD=998244353;
void init(int p){}
constexpr auto Inv(ulint x){
    auto res=1ull;auto b=MOD-2;
    while(b){
        if(b&1) (res*=x)%=MOD;
		(x*=x)%=MOD;b>>=1;
	}
	return res;
}
int inv(int x){return Inv(x);}

Details

Test #1:

score: 30
Accepted
time: 12ms
memory: 3808kb

Test #2:

score: 40
Accepted
time: 1112ms
memory: 3688kb

Test #3:

score: 0
Time Limit Exceeded