Submission #19992

#TimeUsernameProblemLanguageResultExecution timeMemory
19992gs12117동전 (kriii4_E)C++98
100 / 100
89 ms1348 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...