QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#489101#5. 在线 O(1) 逆元_FJqwqCompile Error//C++14299b2024-07-24 17:59:292024-07-24 17:59:30

Judging History

你现在查看的是测评时间为 2024-07-24 17:59:30 的历史记录

  • [2024-11-05 22:01:47]
  • 管理员手动重测本题所有提交记录
  • [2024-07-24 17:59:30]
  • 评测
  • [2024-07-24 17:59:29]
  • 提交

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

詳細信息

implementer.cpp: In function ‘int main()’:
implementer.cpp:22:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   22 |         scanf("%d", &n);
      |         ~~~~~^~~~~~~~~~
answer.code: In function ‘long long int power(long long int, long long int)’:
answer.code:10:33: error: expected ‘;’ before ‘return’
   10 |         if(y&1ll) return z*x%mod
      |                                 ^
      |                                 ;
   11 |         return z;
      |         ~~~~~~