QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#67278 | #5099. 朝圣道 | Schi2oid | Compile Error | / | / | C++14 | 472b | 2022-12-10 11:22:37 | 2022-12-10 11:22:39 |
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:22:39]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2022-12-10 11:22:37]
- 提交
answer
#include <bits/stdc++.h>
#include "pilgrimage.h"
using namespace std;
#define int long long
int dp[3005][3005];
int ans[3005];
void init(int o, int mod)
{
int ny=(mod+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];}
详细
answer.code:19:5: error: ambiguating new declaration of ‘long long int ask(long long int)’ 19 | int ask(long long n){return ans[n];} | ^~~ In file included from answer.code:2: pilgrimage.h:3:5: note: old declaration ‘int ask(long long int)’ 3 | int ask (long long n); | ^~~