Submission #19858

#TimeUsernameProblemLanguageResultExecution timeMemory
19858Namnamseo동전 (kriii4_E)C++14
100 / 100
49 ms1340 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...