QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#67093 | #5099. 朝圣道 | xlwang | Compile Error | / | / | C++14 | 633b | 2022-12-10 08:41:56 | 2022-12-10 08:41:57 |
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 08:41:57]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2022-12-10 08:41:56]
- 提交
answer
#include <bits/stdc++.h>
#include "pilgrimage.h"
#define ll long long
#define fr(i,j,k) for(register int i=j;i<=k;++i)
const int Maxn=3e3+20;
ll f[Maxn][Maxn<<1];
ll c[Maxn][Maxn];
inline ll ksm(ll x,ll y,ll mod){
ll sum=1;
while(y){
if(y&1) sum=sum*x%mod;
y=y/2;
x=x*x%mod;
}
return sum;
}
int mod;
void init(ll o, ll p){
mod=p;
f[0][3005]=1;
int p1,p2,p3;
p1=p3=ksm(4,p-2,p);
p2=ksm(2,p-2,p);
fr(i,1,3000) fr(j,1,6020) f[i][j]=(f[i-1][j]*p2%p+f[i-1][j-1]*p3%p+f[i-1][j+1]*p1%p)%p;
}
int ask(long long n){
int ans=0;
fr(i,1,6020) ans+=abs(i-3005)*f[n][i]%mod,ans%=mod;
return ans;
}
Details
/usr/bin/ld: /tmp/ccBiqiPv.o: in function `main': implementer.cpp:(.text.startup+0x2b): undefined reference to `init(int, int)' collect2: error: ld returned 1 exit status