This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<stdio.h>
#include<memory.h>
#define mod 1000000007
#define inv(a) exp(a,mod-2)
typedef long long lld;
lld exp(lld a, lld b){
if(b<=0)return 1;
lld k=exp(a, b/2);
k=(k*k)%mod;
if(b%2)k=(k*a)%mod;
return k;
}
lld fac[1001001], rfac[1001001];
void init(){
lld i;
fac[0]=rfac[0]=1;
for(i=1; i<=1000000; i++){
fac[i]=(fac[i-1]*i)%mod;
rfac[i]=inv(fac[i]);
}
}
lld comb(lld a, lld b){
return fac[a]*rfac[b]%mod*rfac[a-b]%mod;
}
lld n, grd[251], dy[251];
bool chk[251];
int main(){
lld i, j, k;
// init();
scanf("%d", &n);
printf("%lld", exp(2,n-2));
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |