Skip to content

Instantly share code, notes, and snippets.

@nerohoop
Created July 23, 2017 08:20
Show Gist options
  • Save nerohoop/291a89b6856aee1a38b53228916bc772 to your computer and use it in GitHub Desktop.
Save nerohoop/291a89b6856aee1a38b53228916bc772 to your computer and use it in GitHub Desktop.
int M[N+1];
M[0] = 0;
for(int i=0; i<=N; i++) {
if(i < 4) {
M[i] = 1;
} else {
M[i] = M[i-1] + M[i-4];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment