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