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>
int n;
int mod=1000000007;
int dp[260][260];
int main(){
int i,j,k;
scanf("%d",&n);
dp[0][0]=1;
for(i=0;i<=n;i++){
for(j=0;j<256;j++){
dp[i+1][j]=dp[i][j]%mod;
for(k=1;k<=i;k++){
dp[i+1][j]+=dp[i-k][j^k]%mod;
dp[i+1][j]%=mod;
}
}
}
printf("%d",dp[n+1][0]);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |