이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |