ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#213787 | #2157. 数列 | zhangxinyang111 | Compile Error | / | / | C++ | 314b | 2024-11-13 19:39:20 | 2024-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)
Details
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 ^