QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#67277 | #5099. 朝圣道 | Schi2oid | Compile Error | / | / | C++14 | 468b | 2022-12-10 11:21:13 | 2022-12-10 11:21:18 |
Judging History
你现在查看的是最新测评结果
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2022-12-10 11:21:18]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2022-12-10 11:21:13]
- 提交
answer
#include <bits/stdc++.h>
#include "pilgrimage.h"
using namespace std;
typedef int long long
int dp[3005][3005];
int ans[3005];
void init(int o, int p)
{
int ny=(p+1)/2;
dp[0][0]=1;
ans[0]=0;
for(int i=1;i<=3000;i++){
dp[i][0]=(dp[i-1][0]*ny+dp[i-1][1]*ny)%mod;
for(int j=1;j<=i;j++) dp[i][j]=((dp[i-1][j-1]+dp[i-1][j+1])*ny%mod*ny%mod+dp[i-1][j]*ny%mod)%mod;
ans[i]=(ans[i-1]+dp[i-1][0]*ny)%mod;
}
}
int ask(long long n){return ans[n];}
Details
answer.code:4:9: error: two or more data types in declaration of ‘dp’ 4 | typedef int long long | ^~~ answer.code: In function ‘void init(int, int)’: answer.code:10:9: error: ‘dp’ was not declared in this scope; did you mean ‘p’? 10 | dp[0][0]=1; | ^~ | p answer.code:13:56: error: ‘mod’ was not declared in this scope; did you mean ‘modf’? 13 | dp[i][0]=(dp[i-1][0]*ny+dp[i-1][1]*ny)%mod; | ^~~ | modf