UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#213787#2157. 数列zhangxinyang111Compile Error//C++314b2024-11-13 19:39:202024-11-13 23:02:35

answer

#include<bits/stdc++.h>
#define int long long
using namespace std;
const int N=1e6+7;
int f[N];
int n,p;
signed main()
{
	cin.tie(nullptr) -> ios::sync_with_stdio(false);
	cin>>n>>p;
	f[1]=1;
	for(int i=2;i<=n;i++) f[i]=f[i-1]*(4*n-2)/(n+1)%p;
	cout<<f[n]%p;
	return 0;
}
//f[n]=f[n-1]*(4*n-2)/(n+1)

详细

answer.code: In function 'int main()':
answer.code:9:10: error: 'nullptr' was not declared in this scope
  cin.tie(nullptr) -> ios::sync_with_stdio(false);\x0d
          ^